Skip to main content

Initializer

import { DataTerraformRemoteStateGcsConfig } from 'cdktn'

const dataTerraformRemoteStateGcsConfig: DataTerraformRemoteStateGcsConfig = { ... }

Properties

NameTypeDescription
defaults{[ key: string ]: any}No description.
workspacestringNo description.
bucketstring(Required) The name of the GCS bucket.
accessTokenstring(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.
credentialsstring(Optional) Local path to Google Cloud Platform account credentials in JSON format.
encryptionKeystring(Optional) A 32 byte base64 encoded ‘customer supplied encryption key’ used to encrypt all state.
impersonateServiceAccountstring(Optional) The service account to impersonate for accessing the State Bucket.
impersonateServiceAccountDelegatesstring[](Optional) The delegation chain for an impersonating a service account.
kmsEncryptionKeystring(Optional) A Cloud KMS key (‘customer-managed encryption key’) used when reading and writing state files in the bucket.
prefixstring(Optional) GCS prefix inside the bucket.
storeageCustomEndpointstring(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).

defaultsOptional

public readonly defaults: {[ key: string ]: any};
  • Type: {[ key: string ]: any}

workspaceOptional

public readonly workspace: string;
  • Type: string

bucketRequired

public readonly bucket: string;
  • Type: string
(Required) The name of the GCS bucket. This name must be globally unique.

accessTokenOptional

public readonly 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.

credentialsOptional

public readonly 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.

encryptionKeyOptional

public readonly encryptionKey: string;
  • Type: string
(Optional) A 32 byte base64 encoded ‘customer supplied encryption key’ used to encrypt all state.

impersonateServiceAccountOptional

public readonly 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.

impersonateServiceAccountDelegatesOptional

public readonly impersonateServiceAccountDelegates: string[];
  • Type: string[]
(Optional) The delegation chain for an impersonating a service account.

kmsEncryptionKeyOptional

public readonly 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 Customer-managed Encryption Keys.

prefixOptional

public readonly prefix: string;
  • Type: string
(Optional) GCS prefix inside the bucket. Named states for workspaces are stored in an object called < prefix >/< name >.tfstate.

storeageCustomEndpointOptional

public readonly 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). See here for more details