The Volcengine Cloud Control Provider enables interaction with various Volcengine-supported resources through the Cloud Control API. Prior to usage, you must configure the provider with appropriate credentials.
Use the left navigation panel to explore available resource documentation. If you cannot find the desired resource, please submit an issue report for assistance.
NOTE:
The Volcengine Cloud Control provider requires the use of Terraform 1.0.7 or later.
This guide requires an available Volcengine account or sub-account to create resources.
Network Mirror Configuration
If you experience slow provider downloads, you can configure a network mirror to accelerate the process. Add the following configuration to your Terraform CLI configuration file:
Linux & macOS
Create or edit the ~/.terraformrc file:
provider_installation {
network_mirror {
url = "https://mirrors.volces.com/terraform/terraformcc/"
include = ["registry.terraform.io/volcengine/volcenginecc"]
}
direct {
exclude = ["registry.terraform.io/volcengine/volcenginecc"]
}
}
Windows
Create or edit the %APPDATA%\terraform.rc file:
provider_installation {
network_mirror {
url = "https://mirrors.volces.com/terraform/terraformcc/"
include = ["registry.terraform.io/volcengine/volcenginecc"]
}
direct {
exclude = ["registry.terraform.io/volcengine/volcenginecc"]
}
}
NOTE: The direct block with exclude ensures that only the volcenginecc provider is fetched from the mirror, while other providers continue to be downloaded directly from the Terraform registry.
The Volcenginecc provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below:
Static credentials
Static credentials can be provided by adding an public_key and private_key in-line in the volcengine provider block:
Warning:
Hard-coded credentials are not recommended in any Terraform configuration and risks secret leakage should this file ever be committed to a public version control system.
Authentication Priority and Requirements:
AK/SK Authentication: The access_key and secret_key parameters have the highest priority for authentication.
Profile Authentication: The profile parameter can be used as an alternative authentication method.
Validation Rules:
At least one authentication method must be provided: either access_key/secret_key OR profile
If both AK/SK and Profile are provided, AK/SK authentication takes precedence over Profile authentication
The file_path parameter is optional. If not specified, the default path ~/.volcengine will be used to locate the profile configuration file
Usage:
provider "volcenginecc" {
access_key = "your ak"
secret_key = "your sk"
region = "cn-beijing"
profile = "your profile"
file_path = "" # if empty, default path is ~/.volcengine
}
Environment variables
You can provide your credentials via VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY environment variables, representing your volcengine public key and private key respectively. VOLCENGINE_REGION, VOLCENGINE_PROFILE, and VOLCENGINE_FILE_PATH are also used, if applicable:
access_key (String) The Access Key for Volcengine Provider. It must be provided, but it can also be sourced from the VOLCENGINE_ACCESS_KEY environment variable
secret_key (String) he Secret Key for Volcengine Provider. It must be provided, but it can also be sourced from the VOLCENGINE_SECRET_KEY environment variable
profile (String) The Profile for Volcengine Provider. It can be used as an alternative authentication method to AK/SK, and can also be sourced from the VOLCENGINE_PROFILE environment variable
file_path (String) The File Path for Volcengine Provider. It specifies the path to the profile configuration file. If not specified, the default path ~/.volcengine will be used, and can also be sourced from the VOLCENGINE_FILE_PATH environment variable
assume_role (Attributes) An assume_role block (documented below). Only one assume_role block may be in the configuration. (see below for nested schema)
customer_headers (String) CUSTOMER HEADERS for Volcengine Provider. The customer_headers field uses commas (,) to separate multiple headers, and colons (:) to separate each header key from its corresponding value.
disable_ssl (Boolean) Disable SSL for Volcengine Provider
endpoints (Attributes) An endpoints block (documented below). Only one endpoints block may be in the configuration. (see below for nested schema)
proxy_url (String) PROXY URL for Volcengine Provider
region (String) The Region for Volcengine Provider. It must be provided, but it can also be sourced from the VOLCENGINE_REGION environment variable
Nested Schema for assume_role
Required:
assume_role_session_name (String) The session name to use when making the AssumeRole call.
assume_role_trn (String) he TRN of the role to assume.
duration_seconds (Number) The duration of the session when making the AssumeRole call. Its value ranges from 900 to 43200(seconds), and default is 3600 seconds.
Optional:
policy (String) A more restrictive policy when making the AssumeRole call
Nested Schema for endpoints
Optional:
cloudcontrolapi (String) Use this to override the default Cloud Control API service endpoint URL
sts (String) Use this to override the default STS service endpoint URL
Volcengine Cloud Control Provider
The Volcengine Cloud Control Provider enables interaction with various Volcengine-supported resources through the Cloud Control API. Prior to usage, you must configure the provider with appropriate credentials.
Use the left navigation panel to explore available resource documentation. If you cannot find the desired resource, please submit an issue report for assistance.
Network Mirror Configuration
If you experience slow provider downloads, you can configure a network mirror to accelerate the process. Add the following configuration to your Terraform CLI configuration file:
Linux & macOS
Create or edit the
~/.terraformrcfile:Windows
Create or edit the
%APPDATA%\terraform.rcfile:Example Usage
Terraform 1.0.7 and later:
Authentication
The Volcenginecc provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below:
Static credentials
Static credentials can be provided by adding an public_key and private_key in-line in the volcengine provider block:
Authentication Priority and Requirements:
access_keyandsecret_keyparameters have the highest priority for authentication.profileparameter can be used as an alternative authentication method.access_key/secret_keyORprofilefile_pathparameter is optional. If not specified, the default path~/.volcenginewill be used to locate the profile configuration fileUsage:
Environment variables
You can provide your credentials via VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY environment variables, representing your volcengine public key and private key respectively. VOLCENGINE_REGION, VOLCENGINE_PROFILE, and VOLCENGINE_FILE_PATH are also used, if applicable:
Usage:
Schema
Optional
access_key(String) The Access Key for Volcengine Provider. It must be provided, but it can also be sourced from theVOLCENGINE_ACCESS_KEYenvironment variablesecret_key(String) he Secret Key for Volcengine Provider. It must be provided, but it can also be sourced from theVOLCENGINE_SECRET_KEYenvironment variableprofile(String) The Profile for Volcengine Provider. It can be used as an alternative authentication method to AK/SK, and can also be sourced from theVOLCENGINE_PROFILEenvironment variablefile_path(String) The File Path for Volcengine Provider. It specifies the path to the profile configuration file. If not specified, the default path~/.volcenginewill be used, and can also be sourced from theVOLCENGINE_FILE_PATHenvironment variableassume_role(Attributes) Anassume_roleblock (documented below). Only oneassume_roleblock may be in the configuration. (see below for nested schema)customer_headers(String) CUSTOMER HEADERS for Volcengine Provider. The customer_headers field uses commas (,) to separate multiple headers, and colons (:) to separate each header key from its corresponding value.disable_ssl(Boolean) Disable SSL for Volcengine Providerendpoints(Attributes) Anendpointsblock (documented below). Only oneendpointsblock may be in the configuration. (see below for nested schema)proxy_url(String) PROXY URL for Volcengine Providerregion(String) The Region for Volcengine Provider. It must be provided, but it can also be sourced from theVOLCENGINE_REGIONenvironment variableNested Schema for
assume_roleRequired:
assume_role_session_name(String) The session name to use when making the AssumeRole call.assume_role_trn(String) he TRN of the role to assume.duration_seconds(Number) The duration of the session when making the AssumeRole call. Its value ranges from 900 to 43200(seconds), and default is 3600 seconds.Optional:
policy(String) A more restrictive policy when making the AssumeRole callNested Schema for
endpointsOptional:
cloudcontrolapi(String) Use this to override the default Cloud Control API service endpoint URLsts(String) Use this to override the default STS service endpoint URL