Class DataTerraformRemoteStateGcs.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DataTerraformRemoteStateGcs>
- Enclosing class:
DataTerraformRemoteStateGcs
DataTerraformRemoteStateGcs
.-
Method Summary
Modifier and TypeMethodDescriptionaccessToken
(String accessToken) (experimental) (Optional) A temporary [OAuth 2.0 access token] obtained from the Google Authorization server, i.e.(experimental) (Required) The name of the GCS bucket.build()
credentials
(String credentials) (experimental) (Optional) Local path to Google Cloud Platform account credentials in JSON format.encryptionKey
(String encryptionKey) (experimental) (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.impersonateServiceAccount
(String impersonateServiceAccount) (experimental) (Optional) The service account to impersonate for accessing the State Bucket.impersonateServiceAccountDelegates
(List<String> impersonateServiceAccountDelegates) (experimental) (Optional) The delegation chain for an impersonating a service account.kmsEncryptionKey
(String kmsEncryptionKey) (experimental) (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.(experimental) (Optional) GCS prefix inside the bucket.storeageCustomEndpoint
(String storeageCustomEndpoint) (experimental) (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).
-
Method Details
-
create
@Stability(Experimental) public static DataTerraformRemoteStateGcs.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
DataTerraformRemoteStateGcs.Builder
.
-
defaults
@Stability(Experimental) public DataTerraformRemoteStateGcs.Builder defaults(Map<String, ? extends Object> defaults) - Parameters:
defaults
- This parameter is required.- Returns:
this
-
workspace
- Parameters:
workspace
- This parameter is required.- Returns:
this
-
bucket
(experimental) (Required) The name of the GCS bucket.This name must be globally unique.
- Parameters:
bucket
- (Required) The name of the GCS bucket. This parameter is required.- Returns:
this
-
accessToken
(experimental) (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.- Parameters:
accessToken
- (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. This parameter is required.- Returns:
this
-
credentials
(experimental) (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.
- Parameters:
credentials
- (Optional) Local path to Google Cloud Platform account credentials in JSON format. This parameter is required.- Returns:
this
-
encryptionKey
@Stability(Experimental) public DataTerraformRemoteStateGcs.Builder encryptionKey(String encryptionKey) (experimental) (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.- Parameters:
encryptionKey
- (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. This parameter is required.- Returns:
this
-
impersonateServiceAccount
@Stability(Experimental) public DataTerraformRemoteStateGcs.Builder impersonateServiceAccount(String impersonateServiceAccount) (experimental) (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.
- Parameters:
impersonateServiceAccount
- (Optional) The service account to impersonate for accessing the State Bucket. This parameter is required.- Returns:
this
-
impersonateServiceAccountDelegates
@Stability(Experimental) public DataTerraformRemoteStateGcs.Builder impersonateServiceAccountDelegates(List<String> impersonateServiceAccountDelegates) (experimental) (Optional) The delegation chain for an impersonating a service account.- Parameters:
impersonateServiceAccountDelegates
- (Optional) The delegation chain for an impersonating a service account. This parameter is required.- Returns:
this
-
kmsEncryptionKey
@Stability(Experimental) public DataTerraformRemoteStateGcs.Builder kmsEncryptionKey(String kmsEncryptionKey) (experimental) (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
invalid @link
{@link https://cloud.google.com/storage/docs/encryption/customer-managed-keys
- Parameters:
kmsEncryptionKey
- (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket. This parameter is required.- Returns:
this
-
prefix
(experimental) (Optional) GCS prefix inside the bucket.Named states for workspaces are stored in an object called
/ .tfstate. - Parameters:
prefix
- (Optional) GCS prefix inside the bucket. This parameter is required.- Returns:
this
-
storeageCustomEndpoint
@Stability(Experimental) public DataTerraformRemoteStateGcs.Builder storeageCustomEndpoint(String storeageCustomEndpoint) (experimental) (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).invalid @link
{@link https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint
- Parameters:
storeageCustomEndpoint
- (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). This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DataTerraformRemoteStateGcs>
- Returns:
- a newly built instance of
DataTerraformRemoteStateGcs
.
-