> ## 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.

# Typescript: DataTerraformRemoteStateGcsConfig

> CDKTN Core API Reference for DataTerraformRemoteStateGcsConfig in Typescript.

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

```typescript theme={null}
import { DataTerraformRemoteStateGcsConfig } from 'cdktn'

const dataTerraformRemoteStateGcsConfig: DataTerraformRemoteStateGcsConfig = { ... }
```

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

| **Name**                                                                                                                                           | **Type**                              | **Description**                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.defaults">defaults</a></code>                                                     | <code>\{\[ key: string ]: any}</code> | *No description.*                                                                                                                                                                                                                                                                                         |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.workspace">workspace</a></code>                                                   | <code>string</code>                   | *No description.*                                                                                                                                                                                                                                                                                         |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.bucket">bucket</a></code>                                                         | <code>string</code>                   | (Required) The name of the GCS bucket.                                                                                                                                                                                                                                                                    |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.accessToken">accessToken</a></code>                                               | <code>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>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>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>string</code>                   | (Optional) The service account to impersonate for accessing the State Bucket.                                                                                                                                                                                                                             |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.impersonateServiceAccountDelegates">impersonateServiceAccountDelegates</a></code> | <code>string\[]</code>                | (Optional) The delegation chain for an impersonating a service account.                                                                                                                                                                                                                                   |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.kmsEncryptionKey">kmsEncryptionKey</a></code>                                     | <code>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>string</code>                   | (Optional) GCS prefix inside the bucket.                                                                                                                                                                                                                                                                  |
| <code><a href="#cdktn.DataTerraformRemoteStateGcsConfig.property.storeageCustomEndpoint">storeageCustomEndpoint</a></code>                         | <code>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" />

```typescript theme={null}
public readonly defaults: {[ key: string ]: any};
```

* *Type:* \{\[ key: string ]: any}

***

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

```typescript theme={null}
public readonly workspace: string;
```

* *Type:* string

***

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

```typescript theme={null}
public readonly bucket: string;
```

* *Type:* 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" />

```typescript theme={null}
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.

***

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

```typescript theme={null}
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.

***

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

```typescript theme={null}
public readonly encryptionKey: string;
```

* *Type:* 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" />

```typescript theme={null}
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.

***

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

```typescript theme={null}
public readonly impersonateServiceAccountDelegates: string[];
```

* *Type:* string\[]

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

***

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

```typescript theme={null}
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](https://cloud.google.com/storage/docs/encryption/customer-managed-keys).

***

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

```typescript theme={null}
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.

***

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

```typescript theme={null}
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](https://developer.hashicorp.com/terraform/language/settings/backends/gcs#storage_custom_endpoint)

***
