Package com.hashicorp.cdktf
Class GcsBackend.Builder
java.lang.Object
com.hashicorp.cdktf.GcsBackend.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GcsBackend>
- Enclosing class:
GcsBackend
@Stability(Experimental)
public static final class GcsBackend.Builder
extends Object
implements software.amazon.jsii.Builder<GcsBackend>
(experimental) A fluent builder for
GcsBackend
.-
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()
static GcsBackend.Builder
create
(software.constructs.Construct scope) 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.(experimental) (Optional) GCS prefix inside the bucket.
-
Method Details
-
create
@Stability(Experimental) public static GcsBackend.Builder create(software.constructs.Construct scope) - Parameters:
scope
- This parameter is required.- Returns:
- a new instance of
GcsBackend.Builder
.
-
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
(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 GcsBackend.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 GcsBackend.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
-
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
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GcsBackend>
- Returns:
- a newly built instance of
GcsBackend
.
-