Repository navigation
Publish Package Metadata tencentcloud@1.83.47 - #13763
Merged
Merged
Conversation
pulumi-bot
enabled auto-merge (squash)
December 2, 2026 23:38
Contributor
✅
|
| check | command | |
|---|---|---|
| docs generate | ✅ | resourcedocsgen metadata from-urls |
| publisher listed | ✅ | tencentcloudstack is a key in publisher-names.json |
Owner tencentcloudstack
Doc-lint ✅ clean. No relative images or raw HTML.
Provider docs (source as published):
_index.md · 735 lines · open full file
---
# WARNING: this file was fetched from https://djoiyj6oj2oxz.cloudfront.net/docs/registry.opentofu.org/tencentcloudstack/tencentcloud/1.83.47/index.md
# Do not edit by hand unless you're certain you know what you are doing!
# *** WARNING: This file was auto-generated. Do not edit by hand unless you're certain you know what you are doing! ***
title: Tencentcloud Provider
meta_desc: Provides an overview on how to configure the Pulumi Tencentcloud provider.
layout: package
---
## Generate Provider
The Tencentcloud provider must be installed as a Local Package by following the [instructions for Any Terraform Provider](https://www.pulumi.com/registry/packages/terraform-provider/):
```bash
pulumi package add terraform-provider tencentcloudstack/tencentcloud
```
## Overview
The TencentCloud provider is used to interact with many resources supported by [TencentCloud](https://intl.cloud.tencent.com).
The provider needs to be configured with the proper credentials before it can be used.
Use the navigation on the left to read about the available resources.
> **Note:** Pulumi 0.12.x supported began with provider version 1.9.0 (June 18, 2019).
> **Note:** When managing tag fields such as [`tag`, `tags`, `tagList`...] for all of the Tencent Cloud resources, avoid using system-reserved fields, such as: [`qcs:`, `project_`, `项目`]. for details, please refer to the [Use Limits](https://www.tencentcloud.com/document/product/651/13354?lang=en&pg=).
## Example Usage
{{< chooser language "typescript,python,go,csharp,java,yaml" >}}
{{% choosable language typescript %}}
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: nodejs
config:
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
```typescript
Example currently unavailable in this language
```
{{% /choosable %}}
{{% choosable language python %}}
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: python
config:
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
```python
Example currently unavailable in this language
```
{{% /choosable %}}
{{% choosable language csharp %}}
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: dotnet
config:
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
```csharp
Example currently unavailable in this language
```
{{% /choosable %}}
{{% choosable language go %}}
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: go
config:
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
```go
Example currently unavailable in this language
```
{{% /choosable %}}
{{% choosable language yaml %}}
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: yaml
config:
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
```yaml
Example currently unavailable in this language
```
{{% /choosable %}}
{{% choosable language java %}}
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: java
config:
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
```java
Example currently unavailable in this language
```
{{% /choosable %}}
{{< /chooser >}}
## Authentication
The TencentCloud provider offers a flexible means of providing credentials for authentication.
The following methods are supported, in this order, and explained below:
- Static credentials
- Environment variables
- Assume role
- Assume role with SAML
- Assume role with OIDC
- Shared credentials
- Enable pod OIDC
- Cam role name
- MFA certification
### Static credentials
!> **Warning:** Hard-coding credentials into any Pulumi configuration is not
recommended, and risks secret leakage should this file ever be committed to a
public version control system.
Static credentials can be provided by adding an `secretId` `secretKey` and `region` in-line in the tencentcloud provider configuration:
Usage:
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
config:
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
Use `allowedAccountIds` or `forbiddenAccountIds`
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
config:
tencentcloud:allowedAccountIds:
value:
- "100023201586"
- "100023201349"
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
config:
tencentcloud:forbiddenAccountIds:
value:
- "100023201223"
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
### Environment variables
You can provide your credentials via `TENCENTCLOUD_SECRET_ID` and `TENCENTCLOUD_SECRET_KEY` environment variables,
representing your TencentCloud Secret Id and Secret Key respectively. `TENCENTCLOUD_REGION` is also used, if applicable:
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
```
Usage:
```shell
$ export TENCENTCLOUD_SECRET_ID="my-secret-id"
$ export TENCENTCLOUD_SECRET_KEY="my-secret-key"
$ export TENCENTCLOUD_REGION="ap-guangzhou"
$ pulumi preview
```
### Assume role
If provided with an assume role, Pulumi will attempt to assume this role using the supplied credentials. Assume role can be provided by adding an `roleArn`, `sessionName`, `sessionDuration`, `policy`(optional) and `externalId`(optional) in-line in the tencentcloud provider configuration:
Usage:
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
config:
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
Combining MFA
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
config:
tencentcloud:region:
value: ap-guangzhou
tencentcloud:secretId:
value: my-secret-id
tencentcloud:secretKey:
value: my-secret-key
```
The `roleArn`, `sessionName`, `sessionDuration` and `externalId` can also provided via `TENCENTCLOUD_ASSUME_ROLE_ARN`, `TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME`, `TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION` and `TENCENTCLOUD_ASSUME_ROLE_EXTERNAL_ID` environment variables.
The `serialNumber`, `tokenCode` can also provided via `TENCENTCLOUD_ASSUME_ROLE_SERIAL_NUMBER`, `TENCENTCLOUD_ASSUME_ROLE_TOKEN_CODE` environment variables.
Usage:
```shell
$ export TENCENTCLOUD_SECRET_ID="my-secret-id"
$ export TENCENTCLOUD_SECRET_KEY="my-secret-key"
$ export TENCENTCLOUD_REGION="ap-guangzhou"
$ export TENCENTCLOUD_ASSUME_ROLE_ARN="my-role-arn"
$ export TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME="my-session-name"
$ export TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION=3600
$ export TENCENTCLOUD_ASSUME_ROLE_SERIAL_NUMBER="my-serial-number"
$ export TENCENTCLOUD_ASSUME_ROLE_TOKEN_CODE="my-token-code"
$ pulumi preview
```
### Assume role with SAML
If provided with an assume role with SAML, Pulumi will attempt to assume this role using the supplied credentials. Assume role can be provided by adding an `roleArn`, `sessionName`, `sessionDuration`, `samlAssertion` and `principalArn` in-line in the tencentcloud provider configuration:
> **Note:** Assume-role-with-SAML is a no-AK auth type, and there is no need setting secretId and secretKey while using it.
Usage:
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
```
The `roleArn`, `sessionName`, `sessionDuration`, `samlAssertion`, `principalArn` can also provided via `TENCENTCLOUD_ASSUME_ROLE_ARN`, `TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME`, `TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION`, `TENCENTCLOUD_ASSUME_ROLE_SAML_ASSERTION` and `TENCENTCLOUD_ASSUME_ROLE_PRINCIPAL_ARN` environment variables.
Usage:
```shell
$ export TENCENTCLOUD_ASSUME_ROLE_ARN="my-role-arn"
$ export TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME="my-session-name"
$ export TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION=3600
$ export TENCENTCLOUD_ASSUME_ROLE_SAML_ASSERTION="my-saml-assertion"
$ export TENCENTCLOUD_ASSUME_ROLE_PRINCIPAL_ARN="my-principal-arn"
$ pulumi preview
```
### Assume role with OIDC
If provided with an assume role with OIDC, Pulumi will attempt to assume this role using the supplied credentials. Assume role can be provided by adding an `roleArn` or `roleArnFile`, `sessionName`, `sessionDuration` and `webIdentityToken` or `webIdentityTokenFile` in-line in the tencentcloud provider configuration:
> **Note:** Assume-role-with-OIDC is a no-AK auth type, and there is no need setting secretId and secretKey while using it.
> **Note:** If both `webIdentityToken` and `webIdentityTokenFile` are configured, `webIdentityToken` will be used preferentially(overriding `webIdentityTokenFile`).
> **Note:** If both `roleArn` and `roleArnFile` are configured, `roleArn` will be used preferentially(overriding `roleArnFile`).
Content formatting guidelines of `webIdentityTokenFile`:
The file content must be in JSON format and must contain the key: `webIdentityToken`.
```json
{
"web_identity_token": "eyJ0eXAiOiJKV1QiLCJh......E8T0qyVA7hWM55_g"
}
```
Content formatting guidelines of `roleArnFile`:
The file content must be in JSON format and must contain the key: `roleArn`.
```json
{
"role_arn": "my-role-arn"
}
```
Usage:
Use webIdentityToken
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
```
Use webIdentityTokenFile
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
```
Use roleArnFile
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
```
The `providerId`, `roleArn`, `roleArnFile`, `sessionName`, `sessionDuration`, `webIdentityToken`, `webIdentityTokenFile` can also provided via `TENCENTCLOUD_ASSUME_ROLE_PROVIDER_ID`, `TENCENTCLOUD_ASSUME_ROLE_ARN`, `TENCENTCLOUD_ASSUME_ROLE_ARN_FILE`, `TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME`, `TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION`, `TENCENTCLOUD_ASSUME_ROLE_WEB_IDENTITY_TOKEN` and `TENCENTCLOUD_ASSUME_ROLE_WEB_IDENTITY_TOKEN_FILE` environment variables.
Usage:
```shell
$ export TENCENTCLOUD_SECRET_ID="my-secret-id"
$ export TENCENTCLOUD_SECRET_KEY="my-secret-key"
$ export TENCENTCLOUD_ASSUME_ROLE_ARN="my-role-arn"
$ export TENCENTCLOUD_ASSUME_ROLE_ARNN_FILE="/AbsolutePath/to/your/secrets/role-arn-file"
$ export TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION=3600
$ export TENCENTCLOUD_ASSUME_ROLE_WEB_IDENTITY_TOKEN="my-web-identity-token"
$ export TENCENTCLOUD_ASSUME_ROLE_WEB_IDENTITY_TOKEN_FILE="/AbsolutePath/to/your/secrets/web-identity-token-file"
$ export TENCENTCLOUD_ASSUME_ROLE_PROVIDER_ID="OIDC"
$ pulumi preview
```
### Enable pod OIDC
Configure the TencentCloud Provider with TKE OIDC.
> **Note:** Must ensure CAM OIDC provider and WEBHOOK component are created successfully.
Usage:
```yaml
# Pulumi.yaml provider configuration file
name: configuration-example
runtime:
config:
… truncated to 400 of 735 linesChecked PR head ea265777e01b · full run & command output
Contributor
|
Your site preview for commit 054cf02 is ready! 🎉 http://registry--origin-pr-13763-054cf022.s3-website.us-west-2.amazonaws.com/registry/ Changed pages: |
Contributor
|
Site previews for this pull request have been removed. ✨ |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.