> ## 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: TerraformBackend

> CDKTN Core API Reference for TerraformBackend in Java.

## Initializers&#x20;

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

new TerraformBackend(Construct scope, java.lang.String id, java.lang.String name);
```

| **Name** | **Type** | **Description** |
| - | - | - |
| `scope` | `software.constructs.Construct` | *No description.* |
| `id` | `java.lang.String` | *No description.* |
| `name` | `java.lang.String` | *No description.* |

***

### `scope`<sup>Required</sup>&#x20;

* *Type:* software.constructs.Construct

***

### `id`<sup>Required</sup>&#x20;

* *Type:* java.lang.String

***

### `name`<sup>Required</sup>&#x20;

* *Type:* java.lang.String

***

## Methods&#x20;

| **Name** | **Description** |
| - | - |
| `toString` | Returns a string representation of this construct. |
| `with` | Applies one or more mixins to this construct. |
| `addOverride` | *No description.* |
| `overrideLogicalId` | Overrides the auto-generated logical ID with a specific ID. |
| `resetOverrideLogicalId` | Resets a previously passed logical Id to use the auto-generated logical id again. |
| `toHclTerraform` | *No description.* |
| `toMetadata` | *No description.* |
| `toTerraform` | Adds this resource to the terraform JSON output. |
| `getRemoteStateDataSource` | Creates a TerraformRemoteState resource that accesses this backend. |

***

### `toString`&#x20;

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

Returns a string representation of this construct.

### `with`&#x20;

```java theme={null}
public IConstruct with(IMixin... mixins)
```

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.

#### `mixins`<sup>Required</sup>&#x20;

* *Type:* software.constructs.IMixin...

The mixins to apply.

***

### `addOverride`&#x20;

```java theme={null}
public void addOverride(java.lang.String path, java.lang.Object value)
```

#### `path`<sup>Required</sup>&#x20;

* *Type:* java.lang.String

***

#### `value`<sup>Required</sup>&#x20;

* *Type:* java.lang.Object

***

### `overrideLogicalId`&#x20;

```java theme={null}
public void overrideLogicalId(java.lang.String newLogicalId)
```

Overrides the auto-generated logical ID with a specific ID.

#### `newLogicalId`<sup>Required</sup>&#x20;

* *Type:* java.lang.String

The new logical ID to use for this stack element.

***

### `resetOverrideLogicalId`&#x20;

```java theme={null}
public void resetOverrideLogicalId()
```

Resets a previously passed logical Id to use the auto-generated logical id again.

### `toHclTerraform`&#x20;

```java theme={null}
public java.lang.Object toHclTerraform()
```

### `toMetadata`&#x20;

```java theme={null}
public java.lang.Object toMetadata()
```

### `toTerraform`&#x20;

```java theme={null}
public java.lang.Object toTerraform()
```

Adds this resource to the terraform JSON output.

### `getRemoteStateDataSource`&#x20;

```java theme={null}
public TerraformRemoteState getRemoteStateDataSource(Construct scope, java.lang.String name, java.lang.String fromStack)
```

Creates a TerraformRemoteState resource that accesses this backend.

#### `scope`<sup>Required</sup>&#x20;

* *Type:* software.constructs.Construct

***

#### `name`<sup>Required</sup>&#x20;

* *Type:* java.lang.String

***

#### `fromStack`<sup>Required</sup>&#x20;

* *Type:* java.lang.String

***

## Static Functions&#x20;

| **Name** | **Description** |
| - | - |
| `isConstruct` | Checks if `x` is a construct. |
| `isTerraformElement` | *No description.* |
| `isBackend` | *No description.* |

***

### `isConstruct`&#x20;

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

TerraformBackend.isConstruct(java.lang.Object x)
```

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.

#### `x`<sup>Required</sup>&#x20;

* *Type:* java.lang.Object

Any object.

***

### `isTerraformElement`&#x20;

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

TerraformBackend.isTerraformElement(java.lang.Object x)
```

#### `x`<sup>Required</sup>&#x20;

* *Type:* java.lang.Object

***

### `isBackend`&#x20;

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

TerraformBackend.isBackend(java.lang.Object x)
```

#### `x`<sup>Required</sup>&#x20;

* *Type:* java.lang.Object

***

## Properties&#x20;

| **Name** | **Type** | **Description** |
| - | - | - |
| `node` | `software.constructs.Node` | The tree node. |
| `cdktfStack` | `TerraformStack` | *No description.* |
| `fqn` | `java.lang.String` | *No description.* |
| `friendlyUniqueId` | `java.lang.String` | *No description.* |

***

### `node`<sup>Required</sup>&#x20;

```java theme={null}
public Node getNode();
```

* *Type:* software.constructs.Node

The tree node.

***

### `cdktfStack`<sup>Required</sup>&#x20;

```java theme={null}
public TerraformStack getCdktfStack();
```

* *Type:* [TerraformStack](#cdktn.TerraformStack)

***

### `fqn`<sup>Required</sup>&#x20;

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

* *Type:* java.lang.String

***

### `friendlyUniqueId`<sup>Required</sup>&#x20;

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

* *Type:* java.lang.String

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.