TerraformBackend is the base class for all backend configurations.
Backends
Backend Classes
Configuration for Terraform backends.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Configuration for Terraform backends.
TerraformBackend is the base class for all backend configurations.
new LocalBackend(scope: Construct, config?: LocalBackendConfig)
| Property | Type | Description |
|---|---|---|
path | string | Path to the state file. |
workspaceDir | string | Directory for workspaces. |
new S3Backend(scope: Construct, config: S3BackendConfig)
| Property | Type | Description |
|---|---|---|
bucket | string | Name of the S3 bucket. |
key | string | Path to the state file in the bucket. |
region | string | AWS region. |
encrypt | boolean | Whether to enable server-side encryption. |
dynamodbTable | string | DynamoDB table for state locking. |
new GcsBackend(scope: Construct, config: GcsBackendConfig)
| Property | Type | Description |
|---|---|---|
bucket | string | Name of the GCS bucket. |
prefix | string | Prefix for the state file. |
new RemoteBackend(scope: Construct, config: RemoteBackendConfig)
| Property | Type | Description |
|---|---|---|
hostname | string | Terraform Cloud/Enterprise hostname. |
organization | string | Organization name. |
workspaces | RemoteBackendWorkspaces | Workspace configuration. |
new CloudBackend(scope: Construct, config: CloudBackendConfig)
| Property | Type | Description |
|---|---|---|
organization | string | Organization name. |
workspaces | CloudBackendWorkspaces | Workspace configuration. |
hostname | string | Terraform Cloud hostname. |