> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Java: DataTerraformRemoteStateGcsConfig

> CDKTN Core API Reference for DataTerraformRemoteStateGcsConfig in Java.

## Initializer <a name="Initializer" id="cdktn.DataTerraformRemoteStateGcsConfig.Initializer" />

```java theme={null}
import io.cdktn.cdktn.DataTerraformRemoteStateGcsConfig;

DataTerraformRemoteStateGcsConfig.builder()
//  .defaults(java.util.Map<java.lang.String, java.lang.Object>)
//  .workspace(java.lang.String)
    .bucket(java.lang.String)
//  .accessToken(java.lang.String)
//  .credentials(java.lang.String)
//  .encryptionKey(java.lang.String)
//  .impersonateServiceAccount(java.lang.String)
//  .impersonateServiceAccountDelegates(java.util.List<java.lang.String>)
//  .kmsEncryptionKey(java.lang.String)
//  .prefix(java.lang.String)
//  .storeageCustomEndpoint(java.lang.String)
    .build();
```

## Properties <a name="Properties" id="Properties" />

| **Name**                                                                                                                                           | **Type**                                                          | **Description**                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.defaults">defaults</a></code>                                                     | <code>java.util.Map\< java.lang.String, java.lang.Object ></code> | *No description.*                                                                                                                                                                                                                                                                                         |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.workspace">workspace</a></code>                                                   | <code>java.lang.String</code>                                     | *No description.*                                                                                                                                                                                                                                                                                         |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.bucket">bucket</a></code>                                                         | <code>java.lang.String</code>                                     | (Required) The name of the GCS bucket.                                                                                                                                                                                                                                                                    |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.accessToken">accessToken</a></code>                                               | <code>java.lang.String</code>                                     | (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. |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.credentials">credentials</a></code>                                               | <code>java.lang.String</code>                                     | (Optional) Local path to Google Cloud Platform account credentials in JSON format.                                                                                                                                                                                                                        |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.encryptionKey">encryptionKey</a></code>                                           | <code>java.lang.String</code>                                     | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.                                                                                                                                                                                                         |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.impersonateServiceAccount">impersonateServiceAccount</a></code>                   | <code>java.lang.String</code>                                     | (Optional) The service account to impersonate for accessing the State Bucket.                                                                                                                                                                                                                             |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.impersonateServiceAccountDelegates">impersonateServiceAccountDelegates</a></code> | <code>java.util.List\< java.lang.String ></code>                  | (Optional) The delegation chain for an impersonating a service account.                                                                                                                                                                                                                                   |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.kmsEncryptionKey">kmsEncryptionKey</a></code>                                     | <code>java.lang.String</code>                                     | (Optional) A Cloud KMS key ('customer-managed encryption key') used when reading and writing state files in the bucket.                                                                                                                                                                                   |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.prefix">prefix</a></code>                                                         | <code>java.lang.String</code>                                     | (Optional) GCS prefix inside the bucket.                                                                                                                                                                                                                                                                  |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.storeageCustomEndpoint">storeageCustomEndpoint</a></code>                         | <code>java.lang.String</code>                                     | (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`<sup>Optional</sup> <a name="defaults" id="cdktn.DataTerraformRemoteStateGcsConfig.property.defaults" />

```java theme={null}
public java.util.Map<java.lang.String, java.lang.Object> getDefaults();
```

* *Type:* java.util.Map\< java.lang.String, java.lang.Object >

***

### `workspace`<sup>Optional</sup> <a name="workspace" id="cdktn.DataTerraformRemoteStateGcsConfig.property.workspace" />

```java theme={null}
public java.lang.String getWorkspace();
```

* *Type:* java.lang.String

***

### `bucket`<sup>Required</sup> <a name="bucket" id="cdktn.DataTerraformRemoteStateGcsConfig.property.bucket" />

```java theme={null}
public java.lang.String getBucket();
```

* *Type:* java.lang.String

(Required) The name of the GCS bucket.

This name must be globally unique.

***

### `accessToken`<sup>Optional</sup> <a name="accessToken" id="cdktn.DataTerraformRemoteStateGcsConfig.property.accessToken" />

```java theme={null}
public java.lang.String getAccessToken();
```

* *Type:* java.lang.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`<sup>Optional</sup> <a name="credentials" id="cdktn.DataTerraformRemoteStateGcsConfig.property.credentials" />

```java theme={null}
public java.lang.String getCredentials();
```

* *Type:* java.lang.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`<sup>Optional</sup> <a name="encryptionKey" id="cdktn.DataTerraformRemoteStateGcsConfig.property.encryptionKey" />

```java theme={null}
public java.lang.String getEncryptionKey();
```

* *Type:* java.lang.String

(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.

***

### `impersonateServiceAccount`<sup>Optional</sup> <a name="impersonateServiceAccount" id="cdktn.DataTerraformRemoteStateGcsConfig.property.impersonateServiceAccount" />

```java theme={null}
public java.lang.String getImpersonateServiceAccount();
```

* *Type:* java.lang.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`<sup>Optional</sup> <a name="impersonateServiceAccountDelegates" id="cdktn.DataTerraformRemoteStateGcsConfig.property.impersonateServiceAccountDelegates" />

```java theme={null}
public java.util.List<java.lang.String> getImpersonateServiceAccountDelegates();
```

* *Type:* java.util.List\< java.lang.String >

(Optional) The delegation chain for an impersonating a service account.

***

### `kmsEncryptionKey`<sup>Optional</sup> <a name="kmsEncryptionKey" id="cdktn.DataTerraformRemoteStateGcsConfig.property.kmsEncryptionKey" />

```java theme={null}
public java.lang.String getKmsEncryptionKey();
```

* *Type:* java.lang.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](https://cloud.google.com/storage/docs/encryption/customer-managed-keys).

***

### `prefix`<sup>Optional</sup> <a name="prefix" id="cdktn.DataTerraformRemoteStateGcsConfig.property.prefix" />

```java theme={null}
public java.lang.String getPrefix();
```

* *Type:* java.lang.String

(Optional) GCS prefix inside the bucket.

Named states for workspaces are stored in an object called \< prefix >/\< name >.tfstate.

***

### `storeageCustomEndpoint`<sup>Optional</sup> <a name="storeageCustomEndpoint" id="cdktn.DataTerraformRemoteStateGcsConfig.property.storeageCustomEndpoint" />

```java theme={null}
public java.lang.String getStoreageCustomEndpoint();
```

* *Type:* java.lang.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](https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint)

***
