Git Product home page Git Product logo

hashicorp / terraform-provider-tencentcloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tencentcloudstack/terraform-provider-tencentcloud

2.0 2.0 3.0 50.37 MB

This provider has moved to https://github.com/tencentcloudstack/terraform-provider-tencentcloud

Home Page: https://github.com/tencentcloudstack/terraform-provider-tencentcloud

License: Mozilla Public License 2.0

Makefile 0.11% Go 98.30% Shell 0.08% HTML 1.51%

terraform-provider-tencentcloud's Introduction

terraform-provider-tencentcloud

Requirements

  • Terraform 0.12.x
  • Go 1.13.x (to build the provider plugin)

Usage

Build from source code

Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-tencentcloud

$ mkdir -p $GOPATH/src/github.com/terraform-providers
$ cd $GOPATH/src/github.com/terraform-providers
$ git clone https://github.com/terraform-providers/terraform-provider-tencentcloud
$ cd terraform-provider-tencentcloud
$ go build .

If you're building the provider, follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it.

Configuration

Configure credentials

You will need to have a pair of secret id and secret key to access Tencent Cloud resources, configure it in the provider arguments or export it in environment variables. If you don't have it yet, please access Tencent Cloud Management Console to create one.

export TENCENTCLOUD_SECRET_ID=AKID9HH4OpqLJ5f6LPr4iIm5GF2s-EXAMPLE
export TENCENTCLOUD_SECRET_KEY=72pQp14tWKUglrnX5RbaNEtN-EXAMPLE

Configure proxy info (optional)

If you are beind a proxy, for example, in a corporate network, you must set the proxy environment variables correctly. For example:

export http_proxy=http://your-proxy-host:your-proxy-port  # This is just an example, use your real proxy settings!
export https_proxy=$http_proxy
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$http_proxy

Run demo

You can edit your own terraform configuration files. Learn examples from examples directory.

Terrafrom it

Now you can try your terraform demo:

terraform init
terraform plan
terraform apply

If you want to destroy the resource, make sure the instance is already in running status, otherwise the destroy might fail.

terraform destroy

Developer Guide

DEBUG

You will need to set an environment variable named TF_LOG, for more info please refer to Terraform official doc:

export TF_LOG=DEBUG

In your source file, import the standard package log and print the message such as:

log.Println("[DEBUG] the message and some import values: %v", importantValues)

Test

The quicker way for development and debug is writing test cases. How to trigger running the test cases, please refer the test.sh script. How to write test cases, check the xxx_test.go files.

Avoid terrafrom init

export TF_SKIP_PROVIDER_VERIFY=1

This will disable the verify steps, so after you update this provider, you won't need to create new resources, but use previously saved state.

Document

Keep in mind that document changes is also needed when resources, data sources, attributes changed in code.

terraform-provider-tencentcloud's People

Contributors

1newsr avatar 979137 avatar appilon avatar athom avatar ausmartway avatar bulletrush avatar cgriggs01 avatar chuacw avatar crab21 avatar ethankwong avatar gailwang avatar himer avatar jihaoxin avatar kiyor avatar kmoe avatar lazzurs avatar likexian avatar longkai avatar oliverpei avatar paultyng avatar sesede avatar sherlock-holo avatar songrgg avatar theharveyz avatar woodylic avatar zqfan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.