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

# Go: TerraformStack

> CDKTN Core API Reference for TerraformStack in Go.

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

```go theme={null}
import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.NewTerraformStack(scope Construct, id *string) TerraformStack
```

| **Name**                                                                           | **Type**                                                           | **Description**   |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ----------------- |
| <code><a href="#cdktn.TerraformStack.Initializer.parameter.scope">scope</a></code> | <code>github.com/aws/constructs-go/constructs/v10.Construct</code> | *No description.* |
| <code><a href="#cdktn.TerraformStack.Initializer.parameter.id">id</a></code>       | <code>\*string</code>                                              | *No description.* |

***

### `scope`<sup>Required</sup> <a name="scope" id="cdktn.TerraformStack.Initializer.parameter.scope" />

* *Type:* github.com/aws/constructs-go/constructs/v10.Construct

***

### `id`<sup>Required</sup> <a name="id" id="cdktn.TerraformStack.Initializer.parameter.id" />

* *Type:* \*string

***

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

| **Name**                                                                                                                 | **Description**                                    |
| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- |
| <code><a href="#cdktn.TerraformStack.toString">ToString</a></code>                                                       | Returns a string representation of this construct. |
| <code><a href="#cdktn.TerraformStack.with">With</a></code>                                                               | Applies one or more mixins to this construct.      |
| <code><a href="#cdktn.TerraformStack.addDependency">AddDependency</a></code>                                             | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.addOverride">AddOverride</a></code>                                                 | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.allProviders">AllProviders</a></code>                                               | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.dependsOn">DependsOn</a></code>                                                     | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.ensureBackendExists">EnsureBackendExists</a></code>                                 | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.getLogicalId">GetLogicalId</a></code>                                               | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.hasResourceMove">HasResourceMove</a></code>                                         | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.prepareStack">PrepareStack</a></code>                                               | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.registerIncomingCrossStackReference">RegisterIncomingCrossStackReference</a></code> | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.registerOutgoingCrossStackReference">RegisterOutgoingCrossStackReference</a></code> | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.runAllValidations">RunAllValidations</a></code>                                     | Run all validations on the stack.                  |
| <code><a href="#cdktn.TerraformStack.toHclTerraform">ToHclTerraform</a></code>                                           | *No description.*                                  |
| <code><a href="#cdktn.TerraformStack.toTerraform">ToTerraform</a></code>                                                 | *No description.*                                  |

***

### `ToString` <a name="ToString" id="cdktn.TerraformStack.toString" />

```go theme={null}
func ToString() *string
```

Returns a string representation of this construct.

### `With` <a name="With" id="cdktn.TerraformStack.with" />

```go theme={null}
func With(mixins ...IMixin) IConstruct
```

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> <a name="mixins" id="cdktn.TerraformStack.with.parameter.mixins" />

* *Type:* ...github.com/aws/constructs-go/constructs/v10.IMixin

The mixins to apply.

***

### `AddDependency` <a name="AddDependency" id="cdktn.TerraformStack.addDependency" />

```go theme={null}
func AddDependency(dependency TerraformStack)
```

#### `dependency`<sup>Required</sup> <a name="dependency" id="cdktn.TerraformStack.addDependency.parameter.dependency" />

* *Type:* <a href="#cdktn.TerraformStack">TerraformStack</a>

***

### `AddOverride` <a name="AddOverride" id="cdktn.TerraformStack.addOverride" />

```go theme={null}
func AddOverride(path *string, value interface{})
```

#### `path`<sup>Required</sup> <a name="path" id="cdktn.TerraformStack.addOverride.parameter.path" />

* *Type:* \*string

***

#### `value`<sup>Required</sup> <a name="value" id="cdktn.TerraformStack.addOverride.parameter.value" />

* *Type:* interface\{}

***

### `AllProviders` <a name="AllProviders" id="cdktn.TerraformStack.allProviders" />

```go theme={null}
func AllProviders() *[]TerraformProvider
```

### `DependsOn` <a name="DependsOn" id="cdktn.TerraformStack.dependsOn" />

```go theme={null}
func DependsOn(stack TerraformStack) *bool
```

#### `stack`<sup>Required</sup> <a name="stack" id="cdktn.TerraformStack.dependsOn.parameter.stack" />

* *Type:* <a href="#cdktn.TerraformStack">TerraformStack</a>

***

### `EnsureBackendExists` <a name="EnsureBackendExists" id="cdktn.TerraformStack.ensureBackendExists" />

```go theme={null}
func EnsureBackendExists() TerraformBackend
```

### `GetLogicalId` <a name="GetLogicalId" id="cdktn.TerraformStack.getLogicalId" />

```go theme={null}
func GetLogicalId(tfElement interface{}) *string
```

#### `tfElement`<sup>Required</sup> <a name="tfElement" id="cdktn.TerraformStack.getLogicalId.parameter.tfElement" />

* *Type:* interface\{}

***

### `HasResourceMove` <a name="HasResourceMove" id="cdktn.TerraformStack.hasResourceMove" />

```go theme={null}
func HasResourceMove() *bool
```

### `PrepareStack` <a name="PrepareStack" id="cdktn.TerraformStack.prepareStack" />

```go theme={null}
func PrepareStack()
```

