tencentcloudstack/terraform-provider-tencentcloud
Fork: 133 Star: 192 (更新于 2024-11-12 03:24:15)
license: MPL-2.0
Language: Go .
Terraform Tencent Cloud Provider
最后发布版本: v1.81.117 ( 2024-08-16 19:05:15)
Terraform Provider For TencentCloud
-
Tutorials: https://www.terraform.io
-
Mailing list: Google Groups
-
Wechat Group:
Requirements
Usage
Build from source code
Clone repository to: $GOPATH/src/github.com/tencentcloudstack/terraform-provider-tencentcloud
$ mkdir -p $GOPATH/src/github.com/tencentcloudstack
$ cd $GOPATH/src/github.com/tencentcloudstack
$ git clone https://github.com/tencentcloudstack/terraform-provider-tencentcloud.git
$ 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.
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.
Config environment variables:
export TF_ACC=true
Config your appid for COS bucket testing
export TENCENTCLOUD_APPID=1234567890
This example show how to test single test function:
cd tencentcloud
go test -i; go test -test.run TestAccTencentCloudNatGateway_basic -v
To write test cases, check the xxx_test.go
files for more reference.
Avoid terraform 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.
License
Terraform-Provider-TencentCloud is under the Mozilla Public License 2.0. See the LICENSE file for details.
最近版本更新:(数据更新于 2024-08-23 11:36:32)
2024-08-16 19:05:15 v1.81.117
2024-08-14 20:37:44 v1.81.116
2024-08-09 22:49:31 v1.81.115
2024-08-02 22:52:30 v1.81.114
2024-07-26 19:49:22 v1.81.113
2024-07-24 22:33:41 v1.81.112
2024-07-19 22:29:12 v1.81.111
2024-07-17 22:27:02 v1.81.110
2024-07-17 21:38:07 v1.81.109
2024-07-12 21:31:15 v1.81.108
主题(topics):
qcloud, tencent, tencentcloud, terraform, terraform-provider
tencentcloudstack/terraform-provider-tencentcloud同语言 Go最近更新仓库
2024-11-21 22:49:20 containerd/containerd
2024-11-21 13:50:50 XTLS/Xray-core
2024-11-21 06:27:30 ollama/ollama
2024-11-21 05:17:55 Melkeydev/go-blueprint
2024-11-21 04:04:03 dolthub/dolt
2024-11-21 01:52:15 SpecterOps/BloodHound