Terraform
Go: Structs
AppConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.AppConfig {
Context: *map[string]interface{},
HclOutput: *bool,
Outdir: *string,
SkipBackendValidation: *bool,
SkipValidation: *bool,
StackTraces: *bool,
}
Properties
Name | Type | Description |
---|---|---|
Context | *map[string]interface{} | Additional context values for the application. |
HclOutput | *bool | No description. |
Outdir | *string | The directory to output Terraform resources. |
SkipBackendValidation | *bool | Whether to skip backend validation during synthesis of the app. |
SkipValidation | *bool | Whether to skip all validations during synthesis of the app. |
StackTraces | *bool | No description. |
Context
Optional
Context *map[string]interface{}
- Type: *map[string]interface{}
- Default: no additional context
Additional context values for the application.
Context set by the CLI or the context
key in cdktf.json
has precedence.
Context can be read from any construct using node.getContext(key)
.
HclOutput
Optional
HclOutput *bool
- Type: *bool
Outdir
Optional
Outdir *string
- Type: *string
- Default: CDKTF_OUTDIR if defined, otherwise "cdktf.out"
The directory to output Terraform resources.
If you are using the CDKTF CLI, this value is automatically set from one of the following three sources:
- The
-o
/--output
CLI option - The
CDKTF_OUTDIR
environment variable - The
outdir
key incdktf.json
If you are using the CDKTF CLI and want to set a different value here, you will also need to set the same value via one of the three ways specified above.
The most common case to set this value is when you are using the CDKTF library directly (e.g. when writing unit tests).
SkipBackendValidation
Optional
SkipBackendValidation *bool
- Type: *bool
- Default: false
Whether to skip backend validation during synthesis of the app.
SkipValidation
Optional
SkipValidation *bool
- Type: *bool
- Default: false
Whether to skip all validations during synthesis of the app.
StackTraces
Optional
StackTraces *bool
- Type: *bool
AzurermBackendConfig
Stores the state as a Blob with the given Key within the Blob Container within the Blob Storage Account.
This backend supports state locking and consistency checking with Azure Blob Storage native capabilities.
Note: By default the Azure Backend uses ADAL for authentication which is deprecated in favour of MSAL - MSAL can be used by setting use_microsoft_graph to true. The default for this will change in Terraform 1.2, so that MSAL authentication is used by default.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/azurerm
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.AzurermBackendConfig {
ContainerName: *string,
Key: *string,
StorageAccountName: *string,
AccessKey: *string,
ClientCertificatePassword: *string,
ClientCertificatePath: *string,
ClientId: *string,
ClientSecret: *string,
Endpoint: *string,
Environment: *string,
MetadataHost: *string,
MsiEndpoint: *string,
OidcRequestToken: *string,
OidcRequestUrl: *string,
OidcToken: *string,
OidcTokenFilePath: *string,
ResourceGroupName: *string,
SasToken: *string,
Snapshot: *bool,
SubscriptionId: *string,
TenantId: *string,
UseAzureadAuth: *bool,
UseMicrosoftGraph: *bool,
UseMsi: *bool,
UseOidc: *bool,
}
Properties
Name | Type | Description |
---|---|---|
ContainerName | *string | (Required) The Name of the Storage Container within the Storage Account. |
Key | *string | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
StorageAccountName | *string | (Required) The Name of the Storage Account. |
AccessKey | *string | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
ClientCertificatePassword | *string | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
ClientCertificatePath | *string | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
ClientId | *string | (Optional) The Client ID of the Service Principal. |
ClientSecret | *string | (Optional) The Client Secret of the Service Principal. |
Endpoint | *string | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
Environment | *string | (Optional) The Azure Environment which should be used. |
MetadataHost | *string | (Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.). |
MsiEndpoint | *string | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
OidcRequestToken | *string | (Optional) The bearer token for the request to the OIDC provider. |
OidcRequestUrl | *string | (Optional) The URL for the OIDC provider from which to request an ID token. |
OidcToken | *string | (Optional) The ID token when authenticating using OpenID Connect (OIDC). |
OidcTokenFilePath | *string | (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). |
ResourceGroupName | *string | (Required) The Name of the Resource Group in which the Storage Account exists. |
SasToken | *string | (Optional) The SAS Token used to access the Blob Storage Account. |
Snapshot | *bool | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
SubscriptionId | *string | (Optional) The Subscription ID in which the Storage Account exists. |
TenantId | *string | (Optional) The Tenant ID in which the Subscription exists. |
UseAzureadAuth | *bool | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
UseMicrosoftGraph | *bool | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
UseMsi | *bool | (Optional) Should Managed Service Identity authentication be used? |
UseOidc | *bool | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
ContainerName
Required
ContainerName *string
- Type: *string
(Required) The Name of the Storage Container within the Storage Account.
Key
Required
Key *string
- Type: *string
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
StorageAccountName
Required
StorageAccountName *string
- Type: *string
(Required) The Name of the Storage Account.
AccessKey
Optional
AccessKey *string
- Type: *string
access_key - (Optional) The Access Key used to access the Blob Storage Account.
This can also be sourced from the ARM_ACCESS_KEY environment variable.
ClientCertificatePassword
Optional
ClientCertificatePassword *string
- Type: *string
(Optional) The password associated with the Client Certificate specified in client_certificate_path.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PASSWORD environment variable.
ClientCertificatePath
Optional
ClientCertificatePath *string
- Type: *string
(Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PATH environment variable.
ClientId
Optional
ClientId *string
- Type: *string
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
ClientSecret
Optional
ClientSecret *string
- Type: *string
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
Endpoint
Optional
Endpoint *string
- Type: *string
(Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable.
NOTE: An endpoint should only be configured when using Azure Stack.
Environment
Optional
Environment *string
- Type: *string
(Optional) The Azure Environment which should be used.
This can also be sourced from the ARM_ENVIRONMENT environment variable. Possible values are public, china, german, stack and usgovernment. Defaults to public.
MetadataHost
Optional
MetadataHost *string
- Type: *string
(Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.).
MsiEndpoint
Optional
MsiEndpoint *string
- Type: *string
(Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified.
This can also be sourced from the ARM_MSI_ENDPOINT environment variable.
OidcRequestToken
Optional
OidcRequestToken *string
- Type: *string
(Optional) The bearer token for the request to the OIDC provider.
This can also be sourced from the ARM_OIDC_REQUEST_TOKEN or ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables.
OidcRequestUrl
Optional
OidcRequestUrl *string
- Type: *string
(Optional) The URL for the OIDC provider from which to request an ID token.
This can also be sourced from the ARM_OIDC_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_URL environment variables.
OidcToken
Optional
OidcToken *string
- Type: *string
(Optional) The ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN environment variable.
OidcTokenFilePath
Optional
OidcTokenFilePath *string
- Type: *string
(Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN_FILE_PATH environment variable.
ResourceGroupName
Optional
ResourceGroupName *string
- Type: *string
(Required) The Name of the Resource Group in which the Storage Account exists.
SasToken
Optional
SasToken *string
- Type: *string
(Optional) The SAS Token used to access the Blob Storage Account.
This can also be sourced from the ARM_SAS_TOKEN environment variable.
Snapshot
Optional
Snapshot *bool
- Type: *bool
(Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?
Defaults to false. This value can also be sourced from the ARM_SNAPSHOT environment variable.
SubscriptionId
Optional
SubscriptionId *string
- Type: *string
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
TenantId
Optional
TenantId *string
- Type: *string
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
UseAzureadAuth
Optional
UseAzureadAuth *bool
- Type: *bool
(Optional) Should AzureAD Authentication be used to access the Blob Storage Account.
This can also be sourced from the ARM_USE_AZUREAD environment variable.
Note: When using AzureAD for Authentication to Storage you also need to ensure the Storage Blob Data Owner role is assigned.
UseMicrosoftGraph
Optional
UseMicrosoftGraph *bool
- Type: *bool
(Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?
Defaults to true.
Note: In Terraform 1.2 the Azure Backend uses MSAL (and Microsoft Graph) rather than ADAL (and Azure Active Directory Graph) for authentication by default - you can disable this by setting use_microsoft_graph to false. This setting will be removed in Terraform 1.3, due to Microsoft's deprecation of ADAL.
UseMsi
Optional
UseMsi *bool
- Type: *bool
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
UseOidc
Optional
UseOidc *bool
- Type: *bool
(Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable.
Note: When using OIDC for authentication, use_microsoft_graph must be set to true (which is the default).
CloudBackendConfig
The Cloud Backend synthesizes a {@link https://developer.hashicorp.com/terraform/cli/cloud/settings#the-cloud-block cloud block}. The cloud block is a nested block within the top-level terraform settings block. It specifies which Terraform Cloud workspaces to use for the current working directory. The cloud block only affects Terraform CLI's behavior. When Terraform Cloud uses a configuration that contains a cloud block - for example, when a workspace is configured to use a VCS provider directly - it ignores the block and behaves according to its own workspace settings.
https://developer.hashicorp.com/terraform/cli/cloud/settings#arguments
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.CloudBackendConfig {
Organization: *string,
Workspaces: interface{},
Hostname: *string,
Token: *string,
}
Properties
Name | Type | Description |
---|---|---|
Organization | *string | The name of the organization containing the workspace(s) the current configuration should use. |
Workspaces | interface{} | A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration. |
Hostname | *string | The hostname of a Terraform Enterprise installation, if using Terraform Enterprise. |
Token | *string | The token used to authenticate with Terraform Cloud. |
Organization
Required
Organization *string
- Type: *string
The name of the organization containing the workspace(s) the current configuration should use.
Workspaces
Required
Workspaces interface{}
- Type: interface{}
A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration.
The workspaces block must contain exactly one of the following arguments, each denoting a strategy for how workspaces should be mapped:
Hostname
Optional
Hostname *string
- Type: *string
- Default: app.terraform.io
The hostname of a Terraform Enterprise installation, if using Terraform Enterprise.
Token
Optional
Token *string
- Type: *string
The token used to authenticate with Terraform Cloud.
We recommend omitting the token from the configuration, and instead using terraform login or manually configuring credentials in the CLI config file.
ConsulBackendConfig
Stores the state in the Consul KV store at a given path. This backend supports state locking.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/consul
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.ConsulBackendConfig {
AccessToken: *string,
Path: *string,
Address: *string,
CaFile: *string,
CertFile: *string,
Datacenter: *string,
Gzip: *bool,
HttpAuth: *string,
KeyFile: *string,
Lock: *bool,
Scheme: *string,
}
Properties
Name | Type | Description |
---|---|---|
AccessToken | *string | (Required) Access token. |
Path | *string | (Required) Path in the Consul KV store. |
Address | *string | (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. |
CaFile | *string | (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. |
CertFile | *string | (Optional) A path to a PEM-encoded certificate provided to the remote agent; |
Datacenter | *string | (Optional) The datacenter to use. |
Gzip | *bool | (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. |
HttpAuth | *string | (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. |
KeyFile | *string | (Optional) A path to a PEM-encoded private key, required if cert_file is specified. |
Lock | *bool | (Optional) false to disable locking. |
Scheme | *string | (Optional) Specifies what protocol to use when talking to the given address,either http or https. |
AccessToken
Required
AccessToken *string
- Type: *string
(Required) Access token.
Path
Required
Path *string
- Type: *string
(Required) Path in the Consul KV store.
Address
Optional
Address *string
- Type: *string
(Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
Defaults to the local agent HTTP listener.
CaFile
Optional
CaFile *string
- Type: *string
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
CertFile
Optional
CertFile *string
- Type: *string
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
Datacenter
Optional
Datacenter *string
- Type: *string
(Optional) The datacenter to use.
Defaults to that of the agent.
Gzip
Optional
Gzip *bool
- Type: *bool
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
HttpAuth
Optional
HttpAuth *string
- Type: *string
(Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
KeyFile
Optional
KeyFile *string
- Type: *string
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
Lock
Optional
Lock *bool
- Type: *bool
(Optional) false to disable locking.
This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.
Scheme
Optional
Scheme *string
- Type: *string
(Optional) Specifies what protocol to use when talking to the given address,either http or https.
SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.
CosBackendAssumeRole
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.CosBackendAssumeRole {
RoleArn: *string,
SessionDuration: *f64,
SessionName: *string,
Policy: interface{},
}
Properties
Name | Type | Description |
---|---|---|
RoleArn | *string | (Required) The ARN of the role to assume. |
SessionDuration | *f64 | (Required) The duration of the session when making the AssumeRole call. |
SessionName | *string | (Required) The session name to use when making the AssumeRole call. |
Policy | interface{} | (Optional) A more restrictive policy when making the AssumeRole call. |
RoleArn
Required
RoleArn *string
- Type: *string
(Required) The ARN of the role to assume.
It can be sourced from the TENCENTCLOUD_ASSUME_ROLE_ARN.
SessionDuration
Required
SessionDuration *f64
- Type: *f64
(Required) The duration of the session when making the AssumeRole call.
Its value ranges from 0 to 43200(seconds), and default is 7200 seconds. It can be sourced from the TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION.
SessionName
Required
SessionName *string
- Type: *string
(Required) The session name to use when making the AssumeRole call.
It can be sourced from the TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME.
Policy
Optional
Policy interface{}
- Type: interface{}
(Optional) A more restrictive policy when making the AssumeRole call.
Its content must not contains principal elements. Please refer to {@link https://www.tencentcloud.com/document/product/598/10603 policies syntax logic}.
CosBackendConfig
Stores the state as an object in a configurable prefix in a given bucket on Tencent Cloud Object Storage (COS).
This backend supports state locking.
Warning! It is highly recommended that you enable Object Versioning on the COS bucket to allow for state recovery in the case of accidental deletions and human error.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/cos
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.CosBackendConfig {
Bucket: *string,
Accelerate: *bool,
Acl: *string,
AssumeRole: github.com/hashicorp/terraform-cdk-go/cdktf.CosBackendAssumeRole,
Domain: *string,
Encrypt: *bool,
Endpoint: *string,
Key: *string,
Prefix: *string,
Region: *string,
SecretId: *string,
SecretKey: *string,
SecurityToken: *string,
}
Properties
Name | Type | Description |
---|---|---|
Bucket | *string | (Required) The name of the COS bucket. |
Accelerate | *bool | (Optional) Whether to enable global Acceleration. |
Acl | *string | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
AssumeRole | CosBackendAssumeRole | (Optional) The assume_role block. |
Domain | *string | (Optional) The root domain of the API request. |
Encrypt | *bool | (Optional) Whether to enable server side encryption of the state file. |
Endpoint | *string | (Optional) The Custom Endpoint for the COS backend. |
Key | *string | (Optional) The path for saving the state file in bucket. |
Prefix | *string | (Optional) The directory for saving the state file in bucket. |
Region | *string | (Optional) The region of the COS bucket. |
SecretId | *string | (Optional) Secret id of Tencent Cloud. |
SecretKey | *string | (Optional) Secret key of Tencent Cloud. |
SecurityToken | *string | (Optional) TencentCloud Security Token of temporary access credentials. |
Bucket
Required
Bucket *string
- Type: *string
(Required) The name of the COS bucket.
You shall manually create it first.
Accelerate
Optional
Accelerate *bool
- Type: *bool
(Optional) Whether to enable global Acceleration.
Defaults to false.
Acl
Optional
Acl *string
- Type: *string
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
AssumeRole
Optional
AssumeRole CosBackendAssumeRole
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
Domain
Optional
Domain *string
- Type: *string
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
Encrypt
Optional
Encrypt *bool
- Type: *bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.
Endpoint
Optional
Endpoint *string
- Type: *string
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
Key
Optional
Key *string
- Type: *string
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
Prefix
Optional
Prefix *string
- Type: *string
(Optional) The directory for saving the state file in bucket.
Default to "env:".
Region
Optional
Region *string
- Type: *string
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
SecretId
Optional
SecretId *string
- Type: *string
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
SecretKey
Optional
SecretKey *string
- Type: *string
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
SecurityToken
Optional
SecurityToken *string
- Type: *string
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
DataConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataConfig {
Connection: interface{},
Count: interface{},
DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable,
ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator,
Lifecycle: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformResourceLifecycle,
Provider: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider,
Provisioners: *[]interface{},
Input: *map[string]interface{},
TriggersReplace: *map[string]interface{},
}
Properties
Name | Type | Description |
---|---|---|
Connection | interface{} | No description. |
Count | interface{} | No description. |
DependsOn | *[]ITerraformDependable | No description. |
ForEach | ITerraformIterator | No description. |
Lifecycle | TerraformResourceLifecycle | No description. |
Provider | TerraformProvider | No description. |
Provisioners | *[]interface{} | No description. |
Input | *map[string]interface{} | (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. |
TriggersReplace | *map[string]interface{} | (Optional) A value which is stored in the instance state, and will force replacement when the value changes. |
Connection
Optional
Connection interface{}
- Type: interface{}
Count
Optional
Count interface{}
- Type: interface{}
DependsOn
Optional
DependsOn *[]ITerraformDependable
- Type: *[]ITerraformDependable
ForEach
Optional
ForEach ITerraformIterator
- Type: ITerraformIterator
Lifecycle
Optional
Lifecycle TerraformResourceLifecycle
Provider
Optional
Provider TerraformProvider
- Type: TerraformProvider
Provisioners
Optional
Provisioners *[]interface{}
- Type: *[]interface{}
Input
Optional
Input *map[string]interface{}
- Type: *map[string]interface{}
(Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#input
TriggersReplace
Optional
TriggersReplace *map[string]interface{}
- Type: *map[string]interface{}
(Optional) A value which is stored in the instance state, and will force replacement when the value changes.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace
DataTerraformRemoteStateAzurermConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateAzurermConfig {
Defaults: *map[string]interface{},
Workspace: *string,
ContainerName: *string,
Key: *string,
StorageAccountName: *string,
AccessKey: *string,
ClientCertificatePassword: *string,
ClientCertificatePath: *string,
ClientId: *string,
ClientSecret: *string,
Endpoint: *string,
Environment: *string,
MetadataHost: *string,
MsiEndpoint: *string,
OidcRequestToken: *string,
OidcRequestUrl: *string,
OidcToken: *string,
OidcTokenFilePath: *string,
ResourceGroupName: *string,
SasToken: *string,
Snapshot: *bool,
SubscriptionId: *string,
TenantId: *string,
UseAzureadAuth: *bool,
UseMicrosoftGraph: *bool,
UseMsi: *bool,
UseOidc: *bool,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
ContainerName | *string | (Required) The Name of the Storage Container within the Storage Account. |
Key | *string | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
StorageAccountName | *string | (Required) The Name of the Storage Account. |
AccessKey | *string | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
ClientCertificatePassword | *string | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
ClientCertificatePath | *string | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
ClientId | *string | (Optional) The Client ID of the Service Principal. |
ClientSecret | *string | (Optional) The Client Secret of the Service Principal. |
Endpoint | *string | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
Environment | *string | (Optional) The Azure Environment which should be used. |
MetadataHost | *string | (Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.). |
MsiEndpoint | *string | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
OidcRequestToken | *string | (Optional) The bearer token for the request to the OIDC provider. |
OidcRequestUrl | *string | (Optional) The URL for the OIDC provider from which to request an ID token. |
OidcToken | *string | (Optional) The ID token when authenticating using OpenID Connect (OIDC). |
OidcTokenFilePath | *string | (Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). |
ResourceGroupName | *string | (Required) The Name of the Resource Group in which the Storage Account exists. |
SasToken | *string | (Optional) The SAS Token used to access the Blob Storage Account. |
Snapshot | *bool | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
SubscriptionId | *string | (Optional) The Subscription ID in which the Storage Account exists. |
TenantId | *string | (Optional) The Tenant ID in which the Subscription exists. |
UseAzureadAuth | *bool | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
UseMicrosoftGraph | *bool | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
UseMsi | *bool | (Optional) Should Managed Service Identity authentication be used? |
UseOidc | *bool | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
ContainerName
Required
ContainerName *string
- Type: *string
(Required) The Name of the Storage Container within the Storage Account.
Key
Required
Key *string
- Type: *string
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
StorageAccountName
Required
StorageAccountName *string
- Type: *string
(Required) The Name of the Storage Account.
AccessKey
Optional
AccessKey *string
- Type: *string
access_key - (Optional) The Access Key used to access the Blob Storage Account.
This can also be sourced from the ARM_ACCESS_KEY environment variable.
ClientCertificatePassword
Optional
ClientCertificatePassword *string
- Type: *string
(Optional) The password associated with the Client Certificate specified in client_certificate_path.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PASSWORD environment variable.
ClientCertificatePath
Optional
ClientCertificatePath *string
- Type: *string
(Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PATH environment variable.
ClientId
Optional
ClientId *string
- Type: *string
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
ClientSecret
Optional
ClientSecret *string
- Type: *string
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
Endpoint
Optional
Endpoint *string
- Type: *string
(Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable.
NOTE: An endpoint should only be configured when using Azure Stack.
Environment
Optional
Environment *string
- Type: *string
(Optional) The Azure Environment which should be used.
This can also be sourced from the ARM_ENVIRONMENT environment variable. Possible values are public, china, german, stack and usgovernment. Defaults to public.
MetadataHost
Optional
MetadataHost *string
- Type: *string
(Optional) The Hostname of the Azure Metadata Service (for example management.azure.com), used to obtain the Cloud Environment when using a Custom Azure Environment. This can also be sourced from the ARM_METADATA_HOSTNAME Environment Variable.).
MsiEndpoint
Optional
MsiEndpoint *string
- Type: *string
(Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified.
This can also be sourced from the ARM_MSI_ENDPOINT environment variable.
OidcRequestToken
Optional
OidcRequestToken *string
- Type: *string
(Optional) The bearer token for the request to the OIDC provider.
This can also be sourced from the ARM_OIDC_REQUEST_TOKEN or ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables.
OidcRequestUrl
Optional
OidcRequestUrl *string
- Type: *string
(Optional) The URL for the OIDC provider from which to request an ID token.
This can also be sourced from the ARM_OIDC_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_URL environment variables.
OidcToken
Optional
OidcToken *string
- Type: *string
(Optional) The ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN environment variable.
OidcTokenFilePath
Optional
OidcTokenFilePath *string
- Type: *string
(Optional) The path to a file containing an ID token when authenticating using OpenID Connect (OIDC).
This can also be sourced from the ARM_OIDC_TOKEN_FILE_PATH environment variable.
ResourceGroupName
Optional
ResourceGroupName *string
- Type: *string
(Required) The Name of the Resource Group in which the Storage Account exists.
SasToken
Optional
SasToken *string
- Type: *string
(Optional) The SAS Token used to access the Blob Storage Account.
This can also be sourced from the ARM_SAS_TOKEN environment variable.
Snapshot
Optional
Snapshot *bool
- Type: *bool
(Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?
Defaults to false. This value can also be sourced from the ARM_SNAPSHOT environment variable.
SubscriptionId
Optional
SubscriptionId *string
- Type: *string
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
TenantId
Optional
TenantId *string
- Type: *string
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
UseAzureadAuth
Optional
UseAzureadAuth *bool
- Type: *bool
(Optional) Should AzureAD Authentication be used to access the Blob Storage Account.
This can also be sourced from the ARM_USE_AZUREAD environment variable.
Note: When using AzureAD for Authentication to Storage you also need to ensure the Storage Blob Data Owner role is assigned.
UseMicrosoftGraph
Optional
UseMicrosoftGraph *bool
- Type: *bool
(Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?
Defaults to true.
Note: In Terraform 1.2 the Azure Backend uses MSAL (and Microsoft Graph) rather than ADAL (and Azure Active Directory Graph) for authentication by default - you can disable this by setting use_microsoft_graph to false. This setting will be removed in Terraform 1.3, due to Microsoft's deprecation of ADAL.
UseMsi
Optional
UseMsi *bool
- Type: *bool
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
UseOidc
Optional
UseOidc *bool
- Type: *bool
(Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable.
Note: When using OIDC for authentication, use_microsoft_graph must be set to true (which is the default).
DataTerraformRemoteStateConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateConfig {
Defaults: *map[string]interface{},
Workspace: *string,
}
Properties
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
DataTerraformRemoteStateConsulConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateConsulConfig {
Defaults: *map[string]interface{},
Workspace: *string,
AccessToken: *string,
Path: *string,
Address: *string,
CaFile: *string,
CertFile: *string,
Datacenter: *string,
Gzip: *bool,
HttpAuth: *string,
KeyFile: *string,
Lock: *bool,
Scheme: *string,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
AccessToken | *string | (Required) Access token. |
Path | *string | (Required) Path in the Consul KV store. |
Address | *string | (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. |
CaFile | *string | (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. |
CertFile | *string | (Optional) A path to a PEM-encoded certificate provided to the remote agent; |
Datacenter | *string | (Optional) The datacenter to use. |
Gzip | *bool | (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. |
HttpAuth | *string | (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. |
KeyFile | *string | (Optional) A path to a PEM-encoded private key, required if cert_file is specified. |
Lock | *bool | (Optional) false to disable locking. |
Scheme | *string | (Optional) Specifies what protocol to use when talking to the given address,either http or https. |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
AccessToken
Required
AccessToken *string
- Type: *string
(Required) Access token.
Path
Required
Path *string
- Type: *string
(Required) Path in the Consul KV store.
Address
Optional
Address *string
- Type: *string
(Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
Defaults to the local agent HTTP listener.
CaFile
Optional
CaFile *string
- Type: *string
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
CertFile
Optional
CertFile *string
- Type: *string
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
Datacenter
Optional
Datacenter *string
- Type: *string
(Optional) The datacenter to use.
Defaults to that of the agent.
Gzip
Optional
Gzip *bool
- Type: *bool
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
HttpAuth
Optional
HttpAuth *string
- Type: *string
(Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
KeyFile
Optional
KeyFile *string
- Type: *string
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
Lock
Optional
Lock *bool
- Type: *bool
(Optional) false to disable locking.
This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.
Scheme
Optional
Scheme *string
- Type: *string
(Optional) Specifies what protocol to use when talking to the given address,either http or https.
SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.
DataTerraformRemoteStateCosConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateCosConfig {
Defaults: *map[string]interface{},
Workspace: *string,
Bucket: *string,
Accelerate: *bool,
Acl: *string,
AssumeRole: github.com/hashicorp/terraform-cdk-go/cdktf.CosBackendAssumeRole,
Domain: *string,
Encrypt: *bool,
Endpoint: *string,
Key: *string,
Prefix: *string,
Region: *string,
SecretId: *string,
SecretKey: *string,
SecurityToken: *string,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
Bucket | *string | (Required) The name of the COS bucket. |
Accelerate | *bool | (Optional) Whether to enable global Acceleration. |
Acl | *string | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
AssumeRole | CosBackendAssumeRole | (Optional) The assume_role block. |
Domain | *string | (Optional) The root domain of the API request. |
Encrypt | *bool | (Optional) Whether to enable server side encryption of the state file. |
Endpoint | *string | (Optional) The Custom Endpoint for the COS backend. |
Key | *string | (Optional) The path for saving the state file in bucket. |
Prefix | *string | (Optional) The directory for saving the state file in bucket. |
Region | *string | (Optional) The region of the COS bucket. |
SecretId | *string | (Optional) Secret id of Tencent Cloud. |
SecretKey | *string | (Optional) Secret key of Tencent Cloud. |
SecurityToken | *string | (Optional) TencentCloud Security Token of temporary access credentials. |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
Bucket
Required
Bucket *string
- Type: *string
(Required) The name of the COS bucket.
You shall manually create it first.
Accelerate
Optional
Accelerate *bool
- Type: *bool
(Optional) Whether to enable global Acceleration.
Defaults to false.
Acl
Optional
Acl *string
- Type: *string
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
AssumeRole
Optional
AssumeRole CosBackendAssumeRole
- Type: CosBackendAssumeRole
(Optional) The assume_role block.
If provided, terraform will attempt to assume this role using the supplied credentials.
Domain
Optional
Domain *string
- Type: *string
(Optional) The root domain of the API request.
Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.
Encrypt
Optional
Encrypt *bool
- Type: *bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.
Endpoint
Optional
Endpoint *string
- Type: *string
(Optional) The Custom Endpoint for the COS backend.
It supports the environment variable TENCENTCLOUD_ENDPOINT.
Key
Optional
Key *string
- Type: *string
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
Prefix
Optional
Prefix *string
- Type: *string
(Optional) The directory for saving the state file in bucket.
Default to "env:".
Region
Optional
Region *string
- Type: *string
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
SecretId
Optional
SecretId *string
- Type: *string
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
SecretKey
Optional
SecretKey *string
- Type: *string
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
SecurityToken
Optional
SecurityToken *string
- Type: *string
(Optional) TencentCloud Security Token of temporary access credentials.
It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.
DataTerraformRemoteStateGcsConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateGcsConfig {
Defaults: *map[string]interface{},
Workspace: *string,
Bucket: *string,
AccessToken: *string,
Credentials: *string,
EncryptionKey: *string,
ImpersonateServiceAccount: *string,
ImpersonateServiceAccountDelegates: *[]*string,
KmsEncryptionKey: *string,
Prefix: *string,
StoreageCustomEndpoint: *string,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
Bucket | *string | (Required) The name of the GCS bucket. |
AccessToken | *string | (Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field. |
Credentials | *string | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
EncryptionKey | *string | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
ImpersonateServiceAccount | *string | (Optional) The service account to impersonate for accessing the State Bucket. |
ImpersonateServiceAccountDelegates | _[]_string | (Optional) The delegation chain for an impersonating a service account. |
KmsEncryptionKey | *string | (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket. |
Prefix | *string | (Optional) GCS prefix inside the bucket. |
StoreageCustomEndpoint | *string | (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b). |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
Bucket
Required
Bucket *string
- Type: *string
(Required) The name of the GCS bucket.
This name must be globally unique.
AccessToken
Optional
AccessToken *string
- Type: *string
(Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field.
Credentials
Optional
Credentials *string
- Type: *string
(Optional) Local path to Google Cloud Platform account credentials in JSON format.
If unset, Google Application Default Credentials are used. The provided credentials must have Storage Object Admin role on the bucket.
Warning: if using the Google Cloud Platform provider as well, it will also pick up the GOOGLE_CREDENTIALS environment variable.
EncryptionKey
Optional
EncryptionKey *string
- Type: *string
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
ImpersonateServiceAccount
Optional
ImpersonateServiceAccount *string
- Type: *string
(Optional) The service account to impersonate for accessing the State Bucket.
You must have roles/iam.serviceAccountTokenCreator role on that account for the impersonation to succeed. If you are using a delegation chain, you can specify that using the impersonate_service_account_delegates field. Alternatively, this can be specified using the GOOGLE_IMPERSONATE_SERVICE_ACCOUNT environment variable.
ImpersonateServiceAccountDelegates
Optional
ImpersonateServiceAccountDelegates *[]*string
- Type: _[]_string
(Optional) The delegation chain for an impersonating a service account.
KmsEncryptionKey
Optional
KmsEncryptionKey *string
- Type: *string
(Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.
Format should be projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}. For more information, including IAM requirements, see {@link https://cloud.google.com/storage/docs/encryption/customer-managed-keys Customer-managed Encryption Keys}.
Prefix
Optional
Prefix *string
- Type: *string
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
StoreageCustomEndpoint
Optional
StoreageCustomEndpoint *string
- Type: *string
(Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b).
{@link https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint See here for more details}
DataTerraformRemoteStateHttpConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateHttpConfig {
Defaults: *map[string]interface{},
Workspace: *string,
Address: *string,
ClientCaCertificatePem: *string,
ClientCertificatePem: *string,
ClientPrivateKeyPem: *string,
LockAddress: *string,
LockMethod: *string,
Password: *string,
RetryMax: *f64,
RetryWaitMax: *f64,
RetryWaitMin: *f64,
SkipCertVerification: *bool,
UnlockAddress: *string,
UnlockMethod: *string,
UpdateMethod: *string,
Username: *string,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
Address | *string | (Required) The address of the REST endpoint. |
ClientCaCertificatePem | *string | (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication. |
ClientCertificatePem | *string | (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication. |
ClientPrivateKeyPem | *string | (Optional) A PEM-encoded private key, required if client_certificate_pem is specified. |
LockAddress | *string | (Optional) The address of the lock REST endpoint. |
LockMethod | *string | (Optional) The HTTP method to use when locking. |
Password | *string | (Optional) The password for HTTP basic authentication. |
RetryMax | *f64 | (Optional) The number of HTTP request retries. |
RetryWaitMax | *f64 | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
RetryWaitMin | *f64 | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
SkipCertVerification | *bool | (Optional) Whether to skip TLS verification. |
UnlockAddress | *string | (Optional) The address of the unlock REST endpoint. |
UnlockMethod | *string | (Optional) The HTTP method to use when unlocking. |
UpdateMethod | *string | (Optional) HTTP method to use when updating state. |
Username | *string | (Optional) The username for HTTP basic authentication. |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
Address
Required
Address *string
- Type: *string
(Required) The address of the REST endpoint.
ClientCaCertificatePem
Optional
ClientCaCertificatePem *string
- Type: *string
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
ClientCertificatePem
Optional
ClientCertificatePem *string
- Type: *string
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
ClientPrivateKeyPem
Optional
ClientPrivateKeyPem *string
- Type: *string
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
LockAddress
Optional
LockAddress *string
- Type: *string
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
LockMethod
Optional
LockMethod *string
- Type: *string
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
Password
Optional
Password *string
- Type: *string
(Optional) The password for HTTP basic authentication.
RetryMax
Optional
RetryMax *f64
- Type: *f64
(Optional) The number of HTTP request retries.
Defaults to 2.
RetryWaitMax
Optional
RetryWaitMax *f64
- Type: *f64
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
RetryWaitMin
Optional
RetryWaitMin *f64
- Type: *f64
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
SkipCertVerification
Optional
SkipCertVerification *bool
- Type: *bool
(Optional) Whether to skip TLS verification.
Defaults to false.
UnlockAddress
Optional
UnlockAddress *string
- Type: *string
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
UnlockMethod
Optional
UnlockMethod *string
- Type: *string
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
UpdateMethod
Optional
UpdateMethod *string
- Type: *string
(Optional) HTTP method to use when updating state.
Defaults to POST.
Username
Optional
Username *string
- Type: *string
(Optional) The username for HTTP basic authentication.
DataTerraformRemoteStateLocalConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateLocalConfig {
Defaults: *map[string]interface{},
Workspace: *string,
Path: *string,
WorkspaceDir: *string,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
Path | *string | Path where the state file is stored. |
WorkspaceDir | *string | (Optional) The path to non-default workspaces. |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
Path
Optional
Path *string
- Type: *string
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
WorkspaceDir
Optional
WorkspaceDir *string
- Type: *string
(Optional) The path to non-default workspaces.
DataTerraformRemoteStateOssConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateOssConfig {
Defaults: *map[string]interface{},
Workspace: *string,
Bucket: *string,
AccessKey: *string,
Acl: *string,
AssumeRole: github.com/hashicorp/terraform-cdk-go/cdktf.OssAssumeRole,
AssumeRolePolicy: *string,
AssumeRoleRoleArn: *string,
AssumeRoleSessionExpiration: *f64,
AssumeRoleSessionName: *string,
EcsRoleName: *string,
Encrypt: *bool,
Endpoint: *string,
Key: *string,
Prefix: *string,
Profile: *string,
Region: *string,
SecretKey: *string,
SecurityToken: *string,
SharedCredentialsFile: *string,
StsEndpoint: *string,
TablestoreEndpoint: *string,
TablestoreTable: *string,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
Bucket | *string | (Required) The name of the OSS bucket. |
AccessKey | *string | (Optional) Alibaba Cloud access key. |
Acl | *string | (Optional) Object ACL to be applied to the state file. |
AssumeRole | OssAssumeRole | No description. |
AssumeRolePolicy | *string | (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed. |
AssumeRoleRoleArn | *string | (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials. |
AssumeRoleSessionExpiration | *f64 | (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION. |
AssumeRoleSessionName | *string | (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME. |
EcsRoleName | *string | (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. |
Encrypt | *bool | (Optional) Whether to enable server side encryption of the state file. |
Endpoint | *string | (Optional) A custom endpoint for the OSS API. |
Key | *string | (Optional) The name of the state file. |
Prefix | *string | (Optional) The path directory of the state file will be stored. |
Profile | *string | (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable. |
Region | *string | (Optional) The region of the OSS bucket. |
SecretKey | *string | (Optional) Alibaba Cloud secret access key. |
SecurityToken | *string | (Optional) STS access token. |
SharedCredentialsFile | *string | (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. |
StsEndpoint | *string | (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT. |
TablestoreEndpoint | *string | (Optional) A custom endpoint for the TableStore API. |
TablestoreTable | *string | (Optional) A TableStore table for state locking and consistency. |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
Bucket
Required
Bucket *string
- Type: *string
(Required) The name of the OSS bucket.
AccessKey
Optional
AccessKey *string
- Type: *string
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
Acl
Optional
Acl *string
- Type: *string
(Optional) Object ACL to be applied to the state file.
AssumeRole
Optional
AssumeRole
- Deprecated: Use flattened assume role options
AssumeRole OssAssumeRole
- Type: OssAssumeRole
AssumeRolePolicy
Optional
AssumeRolePolicy *string
- Type: *string
(Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.
AssumeRoleRoleArn
Optional
AssumeRoleRoleArn *string
- Type: *string
(Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials.
AssumeRoleSessionExpiration
Optional
AssumeRoleSessionExpiration *f64
- Type: *f64
(Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION.
AssumeRoleSessionName
Optional
AssumeRoleSessionName *string
- Type: *string
(Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME.
EcsRoleName
Optional
EcsRoleName *string
- Type: *string
(Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.
Encrypt
Optional
Encrypt *bool
- Type: *bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.
Endpoint
Optional
Endpoint *string
- Type: *string
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
Key
Optional
Key *string
- Type: *string
(Optional) The name of the state file.
Defaults to terraform.tfstate.
Prefix
Optional
Prefix *string
- Type: *string
(Optional) The path directory of the state file will be stored.
Default to "env:".
Profile
Optional
Profile *string
- Type: *string
(Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable.
Region
Optional
Region *string
- Type: *string
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
SecretKey
Optional
SecretKey *string
- Type: *string
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
SecurityToken
Optional
SecurityToken *string
- Type: *string
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
SharedCredentialsFile
Optional
SharedCredentialsFile *string
- Type: *string
(Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
StsEndpoint
Optional
StsEndpoint *string
- Type: *string
(Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.
TablestoreEndpoint
Optional
TablestoreEndpoint *string
- Type: *string
(Optional) A custom endpoint for the TableStore API.
TablestoreTable
Optional
TablestoreTable *string
- Type: *string
(Optional) A TableStore table for state locking and consistency.
The table must have a primary key named LockID of type String.
DataTerraformRemoteStatePgConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStatePgConfig {
Defaults: *map[string]interface{},
Workspace: *string,
ConnStr: *string,
SchemaName: *string,
SkipIndexCreation: *bool,
SkipSchemaCreation: *bool,
SkipTableCreation: *bool,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
ConnStr | *string | Postgres connection string; |
SchemaName | *string | Name of the automatically-managed Postgres schema, default to terraform_remote_state. |
SkipIndexCreation | *bool | If set to true, the Postgres index must already exist. |
SkipSchemaCreation | *bool | If set to true, the Postgres schema must already exist. |
SkipTableCreation | *bool | If set to true, the Postgres table must already exist. |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
ConnStr
Required
ConnStr *string
- Type: *string
Postgres connection string;
a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.
SchemaName
Optional
SchemaName *string
- Type: *string
Name of the automatically-managed Postgres schema, default to terraform_remote_state.
Can also be set using the PG_SCHEMA_NAME environment variable.
SkipIndexCreation
Optional
SkipIndexCreation *bool
- Type: *bool
If set to true, the Postgres index must already exist.
Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won't try to create the index, this is useful when it has already been created by a database administrator.
SkipSchemaCreation
Optional
SkipSchemaCreation *bool
- Type: *bool
If set to true, the Postgres schema must already exist.
Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won't try to create the schema, this is useful when it has already been created by a database administrator.
SkipTableCreation
Optional
SkipTableCreation *bool
- Type: *bool
If set to true, the Postgres table must already exist.
Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won't try to create the table, this is useful when it has already been created by a database administrator.
DataTerraformRemoteStateRemoteConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateRemoteConfig {
Defaults: *map[string]interface{},
Workspace: *string,
Organization: *string,
Workspaces: github.com/hashicorp/terraform-cdk-go/cdktf.IRemoteWorkspace,
Hostname: *string,
Token: *string,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
Organization | *string | No description. |
Workspaces | IRemoteWorkspace | No description. |
Hostname | *string | No description. |
Token | *string | No description. |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
Organization
Required
Organization *string
- Type: *string
Workspaces
Required
Workspaces IRemoteWorkspace
- Type: IRemoteWorkspace
Hostname
Optional
Hostname *string
- Type: *string
Token
Optional
Token *string
- Type: *string
DataTerraformRemoteStateS3Config
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateS3Config {
Defaults: *map[string]interface{},
Workspace: *string,
Bucket: *string,
Key: *string,
AccessKey: *string,
Acl: *string,
AllowedAccountIds: *[]*string,
AssumeRole: github.com/hashicorp/terraform-cdk-go/cdktf.S3BackendAssumeRoleConfig,
AssumeRolePolicy: *string,
AssumeRolePolicyArns: *[]*string,
AssumeRoleTags: *map[string]*string,
AssumeRoleTransitiveTagKeys: *[]*string,
AssumeRoleWithWebIdentity: github.com/hashicorp/terraform-cdk-go/cdktf.S3BackendAssumeRoleWithWebIdentityConfig,
CustomCaBundle: *string,
DynamodbEndpoint: *string,
DynamodbTable: *string,
Ec2MetadataServiceEndpoint: *string,
Ec2MetadataServiceEndpointMode: *string,
Encrypt: *bool,
Endpoint: *string,
Endpoints: github.com/hashicorp/terraform-cdk-go/cdktf.S3BackendEndpointConfig,
ExternalId: *string,
ForbiddenAccountIds: *[]*string,
ForcePathStyle: *bool,
HttpProxy: *string,
HttpsProxy: *string,
IamEndpoint: *string,
Insecure: *bool,
KmsKeyId: *string,
MaxRetries: *f64,
NoProxy: *string,
Profile: *string,
Region: *string,
RetryMode: *string,
RoleArn: *string,
SecretKey: *string,
SessionName: *string,
SharedConfigFiles: *[]*string,
SharedCredentialsFile: *string,
SharedCredentialsFiles: *[]*string,
SkipCredentialsValidation: *bool,
SkipMetadataApiCheck: *bool,
SkipRegionValidation: *bool,
SkipRequestingAccountId: *bool,
SkipS3Checksum: *bool,
SseCustomerKey: *string,
StsEndpoint: *string,
StsRegion: *string,
Token: *string,
UseLegacyWorkflow: *bool,
UsePathStyle: *bool,
WorkspaceKeyPrefix: *string,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
Bucket | *string | Name of the S3 Bucket. |
Key | *string | Path to the state file inside the S3 Bucket. |
AccessKey | *string | (Optional) AWS access key. |
Acl | *string | (Optional) Canned ACL to be applied to the state file. |
AllowedAccountIds | _[]_string | (Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment. |
AssumeRole | S3BackendAssumeRoleConfig | Assuming an IAM Role can be configured in two ways. |
AssumeRolePolicy | *string | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
AssumeRolePolicyArns | _[]_string | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
AssumeRoleTags | _map[string]_string | (Optional) Map of assume role session tags. |
AssumeRoleTransitiveTagKeys | _[]_string | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
AssumeRoleWithWebIdentity | S3BackendAssumeRoleWithWebIdentityConfig | Assume Role With Web Identity Configuration. |
CustomCaBundle | *string | (Optional) File containing custom root and intermediate certificates. |
DynamodbEndpoint | *string | (Optional) Custom endpoint for the AWS DynamoDB API. |
DynamodbTable | *string | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
Ec2MetadataServiceEndpoint | *string | Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API. |
Ec2MetadataServiceEndpointMode | *string | (Optional) Mode to use in communicating with the metadata service. |
Encrypt | *bool | (Optional) Enable server side encryption of the state file. |
Endpoint | *string | (Optional) Custom endpoint for the AWS S3 API. |
Endpoints | S3BackendEndpointConfig | (Optional) The endpoint configuration block. |
ExternalId | *string | (Optional) External identifier to use when assuming the role. |
ForbiddenAccountIds | _[]_string | (Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment. |
ForcePathStyle | *bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
HttpProxy | *string | (Optional) URL of a proxy to use for HTTP requests when accessing the AWS API. |
HttpsProxy | *string | (Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API. |
IamEndpoint | *string | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
Insecure | *bool | Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests. |
KmsKeyId | *string | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
MaxRetries | *f64 | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
NoProxy | *string | (Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies. |
Profile | *string | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
Region | *string | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
RetryMode | *string | (Optional) Specifies how retries are attempted. |
RoleArn | *string | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
SecretKey | *string | (Optional) AWS secret access key. |
SessionName | *string | (Optional) Session name to use when assuming the role. |
SharedConfigFiles | _[]_string | (Optional) List of paths to AWS shared configuration files. |
SharedCredentialsFile | *string | (Optional) Path to the AWS shared credentials file. |
SharedCredentialsFiles | _[]_string | (Optional) List of paths to AWS shared credentials files. |
SkipCredentialsValidation | *bool | (Optional) Skip credentials validation via the STS API. |
SkipMetadataApiCheck | *bool | (Optional) Skip usage of EC2 Metadata API. |
SkipRegionValidation | *bool | (Optional) Skip validation of provided region name. |
SkipRequestingAccountId | *bool | (Optional) Whether to skip requesting the account ID. |
SkipS3Checksum | *bool | (Optional) Do not include checksum when uploading S3 Objects. |
SseCustomerKey | *string | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
StsEndpoint | *string | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
StsRegion | *string | (Optional) AWS region for STS. |
Token | *string | (Optional) Multi-Factor Authentication (MFA) token. |
UseLegacyWorkflow | *bool | (Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration. |
UsePathStyle | *bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
WorkspaceKeyPrefix | *string | (Optional) Prefix applied to the state path inside the bucket. |
Defaults
Optional
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace *string
- Type: *string
Bucket
Required
Bucket *string
- Type: *string
Name of the S3 Bucket.
Key
Required
Key *string
- Type: *string
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
AccessKey
Optional
AccessKey *string
- Type: *string
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
Acl
Optional
Acl *string
- Type: *string
(Optional) Canned ACL to be applied to the state file.
AllowedAccountIds
Optional
AllowedAccountIds *[]*string
- Type: _[]_string
(Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment.
Conflicts with forbidden_account_ids.
AssumeRole
Optional
AssumeRole S3BackendAssumeRoleConfig
Assuming an IAM Role can be configured in two ways.
The preferred way is to use the argument assume_role, the other, which is deprecated, is with arguments at the top level.
AssumeRolePolicy
Optional
AssumeRolePolicy
- Deprecated: Use assumeRole.policy instead.
AssumeRolePolicy *string
- Type: *string
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
AssumeRolePolicyArns
Optional
AssumeRolePolicyArns
- Deprecated: Use assumeRole.policyArns instead.
AssumeRolePolicyArns *[]*string
- Type: _[]_string
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
AssumeRoleTags
Optional
AssumeRoleTags
- Deprecated: Use assumeRole.tags instead.
AssumeRoleTags *map[string]*string
- Type: _map[string]_string
(Optional) Map of assume role session tags.
AssumeRoleTransitiveTagKeys
Optional
AssumeRoleTransitiveTagKeys
- Deprecated: Use assumeRole.transitiveTagKeys instead.
AssumeRoleTransitiveTagKeys *[]*string
- Type: _[]_string
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
AssumeRoleWithWebIdentity
Optional
AssumeRoleWithWebIdentity S3BackendAssumeRoleWithWebIdentityConfig
Assume Role With Web Identity Configuration.
CustomCaBundle
Optional
CustomCaBundle *string
- Type: *string
(Optional) File containing custom root and intermediate certificates.
Can also be set using the AWS_CA_BUNDLE environment variable. Setting ca_bundle in the shared config file is not supported.
DynamodbEndpoint
Optional
DynamodbEndpoint
- Deprecated: Use endpoints.dynamodb instead
DynamodbEndpoint *string
- Type: *string
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
DynamodbTable
Optional
DynamodbTable *string
- Type: *string
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
Ec2MetadataServiceEndpoint
Optional
Ec2MetadataServiceEndpoint *string
- Type: *string
Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API.
Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT environment variable.
Ec2MetadataServiceEndpointMode
Optional
Ec2MetadataServiceEndpointMode *string
- Type: *string
(Optional) Mode to use in communicating with the metadata service.
Valid values are IPv4 and IPv6. Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE environment variable.
Encrypt
Optional
Encrypt *bool
- Type: *bool
(Optional) Enable server side encryption of the state file.
Endpoint
Optional
Endpoint
- Deprecated: Use endpoints.s3 instead
Endpoint *string
- Type: *string
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
Endpoints
Optional
Endpoints S3BackendEndpointConfig
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
ExternalId
Optional
ExternalId
- Deprecated: Use assume_role.external_id instead.
ExternalId *string
- Type: *string
(Optional) External identifier to use when assuming the role.
ForbiddenAccountIds
Optional
ForbiddenAccountIds *[]*string
- Type: _[]_string
(Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment.
Conflicts with allowed_account_ids.
ForcePathStyle
Optional
ForcePathStyle
- Deprecated: Use usePathStyle instead
ForcePathStyle *bool
- Type: *bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
HttpProxy
Optional
HttpProxy *string
- Type: *string
(Optional) URL of a proxy to use for HTTP requests when accessing the AWS API.
Can also be set using the HTTP_PROXY or http_proxy environment variables.
HttpsProxy
Optional
HttpsProxy *string
- Type: *string
(Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API.
Can also be set using the HTTPS_PROXY or https_proxy environment variables.
IamEndpoint
Optional
IamEndpoint
- Deprecated: Use endpoints.iam instead
IamEndpoint *string
- Type: *string
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
Insecure
Optional
Insecure *bool
- Type: *bool
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
KmsKeyId
Optional
KmsKeyId *string
- Type: *string
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
MaxRetries
Optional
MaxRetries *f64
- Type: *f64
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
NoProxy
Optional
NoProxy *string
- Type: *string
(Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies.
Each value can be one of:
- A domain name
- An IP address
- A CIDR address
- An asterisk (*), to indicate that no proxying should be performed Domain name and IP address values can also include a port number. Can also be set using the NO_PROXY or no_proxy environment variables.
Profile
Optional
Profile *string
- Type: *string
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
Region
Optional
Region *string
- Type: *string
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
RetryMode
Optional
RetryMode *string
- Type: *string
(Optional) Specifies how retries are attempted.
Valid values are standard and adaptive. Can also be configured using the AWS_RETRY_MODE environment variable or the shared config file parameter retry_mode.
RoleArn
Optional
RoleArn
- Deprecated: Use assumeRole.roleArn instead.
RoleArn *string
- Type: *string
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
SecretKey
Optional
SecretKey *string
- Type: *string
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
SessionName
Optional
SessionName
- Deprecated: Use assumeRole.sessionName instead.
SessionName *string
- Type: *string
(Optional) Session name to use when assuming the role.
SharedConfigFiles
Optional
SharedConfigFiles *[]*string
- Type: _[]_string
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
SharedCredentialsFile
Optional
SharedCredentialsFile *string
- Type: *string
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
SharedCredentialsFiles
Optional
SharedCredentialsFiles *[]*string
- Type: _[]_string
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
SkipCredentialsValidation
Optional
SkipCredentialsValidation *bool
- Type: *bool
(Optional) Skip credentials validation via the STS API.
SkipMetadataApiCheck
Optional
SkipMetadataApiCheck *bool
- Type: *bool
(Optional) Skip usage of EC2 Metadata API.
SkipRegionValidation
Optional
SkipRegionValidation *bool
- Type: *bool
(Optional) Skip validation of provided region name.
SkipRequestingAccountId
Optional
SkipRequestingAccountId *bool
- Type: *bool
(Optional) Whether to skip requesting the account ID.
Useful for AWS API implementations that do not have the IAM, STS API, or metadata API.
SkipS3Checksum
Optional
SkipS3Checksum *bool
- Type: *bool
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
SseCustomerKey
Optional
SseCustomerKey *string
- Type: *string
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
StsEndpoint
Optional
StsEndpoint
- Deprecated: Use endpoints.sts instead
StsEndpoint *string
- Type: *string
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
StsRegion
Optional
StsRegion *string
- Type: *string
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
Token
Optional
Token *string
- Type: *string
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
UseLegacyWorkflow
Optional
UseLegacyWorkflow *bool
- Type: *bool
(Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration.
Defaults to true. This behavior does not align with the authentication flow of the AWS CLI or SDK's, and will be removed in the future.
UsePathStyle
Optional
UsePathStyle *bool
- Type: *bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
WorkspaceKeyPrefix
Optional
WorkspaceKeyPrefix *string
- Type: *string
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
DataTerraformRemoteStateSwiftConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.DataTerraformRemoteStateSwiftConfig {
Defaults: *map[string]interface{},
Workspace: *string,
Container: *string,
ApplicationCredentialId: *string,
ApplicationCredentialName: *string,
ApplicationCredentialSecret: *string,
ArchiveContainer: *string,
AuthUrl: *string,
CacertFile: *string,
Cert: *string,
Cloud: *string,
DefaultDomain: *string,
DomainId: *string,
DomainName: *string,
ExpireAfter: *string,
Insecure: *bool,
Key: *string,
Password: *string,
ProjectDomainId: *string,
ProjectDomainName: *string,
RegionName: *string,
StateName: *string,
TenantId: *string,
TenantName: *string,
Token: *string,
UserDomainId: *string,
UserDomainName: *string,
UserId: *string,
UserName: *string,
}
Properties
Name | Type | Description |
---|---|---|
Defaults | *map[string]interface{} | No description. |
Workspace | *string | No description. |
Container | *string | No description. |
ApplicationCredentialId | *string | No description. |
ApplicationCredentialName | *string | No description. |
ApplicationCredentialSecret | *string | No description. |
ArchiveContainer | *string | No description. |
AuthUrl | *string | No description. |
CacertFile | *string | No description. |
Cert | *string | No description. |
Cloud | *string | No description. |
DefaultDomain | *string | No description. |
DomainId | *string | No description. |
DomainName | *string | No description. |
ExpireAfter | *string | No description. |
Insecure | *bool | No description. |
Key | *string | No description. |
Password | *string | No description. |
ProjectDomainId | *string | No description. |
ProjectDomainName | *string | No description. |
RegionName | *string | No description. |
StateName | *string | No description. |
TenantId | *string | No description. |
TenantName | *string | No description. |
Token | *string | No description. |
UserDomainId | *string | No description. |
UserDomainName | *string | No description. |
UserId | *string | No description. |
UserName | *string | No description. |
Defaults
Optional
Defaults
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Defaults *map[string]interface{}
- Type: *map[string]interface{}
Workspace
Optional
Workspace
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Workspace *string
- Type: *string
Container
Required
Container
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Container *string
- Type: *string
ApplicationCredentialId
Optional
ApplicationCredentialId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ApplicationCredentialId *string
- Type: *string
ApplicationCredentialName
Optional
ApplicationCredentialName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ApplicationCredentialName *string
- Type: *string
ApplicationCredentialSecret
Optional
ApplicationCredentialSecret
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ApplicationCredentialSecret *string
- Type: *string
ArchiveContainer
Optional
ArchiveContainer
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ArchiveContainer *string
- Type: *string
AuthUrl
Optional
AuthUrl
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
AuthUrl *string
- Type: *string
CacertFile
Optional
CacertFile
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
CacertFile *string
- Type: *string
Cert
Optional
Cert
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Cert *string
- Type: *string
Cloud
Optional
Cloud
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Cloud *string
- Type: *string
DefaultDomain
Optional
DefaultDomain
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
DefaultDomain *string
- Type: *string
DomainId
Optional
DomainId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
DomainId *string
- Type: *string
DomainName
Optional
DomainName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
DomainName *string
- Type: *string
ExpireAfter
Optional
ExpireAfter
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ExpireAfter *string
- Type: *string
Insecure
Optional
Insecure
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Insecure *bool
- Type: *bool
Key
Optional
Key
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Key *string
- Type: *string
Password
Optional
Password
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Password *string
- Type: *string
ProjectDomainId
Optional
ProjectDomainId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ProjectDomainId *string
- Type: *string
ProjectDomainName
Optional
ProjectDomainName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ProjectDomainName *string
- Type: *string
RegionName
Optional
RegionName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
RegionName *string
- Type: *string
StateName
Optional
StateName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
StateName *string
- Type: *string
TenantId
Optional
TenantId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
TenantId *string
- Type: *string
TenantName
Optional
TenantName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
TenantName *string
- Type: *string
Token
Optional
Token
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Token *string
- Type: *string
UserDomainId
Optional
UserDomainId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
UserDomainId *string
- Type: *string
UserDomainName
Optional
UserDomainName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
UserDomainName *string
- Type: *string
UserId
Optional
UserId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
UserId *string
- Type: *string
UserName
Optional
UserName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
UserName *string
- Type: *string
EncodingOptions
Properties to string encodings.
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.EncodingOptions {
DisplayHint: *string,
}
Properties
Name | Type | Description |
---|---|---|
DisplayHint | *string | A hint for the Token's purpose when stringifying it. |
DisplayHint
Optional
DisplayHint *string
- Type: *string
- Default: no display hint
A hint for the Token's purpose when stringifying it.
FileProvisioner
The file provisioner copies files or directories from the machine running Terraform to the newly created resource.
The file provisioner supports both ssh and winrm type connections.
See {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/file file}
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.FileProvisioner {
Destination: *string,
Type: *string,
Connection: interface{},
Content: *string,
Source: *string,
}
Properties
Name | Type | Description |
---|---|---|
Destination | *string | The source file or directory. |
Type | *string | No description. |
Connection | interface{} | Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. |
Content | *string | The destination path to write to on the remote system. |
Source | *string | The direct content to copy on the destination. |
Destination
Required
Destination *string
- Type: *string
The source file or directory.
Specify it either relative to the current working directory or as an absolute path. This argument cannot be combined with content.
Type
Required
Type *string
- Type: *string
Connection
Optional
Connection interface{}
- Type: interface{}
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
Content
Optional
Content *string
- Type: *string
The destination path to write to on the remote system.
See Destination Paths below for more information.
Source
Optional
Source *string
- Type: *string
The direct content to copy on the destination.
If destination is a file, the content will be written on that file. In case of a directory, a file named tf-file-content is created inside that directory. We recommend using a file as the destination when using content. This argument cannot be combined with source.
GcsBackendConfig
Stores the state as an object in a configurable prefix in a pre-existing bucket on Google Cloud Storage (GCS).
The bucket must exist prior to configuring the backend.
This backend supports state locking.
Warning! It is highly recommended that you enable Object Versioning on the GCS bucket to allow for state recovery in the case of accidental deletions and human error.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/gcs
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.GcsBackendConfig {
Bucket: *string,
AccessToken: *string,
Credentials: *string,
EncryptionKey: *string,
ImpersonateServiceAccount: *string,
ImpersonateServiceAccountDelegates: *[]*string,
KmsEncryptionKey: *string,
Prefix: *string,
StoreageCustomEndpoint: *string,
}
Properties
Name | Type | Description |
---|---|---|
Bucket | *string | (Required) The name of the GCS bucket. |
AccessToken | *string | (Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field. |
Credentials | *string | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
EncryptionKey | *string | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
ImpersonateServiceAccount | *string | (Optional) The service account to impersonate for accessing the State Bucket. |
ImpersonateServiceAccountDelegates | _[]_string | (Optional) The delegation chain for an impersonating a service account. |
KmsEncryptionKey | *string | (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket. |
Prefix | *string | (Optional) GCS prefix inside the bucket. |
StoreageCustomEndpoint | *string | (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b). |
Bucket
Required
Bucket *string
- Type: *string
(Required) The name of the GCS bucket.
This name must be globally unique.
AccessToken
Optional
AccessToken *string
- Type: *string
(Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e. the Authorization: Bearer token used to authenticate HTTP requests to GCP APIs. This is an alternative to credentials. If both are specified, access_token will be used over the credentials field.
Credentials
Optional
Credentials *string
- Type: *string
(Optional) Local path to Google Cloud Platform account credentials in JSON format.
If unset, Google Application Default Credentials are used. The provided credentials must have Storage Object Admin role on the bucket.
Warning: if using the Google Cloud Platform provider as well, it will also pick up the GOOGLE_CREDENTIALS environment variable.
EncryptionKey
Optional
EncryptionKey *string
- Type: *string
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
ImpersonateServiceAccount
Optional
ImpersonateServiceAccount *string
- Type: *string
(Optional) The service account to impersonate for accessing the State Bucket.
You must have roles/iam.serviceAccountTokenCreator role on that account for the impersonation to succeed. If you are using a delegation chain, you can specify that using the impersonate_service_account_delegates field. Alternatively, this can be specified using the GOOGLE_IMPERSONATE_SERVICE_ACCOUNT environment variable.
ImpersonateServiceAccountDelegates
Optional
ImpersonateServiceAccountDelegates *[]*string
- Type: _[]_string
(Optional) The delegation chain for an impersonating a service account.
KmsEncryptionKey
Optional
KmsEncryptionKey *string
- Type: *string
(Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.
Format should be projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}. For more information, including IAM requirements, see {@link https://cloud.google.com/storage/docs/encryption/customer-managed-keys Customer-managed Encryption Keys}.
Prefix
Optional
Prefix *string
- Type: *string
(Optional) GCS prefix inside the bucket.
Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.
StoreageCustomEndpoint
Optional
StoreageCustomEndpoint *string
- Type: *string
(Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (/storage/v1/b).
{@link https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint See here for more details}
HttpBackendConfig
Stores the state using a simple REST client.
State will be fetched via GET, updated via POST, and purged with DELETE. The method used for updating is configurable.
This backend optionally supports state locking. When locking support is enabled it will use LOCK and UNLOCK requests providing the lock info in the body. The endpoint should return a 423: Locked or 409: Conflict with the holding lock info when it's already taken, 200: OK for success. Any other status will be considered an error. The ID of the holding lock info will be added as a query parameter to state updates requests.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/http
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.HttpBackendConfig {
Address: *string,
ClientCaCertificatePem: *string,
ClientCertificatePem: *string,
ClientPrivateKeyPem: *string,
LockAddress: *string,
LockMethod: *string,
Password: *string,
RetryMax: *f64,
RetryWaitMax: *f64,
RetryWaitMin: *f64,
SkipCertVerification: *bool,
UnlockAddress: *string,
UnlockMethod: *string,
UpdateMethod: *string,
Username: *string,
}
Properties
Name | Type | Description |
---|---|---|
Address | *string | (Required) The address of the REST endpoint. |
ClientCaCertificatePem | *string | (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication. |
ClientCertificatePem | *string | (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication. |
ClientPrivateKeyPem | *string | (Optional) A PEM-encoded private key, required if client_certificate_pem is specified. |
LockAddress | *string | (Optional) The address of the lock REST endpoint. |
LockMethod | *string | (Optional) The HTTP method to use when locking. |
Password | *string | (Optional) The password for HTTP basic authentication. |
RetryMax | *f64 | (Optional) The number of HTTP request retries. |
RetryWaitMax | *f64 | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
RetryWaitMin | *f64 | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
SkipCertVerification | *bool | (Optional) Whether to skip TLS verification. |
UnlockAddress | *string | (Optional) The address of the unlock REST endpoint. |
UnlockMethod | *string | (Optional) The HTTP method to use when unlocking. |
UpdateMethod | *string | (Optional) HTTP method to use when updating state. |
Username | *string | (Optional) The username for HTTP basic authentication. |
Address
Required
Address *string
- Type: *string
(Required) The address of the REST endpoint.
ClientCaCertificatePem
Optional
ClientCaCertificatePem *string
- Type: *string
(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.
ClientCertificatePem
Optional
ClientCertificatePem *string
- Type: *string
(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.
ClientPrivateKeyPem
Optional
ClientPrivateKeyPem *string
- Type: *string
(Optional) A PEM-encoded private key, required if client_certificate_pem is specified.
LockAddress
Optional
LockAddress *string
- Type: *string
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
LockMethod
Optional
LockMethod *string
- Type: *string
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
Password
Optional
Password *string
- Type: *string
(Optional) The password for HTTP basic authentication.
RetryMax
Optional
RetryMax *f64
- Type: *f64
(Optional) The number of HTTP request retries.
Defaults to 2.
RetryWaitMax
Optional
RetryWaitMax *f64
- Type: *f64
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
RetryWaitMin
Optional
RetryWaitMin *f64
- Type: *f64
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
SkipCertVerification
Optional
SkipCertVerification *bool
- Type: *bool
(Optional) Whether to skip TLS verification.
Defaults to false.
UnlockAddress
Optional
UnlockAddress *string
- Type: *string
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
UnlockMethod
Optional
UnlockMethod *string
- Type: *string
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
UpdateMethod
Optional
UpdateMethod *string
- Type: *string
(Optional) HTTP method to use when updating state.
Defaults to POST.
Username
Optional
Username *string
- Type: *string
(Optional) The username for HTTP basic authentication.
LazyAnyValueOptions
Options for creating lazy untyped tokens.
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.LazyAnyValueOptions {
DisplayHint: *string,
OmitEmptyArray: *bool,
}
Properties
Name | Type | Description |
---|---|---|
DisplayHint | *string | Use the given name as a display hint. |
OmitEmptyArray | *bool | If the produced value is an array and it is empty, return 'undefined' instead. |
DisplayHint
Optional
DisplayHint *string
- Type: *string
- Default: No hint
Use the given name as a display hint.
OmitEmptyArray
Optional
OmitEmptyArray *bool
- Type: *bool
- Default: false
If the produced value is an array and it is empty, return 'undefined' instead.
LazyListValueOptions
Options for creating a lazy list token.
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.LazyListValueOptions {
DisplayHint: *string,
OmitEmpty: *bool,
}
Properties
Name | Type | Description |
---|---|---|
DisplayHint | *string | Use the given name as a display hint. |
OmitEmpty | *bool | If the produced list is empty, return 'undefined' instead. |
DisplayHint
Optional
DisplayHint *string
- Type: *string
- Default: No hint
Use the given name as a display hint.
OmitEmpty
Optional
OmitEmpty *bool
- Type: *bool
- Default: false
If the produced list is empty, return 'undefined' instead.
LazyStringValueOptions
Options for creating a lazy string token.
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.LazyStringValueOptions {
DisplayHint: *string,
}
Properties
Name | Type | Description |
---|---|---|
DisplayHint | *string | Use the given name as a display hint. |
DisplayHint
Optional
DisplayHint *string
- Type: *string
- Default: No hint
Use the given name as a display hint.
LocalBackendConfig
The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/local
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.LocalBackendConfig {
Path: *string,
WorkspaceDir: *string,
}
Properties
Name | Type | Description |
---|---|---|
Path | *string | Path where the state file is stored. |
WorkspaceDir | *string | (Optional) The path to non-default workspaces. |
Path
Optional
Path *string
- Type: *string
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
WorkspaceDir
Optional
WorkspaceDir *string
- Type: *string
(Optional) The path to non-default workspaces.
LocalExecProvisioner
The local-exec provisioner invokes a local executable after a resource is created.
This invokes a process on the machine running Terraform, not on the resource.
See {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/local-exec local-exec}
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.LocalExecProvisioner {
Command: *string,
Type: *string,
Environment: *map[string]*string,
Interpreter: *[]*string,
When: *string,
WorkingDir: *string,
}
Properties
Name | Type | Description |
---|---|---|
Command | *string | This is the command to execute. |
Type | *string | No description. |
Environment | _map[string]_string | A record of key value pairs representing the environment of the executed command. |
Interpreter | _[]_string | If provided, this is a list of interpreter arguments used to execute the command. |
When | *string | If provided, specifies when Terraform will execute the command. |
WorkingDir | *string | If provided, specifies the working directory where command will be executed. |
Command
Required
Command *string
- Type: *string
This is the command to execute.
It can be provided as a relative path to the current working directory or as an absolute path. It is evaluated in a shell, and can use environment variables or Terraform variables.
Type
Required
Type *string
- Type: *string
Environment
Optional
Environment *map[string]*string
- Type: _map[string]_string
A record of key value pairs representing the environment of the executed command.
It inherits the current process environment.
Interpreter
Optional
Interpreter *[]*string
- Type: _[]_string
If provided, this is a list of interpreter arguments used to execute the command.
The first argument is the interpreter itself. It can be provided as a relative path to the current working directory or as an absolute path The remaining arguments are appended prior to the command. This allows building command lines of the form "/bin/bash", "-c", "echo foo". If interpreter is unspecified, sensible defaults will be chosen based on the system OS.
When
Optional
When *string
- Type: *string
If provided, specifies when Terraform will execute the command.
For example, when = destroy specifies that the provisioner will run when the associated resource is destroyed
WorkingDir
Optional
WorkingDir *string
- Type: *string
If provided, specifies the working directory where command will be executed.
It can be provided as a relative path to the current working directory or as an absolute path. The directory must exist.
OssAssumeRole
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.OssAssumeRole {
RoleArn: *string,
Policy: *string,
SessionExpiration: *f64,
SessionName: *string,
}
Properties
Name | Type | Description |
---|---|---|
RoleArn | *string | No description. |
Policy | *string | No description. |
SessionExpiration | *f64 | No description. |
SessionName | *string | No description. |
RoleArn
Required
RoleArn *string
- Type: *string
Policy
Optional
Policy *string
- Type: *string
SessionExpiration
Optional
SessionExpiration *f64
- Type: *f64
SessionName
Optional
SessionName *string
- Type: *string
OssBackendConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.OssBackendConfig {
Bucket: *string,
AccessKey: *string,
Acl: *string,
AssumeRole: github.com/hashicorp/terraform-cdk-go/cdktf.OssAssumeRole,
AssumeRolePolicy: *string,
AssumeRoleRoleArn: *string,
AssumeRoleSessionExpiration: *f64,
AssumeRoleSessionName: *string,
EcsRoleName: *string,
Encrypt: *bool,
Endpoint: *string,
Key: *string,
Prefix: *string,
Profile: *string,
Region: *string,
SecretKey: *string,
SecurityToken: *string,
SharedCredentialsFile: *string,
StsEndpoint: *string,
TablestoreEndpoint: *string,
TablestoreTable: *string,
}
Properties
Name | Type | Description |
---|---|---|
Bucket | *string | (Required) The name of the OSS bucket. |
AccessKey | *string | (Optional) Alibaba Cloud access key. |
Acl | *string | (Optional) Object ACL to be applied to the state file. |
AssumeRole | OssAssumeRole | No description. |
AssumeRolePolicy | *string | (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed. |
AssumeRoleRoleArn | *string | (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials. |
AssumeRoleSessionExpiration | *f64 | (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION. |
AssumeRoleSessionName | *string | (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME. |
EcsRoleName | *string | (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. |
Encrypt | *bool | (Optional) Whether to enable server side encryption of the state file. |
Endpoint | *string | (Optional) A custom endpoint for the OSS API. |
Key | *string | (Optional) The name of the state file. |
Prefix | *string | (Optional) The path directory of the state file will be stored. |
Profile | *string | (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable. |
Region | *string | (Optional) The region of the OSS bucket. |
SecretKey | *string | (Optional) Alibaba Cloud secret access key. |
SecurityToken | *string | (Optional) STS access token. |
SharedCredentialsFile | *string | (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. |
StsEndpoint | *string | (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT. |
TablestoreEndpoint | *string | (Optional) A custom endpoint for the TableStore API. |
TablestoreTable | *string | (Optional) A TableStore table for state locking and consistency. |
Bucket
Required
Bucket *string
- Type: *string
(Required) The name of the OSS bucket.
AccessKey
Optional
AccessKey *string
- Type: *string
(Optional) Alibaba Cloud access key.
It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
Acl
Optional
Acl *string
- Type: *string
(Optional) Object ACL to be applied to the state file.
AssumeRole
Optional
AssumeRole
- Deprecated: Use flattened assume role options
AssumeRole OssAssumeRole
- Type: OssAssumeRole
AssumeRolePolicy
Optional
AssumeRolePolicy *string
- Type: *string
(Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.
AssumeRoleRoleArn
Optional
AssumeRoleRoleArn *string
- Type: *string
(Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials.
AssumeRoleSessionExpiration
Optional
AssumeRoleSessionExpiration *f64
- Type: *f64
(Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION.
AssumeRoleSessionName
Optional
AssumeRoleSessionName *string
- Type: *string
(Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME.
EcsRoleName
Optional
EcsRoleName *string
- Type: *string
(Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.
Encrypt
Optional
Encrypt *bool
- Type: *bool
(Optional) Whether to enable server side encryption of the state file.
If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.
Endpoint
Optional
Endpoint *string
- Type: *string
(Optional) A custom endpoint for the OSS API.
It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
Key
Optional
Key *string
- Type: *string
(Optional) The name of the state file.
Defaults to terraform.tfstate.
Prefix
Optional
Prefix *string
- Type: *string
(Optional) The path directory of the state file will be stored.
Default to "env:".
Profile
Optional
Profile *string
- Type: *string
(Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable.
Region
Optional
Region *string
- Type: *string
(Optional) The region of the OSS bucket.
It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
SecretKey
Optional
SecretKey *string
- Type: *string
(Optional) Alibaba Cloud secret access key.
It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
SecurityToken
Optional
SecurityToken *string
- Type: *string
(Optional) STS access token.
It supports environment variable ALICLOUD_SECURITY_TOKEN.
SharedCredentialsFile
Optional
SharedCredentialsFile *string
- Type: *string
(Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
StsEndpoint
Optional
StsEndpoint *string
- Type: *string
(Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.
TablestoreEndpoint
Optional
TablestoreEndpoint *string
- Type: *string
(Optional) A custom endpoint for the TableStore API.
TablestoreTable
Optional
TablestoreTable *string
- Type: *string
(Optional) A TableStore table for state locking and consistency.
The table must have a primary key named LockID of type String.
PgBackendConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.PgBackendConfig {
ConnStr: *string,
SchemaName: *string,
SkipIndexCreation: *bool,
SkipSchemaCreation: *bool,
SkipTableCreation: *bool,
}
Properties
Name | Type | Description |
---|---|---|
ConnStr | *string | Postgres connection string; |
SchemaName | *string | Name of the automatically-managed Postgres schema, default to terraform_remote_state. |
SkipIndexCreation | *bool | If set to true, the Postgres index must already exist. |
SkipSchemaCreation | *bool | If set to true, the Postgres schema must already exist. |
SkipTableCreation | *bool | If set to true, the Postgres table must already exist. |
ConnStr
Required
ConnStr *string
- Type: *string
Postgres connection string;
a postgres:// URL. The PG_CONN_STR and standard libpq environment variables can also be used to indicate how to connect to the PostgreSQL database.
SchemaName
Optional
SchemaName *string
- Type: *string
Name of the automatically-managed Postgres schema, default to terraform_remote_state.
Can also be set using the PG_SCHEMA_NAME environment variable.
SkipIndexCreation
Optional
SkipIndexCreation *bool
- Type: *bool
If set to true, the Postgres index must already exist.
Can also be set using the PG_SKIP_INDEX_CREATION environment variable. Terraform won't try to create the index, this is useful when it has already been created by a database administrator.
SkipSchemaCreation
Optional
SkipSchemaCreation *bool
- Type: *bool
If set to true, the Postgres schema must already exist.
Can also be set using the PG_SKIP_SCHEMA_CREATION environment variable. Terraform won't try to create the schema, this is useful when it has already been created by a database administrator.
SkipTableCreation
Optional
SkipTableCreation *bool
- Type: *bool
If set to true, the Postgres table must already exist.
Can also be set using the PG_SKIP_TABLE_CREATION environment variable. Terraform won't try to create the table, this is useful when it has already been created by a database administrator.
Postcondition
Terraform checks a postcondition after evaluating the object it is associated with.
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.Postcondition {
Condition: interface{},
ErrorMessage: *string,
}
Properties
Name | Type | Description |
---|---|---|
Condition | interface{} | This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not. |
ErrorMessage | *string | This contains the text that Terraform will include as part of error messages when it detects an unmet condition. |
Condition
Required
Condition interface{}
- Type: interface{}
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
ErrorMessage
Required
ErrorMessage *string
- Type: *string
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
Precondition
Terraform checks a precondition before evaluating the object it is associated with.
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.Precondition {
Condition: interface{},
ErrorMessage: *string,
}
Properties
Name | Type | Description |
---|---|---|
Condition | interface{} | This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not. |
ErrorMessage | *string | This contains the text that Terraform will include as part of error messages when it detects an unmet condition. |
Condition
Required
Condition interface{}
- Type: interface{}
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
ErrorMessage
Required
ErrorMessage *string
- Type: *string
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
RemoteBackendConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.RemoteBackendConfig {
Organization: *string,
Workspaces: github.com/hashicorp/terraform-cdk-go/cdktf.IRemoteWorkspace,
Hostname: *string,
Token: *string,
}
Properties
Name | Type | Description |
---|---|---|
Organization | *string | No description. |
Workspaces | IRemoteWorkspace | No description. |
Hostname | *string | No description. |
Token | *string | No description. |
Organization
Required
Organization *string
- Type: *string
Workspaces
Required
Workspaces IRemoteWorkspace
- Type: IRemoteWorkspace
Hostname
Optional
Hostname *string
- Type: *string
Token
Optional
Token *string
- Type: *string
RemoteExecProvisioner
The remote-exec provisioner invokes a script on a remote resource after it is created.
This can be used to run a configuration management tool, bootstrap into a cluster, etc The remote-exec provisioner requires a connection and supports both ssh and winrm.
See {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-exec remote-exec}
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.RemoteExecProvisioner {
Type: *string,
Connection: interface{},
Inline: *[]*string,
Script: *string,
Scripts: *[]*string,
}
Properties
Name | Type | Description |
---|---|---|
Type | *string | No description. |
Connection | interface{} | Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. |
Inline | _[]_string | This is a list of command strings. |
Script | *string | This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed. |
Scripts | _[]_string | This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed. |
Type
Required
Type *string
- Type: *string
Connection
Optional
Connection interface{}
- Type: interface{}
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
A connection must be provided here or in the parent resource.
Inline
Optional
Inline *[]*string
- Type: _[]_string
This is a list of command strings.
They are executed in the order they are provided. This cannot be provided with script or scripts.
Script
Optional
Script *string
- Type: *string
This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed.
This cannot be provided with inline or scripts.
Scripts
Optional
Scripts *[]*string
- Type: _[]_string
This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed.
They are executed in the order they are provided. This cannot be provided with inline or script.
ResolveOptions
Options to the resolve() operation.
NOT the same as the ResolveContext; ResolveContext is exposed to Token implementors and resolution hooks, whereas this struct is just to bundle a number of things that would otherwise be arguments to resolve() in a readable way.
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.ResolveOptions {
Resolver: github.com/hashicorp/terraform-cdk-go/cdktf.ITokenResolver,
Scope: github.com/aws/constructs-go/constructs/v10.IConstruct,
Preparing: *bool,
}
Properties
Name | Type | Description |
---|---|---|
Resolver | ITokenResolver | The resolver to apply to any resolvable tokens found. |
Scope | github.com/aws/constructs-go/constructs/v10.IConstruct | The scope from which resolution is performed. |
Preparing | *bool | Whether the resolution is being executed during the prepare phase or not. |
Resolver
Required
Resolver ITokenResolver
- Type: ITokenResolver
The resolver to apply to any resolvable tokens found.
Scope
Required
Scope IConstruct
- Type: github.com/aws/constructs-go/constructs/v10.IConstruct
The scope from which resolution is performed.
Preparing
Optional
Preparing *bool
- Type: *bool
- Default: false
Whether the resolution is being executed during the prepare phase or not.
S3BackendAssumeRoleConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.S3BackendAssumeRoleConfig {
RoleArn: *string,
Duration: *string,
ExternalId: *string,
Policy: *string,
PolicyArns: *[]*string,
SessionName: *string,
SourceIdentity: *string,
Tags: *map[string]*string,
TransitiveTagKeys: *[]*string,
}
Properties
Name | Type | Description |
---|---|---|
RoleArn | *string | (Required) Amazon Resource Name (ARN) of the IAM Role to assume. |
Duration | *string | (Optional) The duration individual credentials will be valid. |
ExternalId | *string | (Optional) External identifier to use when assuming the role. |
Policy | *string | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
PolicyArns | _[]_string | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
SessionName | *string | (Optional) Session name to use when assuming the role. |
SourceIdentity | *string | (Optional) Source identity specified by the principal assuming the. |
Tags | _map[string]_string | (Optional) Map of assume role session tags. |
TransitiveTagKeys | _[]_string | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
RoleArn
Required
RoleArn *string
- Type: *string
(Required) Amazon Resource Name (ARN) of the IAM Role to assume.
Duration
Optional
Duration *string
- Type: *string
(Optional) The duration individual credentials will be valid.
Credentials are automatically renewed up to the maximum defined by the AWS account. Specified using the format < hours >h< minutes >m< seconds >s with any unit being optional. For example, an hour and a half can be specified as 1h30m or 90m. Must be between 15 minutes (15m) and 12 hours (12h).
ExternalId
Optional
ExternalId *string
- Type: *string
(Optional) External identifier to use when assuming the role.
Policy
Optional
Policy *string
- Type: *string
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
PolicyArns
Optional
PolicyArns *[]*string
- Type: _[]_string
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
SessionName
Optional
SessionName *string
- Type: *string
(Optional) Session name to use when assuming the role.
SourceIdentity
Optional
SourceIdentity *string
- Type: *string
(Optional) Source identity specified by the principal assuming the.
Tags
Optional
Tags *map[string]*string
- Type: _map[string]_string
(Optional) Map of assume role session tags.
TransitiveTagKeys
Optional
TransitiveTagKeys *[]*string
- Type: _[]_string
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
S3BackendAssumeRoleWithWebIdentityConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.S3BackendAssumeRoleWithWebIdentityConfig {
Duration: *string,
Policy: *string,
PolicyArns: *[]*string,
RoleArn: *string,
SessionName: *string,
WebIdentityToken: *string,
WebIdentityTokenFile: *string,
}
Properties
Name | Type | Description |
---|---|---|
Duration | *string | (Optional) The duration individual credentials will be valid. |
Policy | *string | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
PolicyArns | _[]_string | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
RoleArn | *string | (Required) Amazon Resource Name (ARN) of the IAM Role to assume. |
SessionName | *string | (Optional) Session name to use when assuming the role. |
WebIdentityToken | *string | (Optional) The value of a web identity token from an OpenID Connect (OIDC) or OAuth provider. |
WebIdentityTokenFile | *string | (Optional) File containing a web identity token from an OpenID Connect (OIDC) or OAuth provider. |
Duration
Optional
Duration *string
- Type: *string
(Optional) The duration individual credentials will be valid.
Credentials are automatically renewed up to the maximum defined by the AWS account. Specified using the format < hours >h< minutes >m< seconds >s with any unit being optional. For example, an hour and a half can be specified as 1h30m or 90m. Must be between 15 minutes (15m) and 12 hours (12h).
Policy
Optional
Policy *string
- Type: *string
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
PolicyArns
Optional
PolicyArns *[]*string
- Type: _[]_string
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
RoleArn
Optional
RoleArn *string
- Type: *string
(Required) Amazon Resource Name (ARN) of the IAM Role to assume.
Can also be set with the AWS_ROLE_ARN environment variable.
SessionName
Optional
SessionName *string
- Type: *string
(Optional) Session name to use when assuming the role.
Can also be set with the AWS_ROLE_SESSION_NAME environment variable.
WebIdentityToken
Optional
WebIdentityToken *string
- Type: *string
(Optional) The value of a web identity token from an OpenID Connect (OIDC) or OAuth provider.
One of web_identity_token or web_identity_token_file is required.
WebIdentityTokenFile
Optional
WebIdentityTokenFile *string
- Type: *string
(Optional) File containing a web identity token from an OpenID Connect (OIDC) or OAuth provider.
One of web_identity_token_file or web_identity_token is required. Can also be set with the AWS_WEB_IDENTITY_TOKEN_FILE environment variable.
S3BackendConfig
Stores the state as a given key in a given bucket on Amazon S3.
This backend also supports state locking and consistency checking via Dynamo DB, which can be enabled by setting the dynamodb_table field to an existing DynamoDB table name. A single DynamoDB table can be used to lock multiple remote state files. Terraform generates key names that include the values of the bucket and key variables.
Warning! It is highly recommended that you enable Bucket Versioning on the S3 bucket to allow for state recovery in the case of accidental deletions and human error.
Read more about this backend in the Terraform docs: https://developer.hashicorp.com/terraform/language/settings/backends/s3
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.S3BackendConfig {
Bucket: *string,
Key: *string,
AccessKey: *string,
Acl: *string,
AllowedAccountIds: *[]*string,
AssumeRole: github.com/hashicorp/terraform-cdk-go/cdktf.S3BackendAssumeRoleConfig,
AssumeRolePolicy: *string,
AssumeRolePolicyArns: *[]*string,
AssumeRoleTags: *map[string]*string,
AssumeRoleTransitiveTagKeys: *[]*string,
AssumeRoleWithWebIdentity: github.com/hashicorp/terraform-cdk-go/cdktf.S3BackendAssumeRoleWithWebIdentityConfig,
CustomCaBundle: *string,
DynamodbEndpoint: *string,
DynamodbTable: *string,
Ec2MetadataServiceEndpoint: *string,
Ec2MetadataServiceEndpointMode: *string,
Encrypt: *bool,
Endpoint: *string,
Endpoints: github.com/hashicorp/terraform-cdk-go/cdktf.S3BackendEndpointConfig,
ExternalId: *string,
ForbiddenAccountIds: *[]*string,
ForcePathStyle: *bool,
HttpProxy: *string,
HttpsProxy: *string,
IamEndpoint: *string,
Insecure: *bool,
KmsKeyId: *string,
MaxRetries: *f64,
NoProxy: *string,
Profile: *string,
Region: *string,
RetryMode: *string,
RoleArn: *string,
SecretKey: *string,
SessionName: *string,
SharedConfigFiles: *[]*string,
SharedCredentialsFile: *string,
SharedCredentialsFiles: *[]*string,
SkipCredentialsValidation: *bool,
SkipMetadataApiCheck: *bool,
SkipRegionValidation: *bool,
SkipRequestingAccountId: *bool,
SkipS3Checksum: *bool,
SseCustomerKey: *string,
StsEndpoint: *string,
StsRegion: *string,
Token: *string,
UseLegacyWorkflow: *bool,
UsePathStyle: *bool,
WorkspaceKeyPrefix: *string,
}
Properties
Name | Type | Description |
---|---|---|
Bucket | *string | Name of the S3 Bucket. |
Key | *string | Path to the state file inside the S3 Bucket. |
AccessKey | *string | (Optional) AWS access key. |
Acl | *string | (Optional) Canned ACL to be applied to the state file. |
AllowedAccountIds | _[]_string | (Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment. |
AssumeRole | S3BackendAssumeRoleConfig | Assuming an IAM Role can be configured in two ways. |
AssumeRolePolicy | *string | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
AssumeRolePolicyArns | _[]_string | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
AssumeRoleTags | _map[string]_string | (Optional) Map of assume role session tags. |
AssumeRoleTransitiveTagKeys | _[]_string | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
AssumeRoleWithWebIdentity | S3BackendAssumeRoleWithWebIdentityConfig | Assume Role With Web Identity Configuration. |
CustomCaBundle | *string | (Optional) File containing custom root and intermediate certificates. |
DynamodbEndpoint | *string | (Optional) Custom endpoint for the AWS DynamoDB API. |
DynamodbTable | *string | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
Ec2MetadataServiceEndpoint | *string | Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API. |
Ec2MetadataServiceEndpointMode | *string | (Optional) Mode to use in communicating with the metadata service. |
Encrypt | *bool | (Optional) Enable server side encryption of the state file. |
Endpoint | *string | (Optional) Custom endpoint for the AWS S3 API. |
Endpoints | S3BackendEndpointConfig | (Optional) The endpoint configuration block. |
ExternalId | *string | (Optional) External identifier to use when assuming the role. |
ForbiddenAccountIds | _[]_string | (Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment. |
ForcePathStyle | *bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
HttpProxy | *string | (Optional) URL of a proxy to use for HTTP requests when accessing the AWS API. |
HttpsProxy | *string | (Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API. |
IamEndpoint | *string | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
Insecure | *bool | Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests. |
KmsKeyId | *string | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
MaxRetries | *f64 | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
NoProxy | *string | (Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies. |
Profile | *string | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
Region | *string | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
RetryMode | *string | (Optional) Specifies how retries are attempted. |
RoleArn | *string | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
SecretKey | *string | (Optional) AWS secret access key. |
SessionName | *string | (Optional) Session name to use when assuming the role. |
SharedConfigFiles | _[]_string | (Optional) List of paths to AWS shared configuration files. |
SharedCredentialsFile | *string | (Optional) Path to the AWS shared credentials file. |
SharedCredentialsFiles | _[]_string | (Optional) List of paths to AWS shared credentials files. |
SkipCredentialsValidation | *bool | (Optional) Skip credentials validation via the STS API. |
SkipMetadataApiCheck | *bool | (Optional) Skip usage of EC2 Metadata API. |
SkipRegionValidation | *bool | (Optional) Skip validation of provided region name. |
SkipRequestingAccountId | *bool | (Optional) Whether to skip requesting the account ID. |
SkipS3Checksum | *bool | (Optional) Do not include checksum when uploading S3 Objects. |
SseCustomerKey | *string | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
StsEndpoint | *string | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
StsRegion | *string | (Optional) AWS region for STS. |
Token | *string | (Optional) Multi-Factor Authentication (MFA) token. |
UseLegacyWorkflow | *bool | (Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration. |
UsePathStyle | *bool | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
WorkspaceKeyPrefix | *string | (Optional) Prefix applied to the state path inside the bucket. |
Bucket
Required
Bucket *string
- Type: *string
Name of the S3 Bucket.
Key
Required
Key *string
- Type: *string
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
AccessKey
Optional
AccessKey *string
- Type: *string
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
Acl
Optional
Acl *string
- Type: *string
(Optional) Canned ACL to be applied to the state file.
AllowedAccountIds
Optional
AllowedAccountIds *[]*string
- Type: _[]_string
(Optional) List of allowed AWS account IDs to prevent potential destruction of a live environment.
Conflicts with forbidden_account_ids.
AssumeRole
Optional
AssumeRole S3BackendAssumeRoleConfig
Assuming an IAM Role can be configured in two ways.
The preferred way is to use the argument assume_role, the other, which is deprecated, is with arguments at the top level.
AssumeRolePolicy
Optional
AssumeRolePolicy
- Deprecated: Use assumeRole.policy instead.
AssumeRolePolicy *string
- Type: *string
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
AssumeRolePolicyArns
Optional
AssumeRolePolicyArns
- Deprecated: Use assumeRole.policyArns instead.
AssumeRolePolicyArns *[]*string
- Type: _[]_string
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
AssumeRoleTags
Optional
AssumeRoleTags
- Deprecated: Use assumeRole.tags instead.
AssumeRoleTags *map[string]*string
- Type: _map[string]_string
(Optional) Map of assume role session tags.
AssumeRoleTransitiveTagKeys
Optional
AssumeRoleTransitiveTagKeys
- Deprecated: Use assumeRole.transitiveTagKeys instead.
AssumeRoleTransitiveTagKeys *[]*string
- Type: _[]_string
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
AssumeRoleWithWebIdentity
Optional
AssumeRoleWithWebIdentity S3BackendAssumeRoleWithWebIdentityConfig
Assume Role With Web Identity Configuration.
CustomCaBundle
Optional
CustomCaBundle *string
- Type: *string
(Optional) File containing custom root and intermediate certificates.
Can also be set using the AWS_CA_BUNDLE environment variable. Setting ca_bundle in the shared config file is not supported.
DynamodbEndpoint
Optional
DynamodbEndpoint
- Deprecated: Use endpoints.dynamodb instead
DynamodbEndpoint *string
- Type: *string
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
DynamodbTable
Optional
DynamodbTable *string
- Type: *string
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
Ec2MetadataServiceEndpoint
Optional
Ec2MetadataServiceEndpoint *string
- Type: *string
Optional) Custom endpoint URL for the EC2 Instance Metadata Service (IMDS) API.
Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT environment variable.
Ec2MetadataServiceEndpointMode
Optional
Ec2MetadataServiceEndpointMode *string
- Type: *string
(Optional) Mode to use in communicating with the metadata service.
Valid values are IPv4 and IPv6. Can also be set with the AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE environment variable.
Encrypt
Optional
Encrypt *bool
- Type: *bool
(Optional) Enable server side encryption of the state file.
Endpoint
Optional
Endpoint
- Deprecated: Use endpoints.s3 instead
Endpoint *string
- Type: *string
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
Endpoints
Optional
Endpoints S3BackendEndpointConfig
- Type: S3BackendEndpointConfig
(Optional) The endpoint configuration block.
ExternalId
Optional
ExternalId
- Deprecated: Use assume_role.external_id instead.
ExternalId *string
- Type: *string
(Optional) External identifier to use when assuming the role.
ForbiddenAccountIds
Optional
ForbiddenAccountIds *[]*string
- Type: _[]_string
(Optional) List of forbidden AWS account IDs to prevent potential destruction of a live environment.
Conflicts with allowed_account_ids.
ForcePathStyle
Optional
ForcePathStyle
- Deprecated: Use usePathStyle instead
ForcePathStyle *bool
- Type: *bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
HttpProxy
Optional
HttpProxy *string
- Type: *string
(Optional) URL of a proxy to use for HTTP requests when accessing the AWS API.
Can also be set using the HTTP_PROXY or http_proxy environment variables.
HttpsProxy
Optional
HttpsProxy *string
- Type: *string
(Optional) URL of a proxy to use for HTTPS requests when accessing the AWS API.
Can also be set using the HTTPS_PROXY or https_proxy environment variables.
IamEndpoint
Optional
IamEndpoint
- Deprecated: Use endpoints.iam instead
IamEndpoint *string
- Type: *string
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
Insecure
Optional
Insecure *bool
- Type: *bool
Optional) Whether to explicitly allow the backend to perform "insecure" SSL requests.
If omitted, the default value is false.
KmsKeyId
Optional
KmsKeyId *string
- Type: *string
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
MaxRetries
Optional
MaxRetries *f64
- Type: *f64
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
NoProxy
Optional
NoProxy *string
- Type: *string
(Optional) Comma-separated list of hosts that should not use HTTP or HTTPS proxies.
Each value can be one of:
- A domain name
- An IP address
- A CIDR address
- An asterisk (*), to indicate that no proxying should be performed Domain name and IP address values can also include a port number. Can also be set using the NO_PROXY or no_proxy environment variables.
Profile
Optional
Profile *string
- Type: *string
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
Region
Optional
Region *string
- Type: *string
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
RetryMode
Optional
RetryMode *string
- Type: *string
(Optional) Specifies how retries are attempted.
Valid values are standard and adaptive. Can also be configured using the AWS_RETRY_MODE environment variable or the shared config file parameter retry_mode.
RoleArn
Optional
RoleArn
- Deprecated: Use assumeRole.roleArn instead.
RoleArn *string
- Type: *string
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
SecretKey
Optional
SecretKey *string
- Type: *string
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
SessionName
Optional
SessionName
- Deprecated: Use assumeRole.sessionName instead.
SessionName *string
- Type: *string
(Optional) Session name to use when assuming the role.
SharedConfigFiles
Optional
SharedConfigFiles *[]*string
- Type: _[]_string
(Optional) List of paths to AWS shared configuration files.
Defaults to ~/.aws/config.
SharedCredentialsFile
Optional
SharedCredentialsFile *string
- Type: *string
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
SharedCredentialsFiles
Optional
SharedCredentialsFiles *[]*string
- Type: _[]_string
(Optional) List of paths to AWS shared credentials files.
Defaults to ~/.aws/credentials.
SkipCredentialsValidation
Optional
SkipCredentialsValidation *bool
- Type: *bool
(Optional) Skip credentials validation via the STS API.
SkipMetadataApiCheck
Optional
SkipMetadataApiCheck *bool
- Type: *bool
(Optional) Skip usage of EC2 Metadata API.
SkipRegionValidation
Optional
SkipRegionValidation *bool
- Type: *bool
(Optional) Skip validation of provided region name.
SkipRequestingAccountId
Optional
SkipRequestingAccountId *bool
- Type: *bool
(Optional) Whether to skip requesting the account ID.
Useful for AWS API implementations that do not have the IAM, STS API, or metadata API.
SkipS3Checksum
Optional
SkipS3Checksum *bool
- Type: *bool
(Optional) Do not include checksum when uploading S3 Objects.
Useful for some S3-Compatible APIs.
SseCustomerKey
Optional
SseCustomerKey *string
- Type: *string
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
StsEndpoint
Optional
StsEndpoint
- Deprecated: Use endpoints.sts instead
StsEndpoint *string
- Type: *string
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
StsRegion
Optional
StsRegion *string
- Type: *string
(Optional) AWS region for STS.
If unset, AWS will use the same region for STS as other non-STS operations.
Token
Optional
Token *string
- Type: *string
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
UseLegacyWorkflow
Optional
UseLegacyWorkflow *bool
- Type: *bool
(Optional) Use the legacy authentication workflow, preferring environment variables over backend configuration.
Defaults to true. This behavior does not align with the authentication flow of the AWS CLI or SDK's, and will be removed in the future.
UsePathStyle
Optional
UsePathStyle *bool
- Type: *bool
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
WorkspaceKeyPrefix
Optional
WorkspaceKeyPrefix *string
- Type: *string
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
S3BackendEndpointConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.S3BackendEndpointConfig {
Dynamodb: *string,
Iam: *string,
S3: *string,
Sso: *string,
Sts: *string,
}
Properties
Name | Type | Description |
---|---|---|
Dynamodb | *string | (Optional) Custom endpoint URL for the AWS DynamoDB API. |
Iam | *string | (Optional) Custom endpoint URL for the AWS IAM API. |
S3 | *string | (Optional) Custom endpoint URL for the AWS S3 API. |
Sso | *string | (Optional) Custom endpoint URL for the AWS IAM Identity Center (formerly known as AWS SSO) API. |
Sts | *string | (Optional) Custom endpoint URL for the AWS STS API. |
Dynamodb
Optional
Dynamodb *string
- Type: *string
(Optional) Custom endpoint URL for the AWS DynamoDB API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_DYNAMODB or the deprecated environment variable AWS_DYNAMODB_ENDPOINT.
Iam
Optional
Iam *string
- Type: *string
(Optional) Custom endpoint URL for the AWS IAM API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_IAM or the deprecated environment variable AWS_IAM_ENDPOINT.
S3
Optional
S3 *string
- Type: *string
(Optional) Custom endpoint URL for the AWS S3 API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_S3 or the deprecated environment variable AWS_S3_ENDPOINT.
Sso
Optional
Sso *string
- Type: *string
(Optional) Custom endpoint URL for the AWS IAM Identity Center (formerly known as AWS SSO) API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_SSO.
Sts
Optional
Sts *string
- Type: *string
(Optional) Custom endpoint URL for the AWS STS API.
This can also be sourced from the environment variable AWS_ENDPOINT_URL_STS or the deprecated environment variable AWS_STS_ENDPOINT.
SSHProvisionerConnection
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
Refer to {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection connection}
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.SSHProvisionerConnection {
Host: *string,
Type: *string,
Agent: *string,
AgentIdentity: *string,
BastionCertificate: *string,
BastionHost: *string,
BastionHostKey: *string,
BastionPassword: *string,
BastionPort: *f64,
BastionPrivateKey: *string,
BastionUser: *string,
Certificate: *string,
HostKey: *string,
Password: *string,
Port: *f64,
PrivateKey: *string,
ProxyHost: *string,
ProxyPort: *f64,
ProxyScheme: *string,
ProxyUserName: *string,
ProxyUserPassword: *string,
ScriptPath: *string,
TargetPlatform: *string,
Timeout: *string,
User: *string,
}
Properties
Name | Type | Description |
---|---|---|
Host | *string | The address of the resource to connect to. |
Type | *string | The connection type. |
Agent | *string | Set to false to disable using ssh-agent to authenticate. |
AgentIdentity | *string | The preferred identity from the ssh agent for authentication. |
BastionCertificate | *string | The contents of a signed CA Certificate. |
BastionHost | *string | Setting this enables the bastion Host connection. |
BastionHostKey | *string | The public key from the remote host or the signing CA, used to verify the host connection. |
BastionPassword | *string | The password to use for the bastion host. |
BastionPort | *f64 | The port to use connect to the bastion host. |
BastionPrivateKey | *string | The contents of an SSH key file to use for the bastion host. |
BastionUser | *string | The user for the connection to the bastion host. |
Certificate | *string | The contents of a signed CA Certificate. |
HostKey | *string | The public key from the remote host or the signing CA, used to verify the connection. |
Password | *string | The password to use for the connection. |
Port | *f64 | The port to connect to. |
PrivateKey | *string | The contents of an SSH key to use for the connection. |
ProxyHost | *string | Setting this enables the SSH over HTTP connection. |
ProxyPort | *f64 | The port to use connect to the proxy host. |
ProxyScheme | *string | The ssh connection also supports the following fields to facilitate connections by SSH over HTTP proxy. |
ProxyUserName | *string | The username to use connect to the private proxy host. |
ProxyUserPassword | *string | The password to use connect to the private proxy host. |
ScriptPath | *string | The path used to copy scripts meant for remote execution. |
TargetPlatform | *string | The target platform to connect to. |
Timeout | *string | The timeout to wait for the connection to become available. |
User | *string | The user to use for the connection. |
Host
Required
Host *string
- Type: *string
The address of the resource to connect to.
Type
Required
Type *string
- Type: *string
The connection type.
Valid values are "ssh" and "winrm". Provisioners typically assume that the remote system runs Microsoft Windows when using WinRM. Behaviors based on the SSH target_platform will force Windows-specific behavior for WinRM, unless otherwise specified.
Agent
Optional
Agent *string
- Type: *string
Set to false to disable using ssh-agent to authenticate.
On Windows the only supported SSH authentication agent is Pageant.
AgentIdentity
Optional
AgentIdentity *string
- Type: *string
The preferred identity from the ssh agent for authentication.
BastionCertificate
Optional
BastionCertificate *string
- Type: *string
The contents of a signed CA Certificate.
The certificate argument must be used in conjunction with a bastion_private_key. These can be loaded from a file on disk using the the file function.
BastionHost
Optional
BastionHost *string
- Type: *string
Setting this enables the bastion Host connection.
The provisioner will connect to bastion_host first, and then connect from there to host.
BastionHostKey
Optional
BastionHostKey *string
- Type: *string
The public key from the remote host or the signing CA, used to verify the host connection.
BastionPassword
Optional
BastionPassword *string
- Type: *string
The password to use for the bastion host.
BastionPort
Optional
BastionPort *f64
- Type: *f64
The port to use connect to the bastion host.
BastionPrivateKey
Optional
BastionPrivateKey *string
- Type: *string
The contents of an SSH key file to use for the bastion host.
These can be loaded from a file on disk using the file function.
BastionUser
Optional
BastionUser *string
- Type: *string
The user for the connection to the bastion host.
Certificate
Optional
Certificate *string
- Type: *string
The contents of a signed CA Certificate.
The certificate argument must be used in conjunction with a private_key. These can be loaded from a file on disk using the the file function.
HostKey
Optional
HostKey *string
- Type: *string
The public key from the remote host or the signing CA, used to verify the connection.
Password
Optional
Password *string
- Type: *string
The password to use for the connection.
Port
Optional
Port *f64
- Type: *f64
- Default: 22
The port to connect to.
PrivateKey
Optional
PrivateKey *string
- Type: *string
The contents of an SSH key to use for the connection.
These can be loaded from a file on disk using the file function. This takes preference over password if provided.
ProxyHost
Optional
ProxyHost *string
- Type: *string
Setting this enables the SSH over HTTP connection.
This host will be connected to first, and then the host or bastion_host connection will be made from there.
ProxyPort
Optional
ProxyPort *f64
- Type: *f64
The port to use connect to the proxy host.
ProxyScheme
Optional
ProxyScheme *string
- Type: *string
The ssh connection also supports the following fields to facilitate connections by SSH over HTTP proxy.
ProxyUserName
Optional
ProxyUserName *string
- Type: *string
The username to use connect to the private proxy host.
This argument should be specified only if authentication is required for the HTTP Proxy server.
ProxyUserPassword
Optional
ProxyUserPassword *string
- Type: *string
The password to use connect to the private proxy host.
This argument should be specified only if authentication is required for the HTTP Proxy server.
ScriptPath
Optional
ScriptPath *string
- Type: *string
The path used to copy scripts meant for remote execution.
Refer to {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts How Provisioners Execute Remote Scripts below for more details}
TargetPlatform
Optional
TargetPlatform *string
- Type: *string
- Default: unix
The target platform to connect to.
Valid values are "windows" and "unix". If the platform is set to windows, the default scriptpath is c:\windows\temp\terraform%RAND%.cmd, assuming the SSH default shell is cmd.exe. If the SSH default shell is PowerShell, set scriptpath to "c:/windows/temp/terraform%RAND%.ps1"
Timeout
Optional
Timeout *string
- Type: *string
- Default: 5m
The timeout to wait for the connection to become available.
Should be provided as a string (e.g., "30s" or "5m".)
User
Optional
User *string
- Type: *string
- Default: root
The user to use for the connection.
StackAnnotation
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.StackAnnotation {
ConstructPath: *string,
Level: github.com/hashicorp/terraform-cdk-go/cdktf.AnnotationMetadataEntryType,
Message: *string,
Stacktrace: *[]*string,
}
Properties
Name | Type | Description |
---|---|---|
ConstructPath | *string | No description. |
Level | AnnotationMetadataEntryType | No description. |
Message | *string | No description. |
Stacktrace | _[]_string | No description. |
ConstructPath
Required
ConstructPath *string
- Type: *string
Level
Required
Level AnnotationMetadataEntryType
Message
Required
Message *string
- Type: *string
Stacktrace
Optional
Stacktrace *[]*string
- Type: _[]_string
StackManifest
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.StackManifest {
Annotations: *[]github.com/hashicorp/terraform-cdk-go/cdktf.StackAnnotation,
ConstructPath: *string,
Dependencies: *[]*string,
Name: *string,
StackMetadataPath: *string,
SynthesizedStackPath: *string,
WorkingDirectory: *string,
}
Properties
Name | Type | Description |
---|---|---|
Annotations | *[]StackAnnotation | No description. |
ConstructPath | *string | No description. |
Dependencies | _[]_string | No description. |
Name | *string | No description. |
StackMetadataPath | *string | No description. |
SynthesizedStackPath | *string | No description. |
WorkingDirectory | *string | No description. |
Annotations
Required
Annotations *[]StackAnnotation
- Type: *[]StackAnnotation
ConstructPath
Required
ConstructPath *string
- Type: *string
Dependencies
Required
Dependencies *[]*string
- Type: _[]_string
Name
Required
Name *string
- Type: *string
StackMetadataPath
Required
StackMetadataPath *string
- Type: *string
SynthesizedStackPath
Required
SynthesizedStackPath *string
- Type: *string
WorkingDirectory
Required
WorkingDirectory *string
- Type: *string
SwiftBackendConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.SwiftBackendConfig {
Container: *string,
ApplicationCredentialId: *string,
ApplicationCredentialName: *string,
ApplicationCredentialSecret: *string,
ArchiveContainer: *string,
AuthUrl: *string,
CacertFile: *string,
Cert: *string,
Cloud: *string,
DefaultDomain: *string,
DomainId: *string,
DomainName: *string,
ExpireAfter: *string,
Insecure: *bool,
Key: *string,
Password: *string,
ProjectDomainId: *string,
ProjectDomainName: *string,
RegionName: *string,
StateName: *string,
TenantId: *string,
TenantName: *string,
Token: *string,
UserDomainId: *string,
UserDomainName: *string,
UserId: *string,
UserName: *string,
}
Properties
Name | Type | Description |
---|---|---|
Container | *string | No description. |
ApplicationCredentialId | *string | No description. |
ApplicationCredentialName | *string | No description. |
ApplicationCredentialSecret | *string | No description. |
ArchiveContainer | *string | No description. |
AuthUrl | *string | No description. |
CacertFile | *string | No description. |
Cert | *string | No description. |
Cloud | *string | No description. |
DefaultDomain | *string | No description. |
DomainId | *string | No description. |
DomainName | *string | No description. |
ExpireAfter | *string | No description. |
Insecure | *bool | No description. |
Key | *string | No description. |
Password | *string | No description. |
ProjectDomainId | *string | No description. |
ProjectDomainName | *string | No description. |
RegionName | *string | No description. |
StateName | *string | No description. |
TenantId | *string | No description. |
TenantName | *string | No description. |
Token | *string | No description. |
UserDomainId | *string | No description. |
UserDomainName | *string | No description. |
UserId | *string | No description. |
UserName | *string | No description. |
Container
Required
Container
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Container *string
- Type: *string
ApplicationCredentialId
Optional
ApplicationCredentialId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ApplicationCredentialId *string
- Type: *string
ApplicationCredentialName
Optional
ApplicationCredentialName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ApplicationCredentialName *string
- Type: *string
ApplicationCredentialSecret
Optional
ApplicationCredentialSecret
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ApplicationCredentialSecret *string
- Type: *string
ArchiveContainer
Optional
ArchiveContainer
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ArchiveContainer *string
- Type: *string
AuthUrl
Optional
AuthUrl
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
AuthUrl *string
- Type: *string
CacertFile
Optional
CacertFile
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
CacertFile *string
- Type: *string
Cert
Optional
Cert
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Cert *string
- Type: *string
Cloud
Optional
Cloud
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Cloud *string
- Type: *string
DefaultDomain
Optional
DefaultDomain
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
DefaultDomain *string
- Type: *string
DomainId
Optional
DomainId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
DomainId *string
- Type: *string
DomainName
Optional
DomainName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
DomainName *string
- Type: *string
ExpireAfter
Optional
ExpireAfter
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ExpireAfter *string
- Type: *string
Insecure
Optional
Insecure
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Insecure *bool
- Type: *bool
Key
Optional
Key
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Key *string
- Type: *string
Password
Optional
Password
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Password *string
- Type: *string
ProjectDomainId
Optional
ProjectDomainId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ProjectDomainId *string
- Type: *string
ProjectDomainName
Optional
ProjectDomainName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
ProjectDomainName *string
- Type: *string
RegionName
Optional
RegionName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
RegionName *string
- Type: *string
StateName
Optional
StateName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
StateName *string
- Type: *string
TenantId
Optional
TenantId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
TenantId *string
- Type: *string
TenantName
Optional
TenantName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
TenantName *string
- Type: *string
Token
Optional
Token
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
Token *string
- Type: *string
UserDomainId
Optional
UserDomainId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
UserDomainId *string
- Type: *string
UserDomainName
Optional
UserDomainName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
UserDomainName *string
- Type: *string
UserId
Optional
UserId
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
UserId *string
- Type: *string
UserName
Optional
UserName
- Deprecated: CDK for Terraform no longer supports the swift backend. Terraform deprecated swift in v1.2.3 and removed it in v1.3.
UserName *string
- Type: *string
TerraformAssetConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformAssetConfig {
Path: *string,
AssetHash: *string,
Type: github.com/hashicorp/terraform-cdk-go/cdktf.AssetType,
}
Properties
Name | Type | Description |
---|---|---|
Path | *string | No description. |
AssetHash | *string | No description. |
Type | AssetType | No description. |
Path
Required
Path *string
- Type: *string
AssetHash
Optional
AssetHash *string
- Type: *string
Type
Optional
Type AssetType
- Type: AssetType
TerraformCondition
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformCondition {
Condition: interface{},
ErrorMessage: *string,
}
Properties
Name | Type | Description |
---|---|---|
Condition | interface{} | This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not. |
ErrorMessage | *string | This contains the text that Terraform will include as part of error messages when it detects an unmet condition. |
Condition
Required
Condition interface{}
- Type: interface{}
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
ErrorMessage
Required
ErrorMessage *string
- Type: *string
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
TerraformConstructor
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf/testingmatchers"
&testingmatchers.TerraformConstructor {
TfResourceType: *string,
}
Properties
Name | Type | Description |
---|---|---|
TfResourceType | *string | No description. |
TfResourceType
Required
TfResourceType *string
- Type: *string
TerraformElementMetadata
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformElementMetadata {
Path: *string,
StackTrace: *[]*string,
UniqueId: *string,
}
Properties
Name | Type | Description |
---|---|---|
Path | *string | No description. |
StackTrace | _[]_string | No description. |
UniqueId | *string | No description. |
Path
Required
Path *string
- Type: *string
StackTrace
Required
StackTrace *[]*string
- Type: _[]_string
UniqueId
Required
UniqueId *string
- Type: *string
TerraformHclModuleConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformHclModuleConfig {
DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable,
ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator,
Providers: *[]interface{},
SkipAssetCreationFromLocalModules: *bool,
Source: *string,
Version: *string,
Variables: *map[string]interface{},
}
Properties
Name | Type | Description |
---|---|---|
DependsOn | *[]ITerraformDependable | No description. |
ForEach | ITerraformIterator | No description. |
Providers | *[]interface{} | No description. |
SkipAssetCreationFromLocalModules | *bool | No description. |
Source | *string | No description. |
Version | *string | No description. |
Variables | *map[string]interface{} | No description. |
DependsOn
Optional
DependsOn *[]ITerraformDependable
- Type: *[]ITerraformDependable
ForEach
Optional
ForEach ITerraformIterator
- Type: ITerraformIterator
Providers
Optional
Providers *[]interface{}
- Type: *[]interface{}
SkipAssetCreationFromLocalModules
Optional
SkipAssetCreationFromLocalModules *bool
- Type: *bool
Source
Required
Source *string
- Type: *string
Version
Optional
Version *string
- Type: *string
Variables
Optional
Variables *map[string]interface{}
- Type: *map[string]interface{}
TerraformMetaArguments
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformMetaArguments {
Connection: interface{},
Count: interface{},
DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable,
ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator,
Lifecycle: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformResourceLifecycle,
Provider: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider,
Provisioners: *[]interface{},
}
Properties
Name | Type | Description |
---|---|---|
Connection | interface{} | No description. |
Count | interface{} | No description. |
DependsOn | *[]ITerraformDependable | No description. |
ForEach | ITerraformIterator | No description. |
Lifecycle | TerraformResourceLifecycle | No description. |
Provider | TerraformProvider | No description. |
Provisioners | *[]interface{} | No description. |
Connection
Optional
Connection interface{}
- Type: interface{}
Count
Optional
Count interface{}
- Type: interface{}
DependsOn
Optional
DependsOn *[]ITerraformDependable
- Type: *[]ITerraformDependable
ForEach
Optional
ForEach ITerraformIterator
- Type: ITerraformIterator
Lifecycle
Optional
Lifecycle TerraformResourceLifecycle
Provider
Optional
Provider TerraformProvider
- Type: TerraformProvider
Provisioners
Optional
Provisioners *[]interface{}
- Type: *[]interface{}
TerraformModuleConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformModuleConfig {
DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable,
ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator,
Providers: *[]interface{},
SkipAssetCreationFromLocalModules: *bool,
Source: *string,
Version: *string,
}
Properties
Name | Type | Description |
---|---|---|
DependsOn | *[]ITerraformDependable | No description. |
ForEach | ITerraformIterator | No description. |
Providers | *[]interface{} | No description. |
SkipAssetCreationFromLocalModules | *bool | No description. |
Source | *string | No description. |
Version | *string | No description. |
DependsOn
Optional
DependsOn *[]ITerraformDependable
- Type: *[]ITerraformDependable
ForEach
Optional
ForEach ITerraformIterator
- Type: ITerraformIterator
Providers
Optional
Providers *[]interface{}
- Type: *[]interface{}
SkipAssetCreationFromLocalModules
Optional
SkipAssetCreationFromLocalModules *bool
- Type: *bool
Source
Required
Source *string
- Type: *string
Version
Optional
Version *string
- Type: *string
TerraformModuleProvider
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformModuleProvider {
ModuleAlias: *string,
Provider: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider,
}
Properties
Name | Type | Description |
---|---|---|
ModuleAlias | *string | No description. |
Provider | TerraformProvider | No description. |
ModuleAlias
Required
ModuleAlias *string
- Type: *string
Provider
Required
Provider TerraformProvider
- Type: TerraformProvider
TerraformModuleUserConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformModuleUserConfig {
DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable,
ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator,
Providers: *[]interface{},
SkipAssetCreationFromLocalModules: *bool,
}
Properties
Name | Type | Description |
---|---|---|
DependsOn | *[]ITerraformDependable | No description. |
ForEach | ITerraformIterator | No description. |
Providers | *[]interface{} | No description. |
SkipAssetCreationFromLocalModules | *bool | No description. |
DependsOn
Optional
DependsOn *[]ITerraformDependable
- Type: *[]ITerraformDependable
ForEach
Optional
ForEach ITerraformIterator
- Type: ITerraformIterator
Providers
Optional
Providers *[]interface{}
- Type: *[]interface{}
SkipAssetCreationFromLocalModules
Optional
SkipAssetCreationFromLocalModules *bool
- Type: *bool
TerraformOutputConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformOutputConfig {
Value: interface{},
DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable,
Description: *string,
Precondition: github.com/hashicorp/terraform-cdk-go/cdktf.Precondition,
Sensitive: *bool,
StaticId: *bool,
}
Properties
Name | Type | Description |
---|---|---|
Value | interface{} | No description. |
DependsOn | *[]ITerraformDependable | No description. |
Description | *string | No description. |
Precondition | Precondition | No description. |
Sensitive | *bool | No description. |
StaticId | *bool | If set to true the synthesized Terraform Output will be named after the id passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId). |
Value
Required
Value interface{}
- Type: interface{}
DependsOn
Optional
DependsOn *[]ITerraformDependable
- Type: *[]ITerraformDependable
Description
Optional
Description *string
- Type: *string
Precondition
Optional
Precondition Precondition
- Type: Precondition
Sensitive
Optional
Sensitive *bool
- Type: *bool
StaticId
Optional
StaticId *bool
- Type: *bool
- Default: false
If set to true the synthesized Terraform Output will be named after the id
passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId).
TerraformProviderConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformProviderConfig {
TerraformResourceType: *string,
TerraformGeneratorMetadata: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProviderGeneratorMetadata,
TerraformProviderSource: *string,
}
Properties
Name | Type | Description |
---|---|---|
TerraformResourceType | *string | No description. |
TerraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
TerraformProviderSource | *string | No description. |
TerraformResourceType
Required
TerraformResourceType *string
- Type: *string
TerraformGeneratorMetadata
Optional
TerraformGeneratorMetadata TerraformProviderGeneratorMetadata
TerraformProviderSource
Optional
TerraformProviderSource *string
- Type: *string
TerraformProviderGeneratorMetadata
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformProviderGeneratorMetadata {
ProviderName: *string,
ProviderVersion: *string,
ProviderVersionConstraint: *string,
}
Properties
Name | Type | Description |
---|---|---|
ProviderName | *string | No description. |
ProviderVersion | *string | No description. |
ProviderVersionConstraint | *string | No description. |
ProviderName
Required
ProviderName *string
- Type: *string
ProviderVersion
Optional
ProviderVersion *string
- Type: *string
ProviderVersionConstraint
Optional
ProviderVersionConstraint *string
- Type: *string
TerraformResourceConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformResourceConfig {
Connection: interface{},
Count: interface{},
DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable,
ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator,
Lifecycle: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformResourceLifecycle,
Provider: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider,
Provisioners: *[]interface{},
TerraformResourceType: *string,
TerraformGeneratorMetadata: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProviderGeneratorMetadata,
}
Properties
Name | Type | Description |
---|---|---|
Connection | interface{} | No description. |
Count | interface{} | No description. |
DependsOn | *[]ITerraformDependable | No description. |
ForEach | ITerraformIterator | No description. |
Lifecycle | TerraformResourceLifecycle | No description. |
Provider | TerraformProvider | No description. |
Provisioners | *[]interface{} | No description. |
TerraformResourceType | *string | No description. |
TerraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
Connection
Optional
Connection interface{}
- Type: interface{}
Count
Optional
Count interface{}
- Type: interface{}
DependsOn
Optional
DependsOn *[]ITerraformDependable
- Type: *[]ITerraformDependable
ForEach
Optional
ForEach ITerraformIterator
- Type: ITerraformIterator
Lifecycle
Optional
Lifecycle TerraformResourceLifecycle
Provider
Optional
Provider TerraformProvider
- Type: TerraformProvider
Provisioners
Optional
Provisioners *[]interface{}
- Type: *[]interface{}
TerraformResourceType
Required
TerraformResourceType *string
- Type: *string
TerraformGeneratorMetadata
Optional
TerraformGeneratorMetadata TerraformProviderGeneratorMetadata
TerraformResourceImport
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformResourceImport {
Id: *string,
Provider: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider,
}
Properties
Name | Type | Description |
---|---|---|
Id | *string | No description. |
Provider | TerraformProvider | No description. |
Id
Required
Id *string
- Type: *string
Provider
Optional
Provider TerraformProvider
- Type: TerraformProvider
TerraformResourceLifecycle
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformResourceLifecycle {
CreateBeforeDestroy: *bool,
IgnoreChanges: interface{},
Postcondition: *[]github.com/hashicorp/terraform-cdk-go/cdktf.Postcondition,
Precondition: *[]github.com/hashicorp/terraform-cdk-go/cdktf.Precondition,
PreventDestroy: *bool,
ReplaceTriggeredBy: *[]interface{},
}
Properties
Name | Type | Description |
---|---|---|
CreateBeforeDestroy | *bool | No description. |
IgnoreChanges | interface{} | No description. |
Postcondition | *[]Postcondition | No description. |
Precondition | *[]Precondition | No description. |
PreventDestroy | *bool | No description. |
ReplaceTriggeredBy | *[]interface{} | No description. |
CreateBeforeDestroy
Optional
CreateBeforeDestroy *bool
- Type: *bool
IgnoreChanges
Optional
IgnoreChanges interface{}
- Type: interface{}
Postcondition
Optional
Postcondition *[]Postcondition
- Type: *[]Postcondition
Precondition
Optional
Precondition *[]Precondition
- Type: *[]Precondition
PreventDestroy
Optional
PreventDestroy *bool
- Type: *bool
ReplaceTriggeredBy
Optional
ReplaceTriggeredBy *[]interface{}
- Type: *[]interface{}
TerraformResourceMoveById
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformResourceMoveById {
From: *string,
To: *string,
}
Properties
From
Required
From *string
- Type: *string
To
Required
To *string
- Type: *string
TerraformResourceMoveByTarget
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformResourceMoveByTarget {
MoveTarget: *string,
Index: interface{},
}
Properties
Name | Type | Description |
---|---|---|
MoveTarget | *string | No description. |
Index | interface{} | No description. |
MoveTarget
Required
MoveTarget *string
- Type: *string
Index
Optional
Index interface{}
- Type: interface{}
TerraformStackMetadata
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformStackMetadata {
Backend: *string,
StackName: *string,
Version: *string,
Cloud: *string,
}
Properties
Name | Type | Description |
---|---|---|
Backend | *string | No description. |
StackName | *string | No description. |
Version | *string | No description. |
Cloud | *string | No description. |
Backend
Required
Backend *string
- Type: *string
StackName
Required
StackName *string
- Type: *string
Version
Required
Version *string
- Type: *string
Cloud
Optional
Cloud *string
- Type: *string
TerraformVariableConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformVariableConfig {
Default: interface{},
Description: *string,
Nullable: *bool,
Sensitive: *bool,
Type: *string,
Validation: *[]github.com/hashicorp/terraform-cdk-go/cdktf.TerraformVariableValidationConfig,
}
Properties
Name | Type | Description |
---|---|---|
Default | interface{} | No description. |
Description | *string | No description. |
Nullable | *bool | No description. |
Sensitive | *bool | No description. |
Type | *string | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. |
Validation | *[]TerraformVariableValidationConfig | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. |
Default
Optional
Default interface{}
- Type: interface{}
Description
Optional
Description *string
- Type: *string
Nullable
Optional
Nullable *bool
- Type: *bool
Sensitive
Optional
Sensitive *bool
- Type: *bool
Type
Optional
Type *string
- Type: *string
The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable.
If no type constraint is set then a value of any type is accepted.
While type constraints are optional, we recommend specifying them; they serve as easy reminders for users of the module, and allow Terraform to return a helpful error message if the wrong type is used.
Type constraints are created from a mixture of type keywords and type constructors. The supported type keywords are:
- string
- number
- bool
The type constructors allow you to specify complex types such as collections:
- list(< TYPE >)
- set(< TYPE >)
- map(< TYPE >)
- object({< ATTR NAME > = < TYPE >, ... })
- tuple([< TYPE >, ...])
The keyword any may be used to indicate that any type is acceptable. For more information on the meaning and behavior of these different types, as well as detailed information about automatic conversion of complex types, refer to {@link https://developer.hashicorp.com/terraform/language/expressions/type-constraints Type Constraints}.
If both the type and default arguments are specified, the given default value must be convertible to the specified type.
Validation
Optional
Validation *[]TerraformVariableValidationConfig
- Type: *[]TerraformVariableValidationConfig
Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block.
TerraformVariableValidationConfig
Add one or more validation blocks within the variable block to specify custom conditions.
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TerraformVariableValidationConfig {
Condition: interface{},
ErrorMessage: *string,
}
Properties
Name | Type | Description |
---|---|---|
Condition | interface{} | This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not. |
ErrorMessage | *string | This contains the text that Terraform will include as part of error messages when it detects an unmet condition. |
Condition
Required
Condition interface{}
- Type: interface{}
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
ErrorMessage
Required
ErrorMessage *string
- Type: *string
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.
TestingAppConfig
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.TestingAppConfig {
Context: *map[string]interface{},
EnableFutureFlags: *bool,
FakeCdktfJsonPath: *bool,
Outdir: *string,
StackTraces: *bool,
StubVersion: *bool,
}
Properties
Name | Type | Description |
---|---|---|
Context | *map[string]interface{} | No description. |
EnableFutureFlags | *bool | No description. |
FakeCdktfJsonPath | *bool | No description. |
Outdir | *string | No description. |
StackTraces | *bool | No description. |
StubVersion | *bool | No description. |
Context
Optional
Context *map[string]interface{}
- Type: *map[string]interface{}
EnableFutureFlags
Optional
EnableFutureFlags *bool
- Type: *bool
FakeCdktfJsonPath
Optional
FakeCdktfJsonPath *bool
- Type: *bool
Outdir
Optional
Outdir *string
- Type: *string
StackTraces
Optional
StackTraces *bool
- Type: *bool
StubVersion
Optional
StubVersion *bool
- Type: *bool
WinrmProvisionerConnection
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
See {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection connection}
Initializer
import "github.com/hashicorp/terraform-cdk-go/cdktf"
&cdktf.WinrmProvisionerConnection {
Host: *string,
Type: *string,
Cacert: *string,
Https: *bool,
Insecure: *bool,
Password: *string,
Port: *f64,
ScriptPath: *string,
Timeout: *string,
UseNtlm: *bool,
User: *string,
}
Properties
Name | Type | Description |
---|---|---|
Host | *string | The address of the resource to connect to. |
Type | *string | The connection type. |
Cacert | *string | The CA certificate to validate against. |
Https | *bool | Set to true to connect using HTTPS instead of HTTP. |
Insecure | *bool | Set to true to skip validating the HTTPS certificate chain. |
Password | *string | The password to use for the connection. |
Port | *f64 | The port to connect to. |
ScriptPath | *string | The path used to copy scripts meant for remote execution. |
Timeout | *string | The timeout to wait for the connection to become available. |
UseNtlm | *bool | Set to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest. |
User | *string | The user to use for the connection. |
Host
Required
Host *string
- Type: *string
The address of the resource to connect to.
Type
Required
Type *string
- Type: *string
The connection type.
Valid values are "ssh" and "winrm". Provisioners typically assume that the remote system runs Microsoft Windows when using WinRM. Behaviors based on the SSH target_platform will force Windows-specific behavior for WinRM, unless otherwise specified.
Cacert
Optional
Cacert *string
- Type: *string
The CA certificate to validate against.
Https
Optional
Https *bool
- Type: *bool
Set to true to connect using HTTPS instead of HTTP.
Insecure
Optional
Insecure *bool
- Type: *bool
Set to true to skip validating the HTTPS certificate chain.
Password
Optional
Password *string
- Type: *string
The password to use for the connection.
Port
Optional
Port *f64
- Type: *f64
- Default: 22
The port to connect to.
ScriptPath
Optional
ScriptPath *string
- Type: *string
The path used to copy scripts meant for remote execution.
Refer to {@link https://developer.hashicorp.com/terraform/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts How Provisioners Execute Remote Scripts below for more details}
Timeout
Optional
Timeout *string
- Type: *string
- Default: 5m
The timeout to wait for the connection to become available.
Should be provided as a string (e.g., "30s" or "5m".)
UseNtlm
Optional
UseNtlm *bool
- Type: *bool
Set to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest.
Refer to Authentication for Remote Connections in the Windows App Development documentation for more details.
User
Optional
User *string
- Type: *string
- Default: root
The user to use for the connection.