### `RegisterIncomingCrossStackReference` <a name="RegisterIncomingCrossStackReference" id="cdktn.TerraformStack.registerIncomingCrossStackReference" />

```go theme={null}
func RegisterIncomingCrossStackReference(fromStack TerraformStack) TerraformRemoteState
```

#### `fromStack`<sup>Required</sup> <a name="fromStack" id="cdktn.TerraformStack.registerIncomingCrossStackReference.parameter.fromStack" />

* *Type:* <a href="#cdktn.TerraformStack">TerraformStack</a>

***

### `RegisterOutgoingCrossStackReference` <a name="RegisterOutgoingCrossStackReference" id="cdktn.TerraformStack.registerOutgoingCrossStackReference" />

```go theme={null}
func RegisterOutgoingCrossStackReference(identifier *string) TerraformOutput
```

#### `identifier`<sup>Required</sup> <a name="identifier" id="cdktn.TerraformStack.registerOutgoingCrossStackReference.parameter.identifier" />

* *Type:* \*string

***

### `RunAllValidations` <a name="RunAllValidations" id="cdktn.TerraformStack.runAllValidations" />

```go theme={null}
func RunAllValidations()
```

Run all validations on the stack.

### `ToHclTerraform` <a name="ToHclTerraform" id="cdktn.TerraformStack.toHclTerraform" />

```go theme={null}
func ToHclTerraform() *map[string]interface{}
```

### `ToTerraform` <a name="ToTerraform" id="cdktn.TerraformStack.toTerraform" />

```go theme={null}
func ToTerraform() interface{}
```

## Static Functions <a name="Static Functions" id="Static Functions" />

| **Name**                                                                 | **Description**               |
| ------------------------------------------------------------------------ | ----------------------------- |
| <code><a href="#cdktn.TerraformStack.isConstruct">IsConstruct</a></code> | Checks if `x` is a construct. |
| <code><a href="#cdktn.TerraformStack.isStack">IsStack</a></code>         | *No description.*             |
| <code><a href="#cdktn.TerraformStack.of">Of</a></code>                   | *No description.*             |

***

### `IsConstruct` <a name="IsConstruct" id="cdktn.TerraformStack.isConstruct" />

```go theme={null}
import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.TerraformStack_IsConstruct(x interface{}) *bool
```

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> <a name="x" id="cdktn.TerraformStack.isConstruct.parameter.x" />

* *Type:* interface\{}

Any object.

***

### `IsStack` <a name="IsStack" id="cdktn.TerraformStack.isStack" />

```go theme={null}
import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.TerraformStack_IsStack(x interface{}) *bool
```

#### `x`<sup>Required</sup> <a name="x" id="cdktn.TerraformStack.isStack.parameter.x" />

* *Type:* interface\{}

***

### `Of` <a name="Of" id="cdktn.TerraformStack.of" />

```go theme={null}
import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.TerraformStack_Of(construct IConstruct) TerraformStack
```

#### `construct`<sup>Required</sup> <a name="construct" id="cdktn.TerraformStack.of.parameter.construct" />

* *Type:* github.com/aws/constructs-go/constructs/v10.IConstruct

***

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

| **Name**                                                                            | **Type**                                                                            | **Description**   |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------- |
| <code><a href="#cdktn.TerraformStack.property.node">Node</a></code>                 | <code>github.com/aws/constructs-go/constructs/v10.Node</code>                       | The tree node.    |
| <code><a href="#cdktn.TerraformStack.property.dependencies">Dependencies</a></code> | <code>\*\[]<a href="#cdktn.TerraformStack">TerraformStack</a></code>                | *No description.* |
| <code><a href="#cdktn.TerraformStack.property.moveTargets">MoveTargets</a></code>   | <code><a href="#cdktn.TerraformResourceTargets">TerraformResourceTargets</a></code> | *No description.* |
| <code><a href="#cdktn.TerraformStack.property.synthesizer">Synthesizer</a></code>   | <code><a href="#cdktn.IStackSynthesizer">IStackSynthesizer</a></code>               | *No description.* |

***

### `Node`<sup>Required</sup> <a name="Node" id="cdktn.TerraformStack.property.node" />

```go theme={null}
func Node() Node
```

* *Type:* github.com/aws/constructs-go/constructs/v10.Node

The tree node.

***

### `Dependencies`<sup>Required</sup> <a name="Dependencies" id="cdktn.TerraformStack.property.dependencies" />

```go theme={null}
func Dependencies() *[]TerraformStack
```

* *Type:* \*\[]<a href="#cdktn.TerraformStack">TerraformStack</a>

***

### `MoveTargets`<sup>Required</sup> <a name="MoveTargets" id="cdktn.TerraformStack.property.moveTargets" />

```go theme={null}
func MoveTargets() TerraformResourceTargets
```

* *Type:* <a href="#cdktn.TerraformResourceTargets">TerraformResourceTargets</a>

***

### `Synthesizer`<sup>Required</sup> <a name="Synthesizer" id="cdktn.TerraformStack.property.synthesizer" />

```go theme={null}
func Synthesizer() IStackSynthesizer
```

* *Type:* <a href="#cdktn.IStackSynthesizer">IStackSynthesizer</a>

***
