Terraform
API Reference for Typescript
Constructs
App
Represents a cdktf application.
Initializers
import { App } from 'cdktf'
new App(options?: AppOptions)
| Name | Type | Description |
|---|---|---|
options | AppOptions | configuration options. |
optionsOptional
- Type: AppOptions
configuration options.
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
crossStackReference | Creates a reference from one stack to another, invoked on prepareStack since it creates extra resources. |
synth | Synthesizes all resources to the output directory. |
toString
public toString(): string
Returns a string representation of this construct.
crossStackReference
public crossStackReference(fromStack: TerraformStack, toStack: TerraformStack, identifier: string): string
Creates a reference from one stack to another, invoked on prepareStack since it creates extra resources.
fromStackRequired
- Type: TerraformStack
toStackRequired
- Type: TerraformStack
identifierRequired
- Type: string
synth
public synth(): void
Synthesizes all resources to the output directory.
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isApp | No description. |
of | No description. |
isConstruct
import { App } from 'cdktf'
App.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isApp
import { App } from 'cdktf'
App.isApp(x: any)
xRequired
- Type: any
of
import { App } from 'cdktf'
App.of(construct: IConstruct)
constructRequired
- Type: constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
manifest | Manifest | No description. |
outdir | string | The output directory into which resources will be synthesized. |
skipValidation | boolean | Whether to skip the validation during synthesis of the app. |
targetStackId | string | The stack which will be synthesized. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
manifestRequired
public readonly manifest: Manifest;
- Type: Manifest
outdirRequired
public readonly outdir: string;
- Type: string
The output directory into which resources will be synthesized.
skipValidationOptional
public readonly skipValidation: boolean;
- Type: boolean
Whether to skip the validation during synthesis of the app.
targetStackIdOptional
public readonly targetStackId: string;
- Type: string
The stack which will be synthesized.
If not set, all stacks will be synthesized.
ArtifactoryBackend
Initializers
import { ArtifactoryBackend } from 'cdktf'
new ArtifactoryBackend(scope: Construct, props: ArtifactoryBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | ArtifactoryBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: ArtifactoryBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { ArtifactoryBackend } from 'cdktf'
ArtifactoryBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { ArtifactoryBackend } from 'cdktf'
ArtifactoryBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
AzurermBackend
Initializers
import { AzurermBackend } from 'cdktf'
new AzurermBackend(scope: Construct, props: AzurermBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | AzurermBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: AzurermBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { AzurermBackend } from 'cdktf'
AzurermBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { AzurermBackend } from 'cdktf'
AzurermBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
CloudBackend
The Cloud Backend synthesizes a {@link https://www.terraform.io/cli/cloud/settings#the-cloud-block cloud block}. The cloud block is a nested block within the top-level terraform settings block. It specifies which Terraform Cloud workspaces to use for the current working directory. The cloud block only affects Terraform CLI's behavior. When Terraform Cloud uses a configuration that contains a cloud block - for example, when a workspace is configured to use a VCS provider directly - it ignores the block and behaves according to its own workspace settings.
Initializers
import { CloudBackend } from 'cdktf'
new CloudBackend(scope: Construct, props: CloudBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | CloudBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: CloudBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { CloudBackend } from 'cdktf'
CloudBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { CloudBackend } from 'cdktf'
CloudBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
ConsulBackend
Initializers
import { ConsulBackend } from 'cdktf'
new ConsulBackend(scope: Construct, props: ConsulBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | ConsulBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: ConsulBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { ConsulBackend } from 'cdktf'
ConsulBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { ConsulBackend } from 'cdktf'
ConsulBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
CosBackend
Initializers
import { CosBackend } from 'cdktf'
new CosBackend(scope: Construct, props: CosBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | CosBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: CosBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { CosBackend } from 'cdktf'
CosBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { CosBackend } from 'cdktf'
CosBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
DataTerraformRemoteState
Initializers
import { DataTerraformRemoteState } from 'cdktf'
new DataTerraformRemoteState(scope: Construct, id: string, config: DataTerraformRemoteStateRemoteConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateRemoteConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteState } from 'cdktf'
DataTerraformRemoteState.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateArtifactory
Initializers
import { DataTerraformRemoteStateArtifactory } from 'cdktf'
new DataTerraformRemoteStateArtifactory(scope: Construct, id: string, config: DataTerraformRemoteStateArtifactoryConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateArtifactoryConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateArtifactory } from 'cdktf'
DataTerraformRemoteStateArtifactory.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateAzurerm
Initializers
import { DataTerraformRemoteStateAzurerm } from 'cdktf'
new DataTerraformRemoteStateAzurerm(scope: Construct, id: string, config: DataTerraformRemoteStateAzurermConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateAzurermConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateAzurerm } from 'cdktf'
DataTerraformRemoteStateAzurerm.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateConsul
Initializers
import { DataTerraformRemoteStateConsul } from 'cdktf'
new DataTerraformRemoteStateConsul(scope: Construct, id: string, config: DataTerraformRemoteStateConsulConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateConsulConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateConsul } from 'cdktf'
DataTerraformRemoteStateConsul.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateCos
Initializers
import { DataTerraformRemoteStateCos } from 'cdktf'
new DataTerraformRemoteStateCos(scope: Construct, id: string, config: DataTerraformRemoteStateCosConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateCosConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateCos } from 'cdktf'
DataTerraformRemoteStateCos.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateEtcd
Initializers
import { DataTerraformRemoteStateEtcd } from 'cdktf'
new DataTerraformRemoteStateEtcd(scope: Construct, id: string, config: DataTerraformRemoteStateEtcdConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateEtcdConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateEtcd } from 'cdktf'
DataTerraformRemoteStateEtcd.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateEtcdV3
Initializers
import { DataTerraformRemoteStateEtcdV3 } from 'cdktf'
new DataTerraformRemoteStateEtcdV3(scope: Construct, id: string, config: DataTerraformRemoteStateEtcdV3Config)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateEtcdV3Config | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateEtcdV3 } from 'cdktf'
DataTerraformRemoteStateEtcdV3.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateGcs
Initializers
import { DataTerraformRemoteStateGcs } from 'cdktf'
new DataTerraformRemoteStateGcs(scope: Construct, id: string, config: DataTerraformRemoteStateGcsConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateGcsConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateGcs } from 'cdktf'
DataTerraformRemoteStateGcs.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateHttp
Initializers
import { DataTerraformRemoteStateHttp } from 'cdktf'
new DataTerraformRemoteStateHttp(scope: Construct, id: string, config: DataTerraformRemoteStateHttpConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateHttpConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateHttp } from 'cdktf'
DataTerraformRemoteStateHttp.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateLocal
Initializers
import { DataTerraformRemoteStateLocal } from 'cdktf'
new DataTerraformRemoteStateLocal(scope: Construct, id: string, config: DataTerraformRemoteStateLocalConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateLocalConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateLocal } from 'cdktf'
DataTerraformRemoteStateLocal.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateManta
Initializers
import { DataTerraformRemoteStateManta } from 'cdktf'
new DataTerraformRemoteStateManta(scope: Construct, id: string, config: DataTerraformRemoteStateMantaConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateMantaConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateManta } from 'cdktf'
DataTerraformRemoteStateManta.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateOss
Initializers
import { DataTerraformRemoteStateOss } from 'cdktf'
new DataTerraformRemoteStateOss(scope: Construct, id: string, config: DataTerraformRemoteStateOssConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateOssConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateOss } from 'cdktf'
DataTerraformRemoteStateOss.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStatePg
Initializers
import { DataTerraformRemoteStatePg } from 'cdktf'
new DataTerraformRemoteStatePg(scope: Construct, id: string, config: DataTerraformRemoteStatePgConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStatePgConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStatePg } from 'cdktf'
DataTerraformRemoteStatePg.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateS3
Initializers
import { DataTerraformRemoteStateS3 } from 'cdktf'
new DataTerraformRemoteStateS3(scope: Construct, id: string, config: DataTerraformRemoteStateS3Config)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateS3Config | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateS3 } from 'cdktf'
DataTerraformRemoteStateS3.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
DataTerraformRemoteStateSwift
Initializers
import { DataTerraformRemoteStateSwift } from 'cdktf'
new DataTerraformRemoteStateSwift(scope: Construct, id: string, config: DataTerraformRemoteStateSwiftConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | DataTerraformRemoteStateSwiftConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { DataTerraformRemoteStateSwift } from 'cdktf'
DataTerraformRemoteStateSwift.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
EtcdBackend
Initializers
import { EtcdBackend } from 'cdktf'
new EtcdBackend(scope: Construct, props: EtcdBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | EtcdBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: EtcdBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { EtcdBackend } from 'cdktf'
EtcdBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { EtcdBackend } from 'cdktf'
EtcdBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
EtcdV3Backend
Initializers
import { EtcdV3Backend } from 'cdktf'
new EtcdV3Backend(scope: Construct, props: EtcdV3BackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | EtcdV3BackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: EtcdV3BackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { EtcdV3Backend } from 'cdktf'
EtcdV3Backend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { EtcdV3Backend } from 'cdktf'
EtcdV3Backend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
GcsBackend
Initializers
import { GcsBackend } from 'cdktf'
new GcsBackend(scope: Construct, props: GcsBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | GcsBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: GcsBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { GcsBackend } from 'cdktf'
GcsBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { GcsBackend } from 'cdktf'
GcsBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
HttpBackend
Initializers
import { HttpBackend } from 'cdktf'
new HttpBackend(scope: Construct, props: HttpBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | HttpBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: HttpBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { HttpBackend } from 'cdktf'
HttpBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { HttpBackend } from 'cdktf'
HttpBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
LocalBackend
Initializers
import { LocalBackend } from 'cdktf'
new LocalBackend(scope: Construct, props?: LocalBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | LocalBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsOptional
- Type: LocalBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { LocalBackend } from 'cdktf'
LocalBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { LocalBackend } from 'cdktf'
LocalBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
MantaBackend
Initializers
import { MantaBackend } from 'cdktf'
new MantaBackend(scope: Construct, props: MantaBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | MantaBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: MantaBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { MantaBackend } from 'cdktf'
MantaBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { MantaBackend } from 'cdktf'
MantaBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
OssBackend
Initializers
import { OssBackend } from 'cdktf'
new OssBackend(scope: Construct, props: OssBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | OssBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: OssBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { OssBackend } from 'cdktf'
OssBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { OssBackend } from 'cdktf'
OssBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
PgBackend
Initializers
import { PgBackend } from 'cdktf'
new PgBackend(scope: Construct, props: PgBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | PgBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: PgBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { PgBackend } from 'cdktf'
PgBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { PgBackend } from 'cdktf'
PgBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
RemoteBackend
Initializers
import { RemoteBackend } from 'cdktf'
new RemoteBackend(scope: Construct, props: RemoteBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | RemoteBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: RemoteBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { RemoteBackend } from 'cdktf'
RemoteBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { RemoteBackend } from 'cdktf'
RemoteBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Resource
- Implements: IResource
A construct which represents a resource.
Initializers
import { Resource } from 'cdktf'
new Resource(scope: Construct, id: string)
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
toString
toStringpublic toString(): string
Returns a string representation of this construct.
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstructimport { Resource } from 'cdktf'
Resource.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
stack | TerraformStack | The stack in which this resource is defined. |
nodeRequired
node- Deprecated: - Please use Construct from the constructs package instead.
public readonly node: Node;
- Type: constructs.Node
The tree node.
stackRequired
stack- Deprecated: - Please use Construct from the constructs package instead.
public readonly stack: TerraformStack;
- Type: TerraformStack
The stack in which this resource is defined.
S3Backend
Initializers
import { S3Backend } from 'cdktf'
new S3Backend(scope: Construct, props: S3BackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | S3BackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: S3BackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { S3Backend } from 'cdktf'
S3Backend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { S3Backend } from 'cdktf'
S3Backend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
SwiftBackend
Initializers
import { SwiftBackend } from 'cdktf'
new SwiftBackend(scope: Construct, props: SwiftBackendProps)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
props | SwiftBackendProps | No description. |
scopeRequired
- Type: constructs.Construct
propsRequired
- Type: SwiftBackendProps
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
_fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { SwiftBackend } from 'cdktf'
SwiftBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { SwiftBackend } from 'cdktf'
SwiftBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
TerraformAsset
Initializers
import { TerraformAsset } from 'cdktf'
new TerraformAsset(scope: Construct, id: string, config: TerraformAssetConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | TerraformAssetConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
- Type: TerraformAssetConfig
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformAsset } from 'cdktf'
TerraformAsset.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
fileName | string | Name of the asset. |
path | string | The path relative to the root of the terraform directory in posix format Use this property to reference the asset. |
assetHash | string | No description. |
type | AssetType | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
fileNameRequired
public readonly fileName: string;
- Type: string
Name of the asset.
pathRequired
public readonly path: string;
- Type: string
The path relative to the root of the terraform directory in posix format Use this property to reference the asset.
assetHashRequired
public readonly assetHash: string;
- Type: string
typeRequired
public readonly type: AssetType;
- Type: AssetType
TerraformBackend
Initializers
import { TerraformBackend } from 'cdktf'
new TerraformBackend(scope: Construct, id: string, name: string)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
name | string | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
nameRequired
- Type: string
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getRemoteStateDataSource
public getRemoteStateDataSource(scope: Construct, name: string, fromStack: string): TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scopeRequired
- Type: constructs.Construct
nameRequired
- Type: string
fromStackRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isBackend | No description. |
isConstruct
import { TerraformBackend } from 'cdktf'
TerraformBackend.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isBackend
import { TerraformBackend } from 'cdktf'
TerraformBackend.isBackend(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
TerraformDataSource
- Implements: ITerraformResource, ITerraformDependable, IInterpolatingParent
Initializers
import { TerraformDataSource } from 'cdktf'
new TerraformDataSource(scope: Construct, id: string, config: TerraformResourceConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | TerraformResourceConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
- Type: TerraformResourceConfig
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getAnyMapAttribute | No description. |
getBooleanAttribute | No description. |
getBooleanMapAttribute | No description. |
getListAttribute | No description. |
getNumberAttribute | No description. |
getNumberListAttribute | No description. |
getNumberMapAttribute | No description. |
getStringAttribute | No description. |
getStringMapAttribute | No description. |
interpolationForAttribute | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getAnyMapAttribute
public getAnyMapAttribute(terraformAttribute: string): {[ key: string ]: any}
terraformAttributeRequired
- Type: string
getBooleanAttribute
public getBooleanAttribute(terraformAttribute: string): IResolvable
terraformAttributeRequired
- Type: string
getBooleanMapAttribute
public getBooleanMapAttribute(terraformAttribute: string): {[ key: string ]: boolean}
terraformAttributeRequired
- Type: string
getListAttribute
public getListAttribute(terraformAttribute: string): string[]
terraformAttributeRequired
- Type: string
getNumberAttribute
public getNumberAttribute(terraformAttribute: string): number
terraformAttributeRequired
- Type: string
getNumberListAttribute
public getNumberListAttribute(terraformAttribute: string): number[]
terraformAttributeRequired
- Type: string
getNumberMapAttribute
public getNumberMapAttribute(terraformAttribute: string): {[ key: string ]: number}
terraformAttributeRequired
- Type: string
getStringAttribute
public getStringAttribute(terraformAttribute: string): string
terraformAttributeRequired
- Type: string
getStringMapAttribute
public getStringMapAttribute(terraformAttribute: string): {[ key: string ]: string}
terraformAttributeRequired
- Type: string
interpolationForAttribute
public interpolationForAttribute(terraformAttribute: string): IResolvable
terraformAttributeRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformDataSource } from 'cdktf'
TerraformDataSource.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
terraformMetaArguments | {[ key: string ]: any} | No description. |
terraformResourceType | string | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
count | number | No description. |
dependsOn | string[] | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
terraformMetaArgumentsRequired
public readonly terraformMetaArguments: {[ key: string ]: any};
- Type: {[ key: string ]: any}
terraformResourceTypeRequired
public readonly terraformResourceType: string;
- Type: string
terraformGeneratorMetadataOptional
public readonly terraformGeneratorMetadata: TerraformProviderGeneratorMetadata;
countOptional
public readonly count: number;
- Type: number
dependsOnOptional
public readonly dependsOn: string[];
- Type: string[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
lifecycleOptional
public readonly lifecycle: TerraformResourceLifecycle;
providerOptional
public readonly provider: TerraformProvider;
- Type: TerraformProvider
TerraformElement
Initializers
import { TerraformElement } from 'cdktf'
new TerraformElement(scope: Construct, id: string, elementType?: string)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
elementType | string | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
elementTypeOptional
- Type: string
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformElement } from 'cdktf'
TerraformElement.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
TerraformHclModule
Initializers
import { TerraformHclModule } from 'cdktf'
new TerraformHclModule(scope: Construct, id: string, options: TerraformHclModuleOptions)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
options | TerraformHclModuleOptions | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
optionsRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | No description. |
addProvider | No description. |
getString | No description. |
interpolationForOutput | No description. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
set | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
addProvider
public addProvider(provider: TerraformProvider | TerraformModuleProvider): void
providerRequired
getString
public getString(output: string): string
outputRequired
- Type: string
interpolationForOutput
public interpolationForOutput(moduleOutput: string): IResolvable
moduleOutputRequired
- Type: string
get
public get(output: string): any
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
set
public set(variable: string, value: any): void
variableRequired
- Type: string
valueRequired
- Type: any
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformHclModule } from 'cdktf'
TerraformHclModule.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
source | string | No description. |
providers | TerraformProvider | TerraformModuleProvider[] | No description. |
skipAssetCreationFromLocalModules | boolean | No description. |
version | string | No description. |
dependsOn | string[] | No description. |
forEach | ITerraformIterator | No description. |
variables | {[ key: string ]: any} | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
sourceRequired
public readonly source: string;
- Type: string
providersOptional
public readonly providers: TerraformProvider | TerraformModuleProvider[];
- Type: TerraformProvider | TerraformModuleProvider[]
skipAssetCreationFromLocalModulesOptional
public readonly skipAssetCreationFromLocalModules: boolean;
- Type: boolean
versionOptional
public readonly version: string;
- Type: string
dependsOnOptional
public readonly dependsOn: string[];
- Type: string[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
variablesOptional
public readonly variables: {[ key: string ]: any};
- Type: {[ key: string ]: any}
TerraformLocal
- Implements: ITerraformAddressable
Initializers
import { TerraformLocal } from 'cdktf'
new TerraformLocal(scope: Construct, id: string, expression: any)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
expression | any | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
expressionRequired
- Type: any
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformLocal } from 'cdktf'
TerraformLocal.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
asBoolean | IResolvable | No description. |
asList | string[] | No description. |
asNumber | number | No description. |
asString | string | No description. |
expression | any | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
asBooleanRequired
public readonly asBoolean: IResolvable;
- Type: IResolvable
asListRequired
public readonly asList: string[];
- Type: string[]
asNumberRequired
public readonly asNumber: number;
- Type: number
asStringRequired
public readonly asString: string;
- Type: string
expressionRequired
public readonly expression: any;
- Type: any
TerraformModule
- Implements: ITerraformDependable
Initializers
import { TerraformModule } from 'cdktf'
new TerraformModule(scope: Construct, id: string, options: TerraformModuleOptions)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
options | TerraformModuleOptions | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
optionsRequired
- Type: TerraformModuleOptions
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | No description. |
addProvider | No description. |
getString | No description. |
interpolationForOutput | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
addProvider
public addProvider(provider: TerraformProvider | TerraformModuleProvider): void
providerRequired
getString
public getString(output: string): string
outputRequired
- Type: string
interpolationForOutput
public interpolationForOutput(moduleOutput: string): IResolvable
moduleOutputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformModule } from 'cdktf'
TerraformModule.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
source | string | No description. |
providers | TerraformProvider | TerraformModuleProvider[] | No description. |
skipAssetCreationFromLocalModules | boolean | No description. |
version | string | No description. |
dependsOn | string[] | No description. |
forEach | ITerraformIterator | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
sourceRequired
public readonly source: string;
- Type: string
providersOptional
public readonly providers: TerraformProvider | TerraformModuleProvider[];
- Type: TerraformProvider | TerraformModuleProvider[]
skipAssetCreationFromLocalModulesOptional
public readonly skipAssetCreationFromLocalModules: boolean;
- Type: boolean
versionOptional
public readonly version: string;
- Type: string
dependsOnOptional
public readonly dependsOn: string[];
- Type: string[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
TerraformOutput
Initializers
import { TerraformOutput } from 'cdktf'
new TerraformOutput(scope: Construct, id: string, config: TerraformOutputConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | TerraformOutputConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
- Type: TerraformOutputConfig
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isTerrafromOutput | No description. |
isConstruct
import { TerraformOutput } from 'cdktf'
TerraformOutput.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isTerrafromOutput
import { TerraformOutput } from 'cdktf'
TerraformOutput.isTerrafromOutput(x: any)
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
staticId | boolean | No description. |
value | any | No description. |
dependsOn | ITerraformDependable[] | No description. |
description | string | No description. |
sensitive | boolean | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
staticIdRequired
public readonly staticId: boolean;
- Type: boolean
valueRequired
public readonly value: any;
- Type: any
dependsOnOptional
public readonly dependsOn: ITerraformDependable[];
- Type: ITerraformDependable[]
descriptionOptional
public readonly description: string;
- Type: string
sensitiveOptional
public readonly sensitive: boolean;
- Type: boolean
TerraformProvider
Initializers
import { TerraformProvider } from 'cdktf'
new TerraformProvider(scope: Construct, id: string, config: TerraformProviderConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | TerraformProviderConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
- Type: TerraformProviderConfig
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformProvider } from 'cdktf'
TerraformProvider.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
metaAttributes | {[ key: string ]: any} | No description. |
terraformResourceType | string | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
terraformProviderSource | string | No description. |
alias | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
metaAttributesRequired
public readonly metaAttributes: {[ key: string ]: any};
- Type: {[ key: string ]: any}
terraformResourceTypeRequired
public readonly terraformResourceType: string;
- Type: string
terraformGeneratorMetadataOptional
public readonly terraformGeneratorMetadata: TerraformProviderGeneratorMetadata;
terraformProviderSourceOptional
public readonly terraformProviderSource: string;
- Type: string
aliasOptional
public readonly alias: string;
- Type: string
TerraformRemoteState
- Implements: ITerraformAddressable
Initializers
import { TerraformRemoteState } from 'cdktf'
new TerraformRemoteState(scope: Construct, id: string, backend: string, config: DataTerraformRemoteStateConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
backend | string | No description. |
config | DataTerraformRemoteStateConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
backendRequired
- Type: string
configRequired
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
get | No description. |
getBoolean | No description. |
getList | No description. |
getNumber | No description. |
getString | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
outputRequired
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
outputRequired
- Type: string
getList
public getList(output: string): string[]
outputRequired
- Type: string
getNumber
public getNumber(output: string): number
outputRequired
- Type: string
getString
public getString(output: string): string
outputRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformRemoteState } from 'cdktf'
TerraformRemoteState.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
TerraformResource
- Implements: ITerraformResource, ITerraformDependable, IInterpolatingParent
Initializers
import { TerraformResource } from 'cdktf'
new TerraformResource(scope: Construct, id: string, config: TerraformResourceConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | TerraformResourceConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
- Type: TerraformResourceConfig
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getAnyMapAttribute | No description. |
getBooleanAttribute | No description. |
getBooleanMapAttribute | No description. |
getListAttribute | No description. |
getNumberAttribute | No description. |
getNumberListAttribute | No description. |
getNumberMapAttribute | No description. |
getStringAttribute | No description. |
getStringMapAttribute | No description. |
interpolationForAttribute | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
getAnyMapAttribute
public getAnyMapAttribute(terraformAttribute: string): {[ key: string ]: any}
terraformAttributeRequired
- Type: string
getBooleanAttribute
public getBooleanAttribute(terraformAttribute: string): IResolvable
terraformAttributeRequired
- Type: string
getBooleanMapAttribute
public getBooleanMapAttribute(terraformAttribute: string): {[ key: string ]: boolean}
terraformAttributeRequired
- Type: string
getListAttribute
public getListAttribute(terraformAttribute: string): string[]
terraformAttributeRequired
- Type: string
getNumberAttribute
public getNumberAttribute(terraformAttribute: string): number
terraformAttributeRequired
- Type: string
getNumberListAttribute
public getNumberListAttribute(terraformAttribute: string): number[]
terraformAttributeRequired
- Type: string
getNumberMapAttribute
public getNumberMapAttribute(terraformAttribute: string): {[ key: string ]: number}
terraformAttributeRequired
- Type: string
getStringAttribute
public getStringAttribute(terraformAttribute: string): string
terraformAttributeRequired
- Type: string
getStringMapAttribute
public getStringMapAttribute(terraformAttribute: string): {[ key: string ]: string}
terraformAttributeRequired
- Type: string
interpolationForAttribute
public interpolationForAttribute(terraformAttribute: string): IResolvable
terraformAttributeRequired
- Type: string
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformResource } from 'cdktf'
TerraformResource.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
terraformMetaArguments | {[ key: string ]: any} | No description. |
terraformResourceType | string | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
connection | SSHProvisionerConnection | WinrmProvisionerConnection | No description. |
count | number | No description. |
dependsOn | string[] | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[] | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
terraformMetaArgumentsRequired
public readonly terraformMetaArguments: {[ key: string ]: any};
- Type: {[ key: string ]: any}
terraformResourceTypeRequired
public readonly terraformResourceType: string;
- Type: string
terraformGeneratorMetadataOptional
public readonly terraformGeneratorMetadata: TerraformProviderGeneratorMetadata;
connectionOptional
public readonly connection: SSHProvisionerConnection | WinrmProvisionerConnection;
countOptional
public readonly count: number;
- Type: number
dependsOnOptional
public readonly dependsOn: string[];
- Type: string[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
lifecycleOptional
public readonly lifecycle: TerraformResourceLifecycle;
providerOptional
public readonly provider: TerraformProvider;
- Type: TerraformProvider
provisionersOptional
public readonly provisioners: FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[];
- Type: FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[]
TerraformStack
Initializers
import { TerraformStack } from 'cdktf'
new TerraformStack(scope: Construct, id: string)
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
addDependency | No description. |
addOverride | No description. |
allProviders | No description. |
dependsOn | No description. |
ensureBackendExists | No description. |
getLogicalId | No description. |
prepareStack | No description. |
registerIncomingCrossStackReference | No description. |
registerOutgoingCrossStackReference | No description. |
runAllValidations | Run all validations on the stack. |
toTerraform | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addDependency
public addDependency(dependency: TerraformStack): void
dependencyRequired
- Type: TerraformStack
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
allProviders
public allProviders(): TerraformProvider[]
dependsOn
public dependsOn(stack: TerraformStack): boolean
stackRequired
- Type: TerraformStack
ensureBackendExists
public ensureBackendExists(): TerraformBackend
getLogicalId
public getLogicalId(tfElement: TerraformElement | Node): string
tfElementRequired
- Type: TerraformElement | constructs.Node
prepareStack
public prepareStack(): void
registerIncomingCrossStackReference
public registerIncomingCrossStackReference(fromStack: TerraformStack): TerraformRemoteState
fromStackRequired
- Type: TerraformStack
registerOutgoingCrossStackReference
public registerOutgoingCrossStackReference(identifier: string): TerraformOutput
identifierRequired
- Type: string
runAllValidations
public runAllValidations(): void
Run all validations on the stack.
toTerraform
public toTerraform(): any
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isStack | No description. |
of | No description. |
isConstruct
import { TerraformStack } from 'cdktf'
TerraformStack.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
isStack
import { TerraformStack } from 'cdktf'
TerraformStack.isStack(x: any)
xRequired
- Type: any
of
import { TerraformStack } from 'cdktf'
TerraformStack.of(construct: IConstruct)
constructRequired
- Type: constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
dependencies | TerraformStack[] | No description. |
synthesizer | IStackSynthesizer | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
dependenciesRequired
public readonly dependencies: TerraformStack[];
- Type: TerraformStack[]
synthesizerRequired
public readonly synthesizer: IStackSynthesizer;
- Type: IStackSynthesizer
TerraformVariable
- Implements: ITerraformAddressable
Initializers
import { TerraformVariable } from 'cdktf'
new TerraformVariable(scope: Construct, id: string, config: TerraformVariableConfig)
| Name | Type | Description |
|---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
config | TerraformVariableConfig | No description. |
scopeRequired
- Type: constructs.Construct
idRequired
- Type: string
configRequired
- Type: TerraformVariableConfig
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of 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. |
toMetadata | No description. |
toTerraform | No description. |
addValidation | No description. |
synthesizeAttributes | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
pathRequired
- Type: string
valueRequired
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
- Type: string
The new logical ID to use for this stack element.
resetOverrideLogicalId
public resetOverrideLogicalId(): void
Resets a previously passed logical Id to use the auto-generated logical id again.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
addValidation
public addValidation(validation: TerraformVariableValidationConfig): void
validationRequired
synthesizeAttributes
public synthesizeAttributes(): {[ key: string ]: any}
Static Functions
| Name | Description |
|---|---|
isConstruct | Checks if x is a construct. |
isConstruct
import { TerraformVariable } from 'cdktf'
TerraformVariable.isConstruct(x: any)
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.
xRequired
- Type: any
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
booleanValue | IResolvable | No description. |
listValue | string[] | No description. |
numberValue | number | No description. |
stringValue | string | No description. |
value | any | No description. |
default | any | No description. |
description | string | No description. |
nullable | boolean | No description. |
sensitive | boolean | No description. |
type | string | No description. |
validation | TerraformVariableValidationConfig[] | No description. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStackRequired
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
booleanValueRequired
public readonly booleanValue: IResolvable;
- Type: IResolvable
listValueRequired
public readonly listValue: string[];
- Type: string[]
numberValueRequired
public readonly numberValue: number;
- Type: number
stringValueRequired
public readonly stringValue: string;
- Type: string
valueRequired
public readonly value: any;
- Type: any
defaultOptional
public readonly default: any;
- Type: any
descriptionOptional
public readonly description: string;
- Type: string
nullableOptional
public readonly nullable: boolean;
- Type: boolean
sensitiveOptional
public readonly sensitive: boolean;
- Type: boolean
typeOptional
public readonly type: string;
- Type: string
validationOptional
public readonly validation: TerraformVariableValidationConfig[];
Structs
AppOptions
Initializer
import { AppOptions } from 'cdktf'
const appOptions: AppOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
context | {[ key: string ]: any} | Additional context values for the application. |
outdir | string | The directory to output Terraform resources. |
skipValidation | boolean | Whether to skip the validation during synthesis of the app. |
stackTraces | boolean | No description. |
contextOptional
public readonly context: {[ key: string ]: any};
- Type: {[ key: string ]: any}
- Default: no additional context
Additional context values for the application.
Context set by the CLI or the context key in cdktf.json has precedence.
Context can be read from any construct using node.getContext(key).
outdirOptional
public readonly outdir: string;
- Type: string
- Default: CDKTF_OUTDIR if defined, otherwise "cdktf.out"
The directory to output Terraform resources.
skipValidationOptional
public readonly skipValidation: boolean;
- Type: boolean
- Default: false
Whether to skip the validation during synthesis of the app.
stackTracesOptional
public readonly stackTraces: boolean;
- Type: boolean
ArtifactoryBackendProps
Stores the state as an artifact in a given repository in Artifactory.
Generic HTTP repositories are supported, and state from different configurations may be kept at different subpaths within the repository.
Note: The URL must include the path to the Artifactory installation. It will likely end in /artifactory.
This backend does not support state locking.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/artifactory
Initializer
import { ArtifactoryBackendProps } from 'cdktf'
const artifactoryBackendProps: ArtifactoryBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
password | string | (Required) - The password. |
repo | string | (Required) - The repository name. |
subpath | string | (Required) - Path within the repository. |
url | string | (Required) - The URL. |
username | string | (Required) - The username. |
passwordRequired
public readonly password: string;
- Type: string
(Required) - The password.
repoRequired
public readonly repo: string;
- Type: string
(Required) - The repository name.
subpathRequired
public readonly subpath: string;
- Type: string
(Required) - Path within the repository.
urlRequired
public readonly url: string;
- Type: string
(Required) - The URL.
Note that this is the base url to artifactory not the full repo and subpath.
usernameRequired
public readonly username: string;
- Type: string
(Required) - The username.
AzurermBackendProps
Stores the state as a Blob with the given Key within the Blob Container within the Blob Storage Account.
This backend supports state locking and consistency checking with Azure Blob Storage native capabilities.
Note: By default the Azure Backend uses ADAL for authentication which is deprecated in favour of MSAL - MSAL can be used by setting use_microsoft_graph to true. The default for this will change in Terraform 1.2, so that MSAL authentication is used by default.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/azurerm
Initializer
import { AzurermBackendProps } from 'cdktf'
const azurermBackendProps: AzurermBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
containerName | string | (Required) The Name of the Storage Container within the Storage Account. |
key | string | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
storageAccountName | string | (Required) The Name of the Storage Account. |
accessKey | string | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
clientCertificatePassword | string | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
clientCertificatePath | string | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
clientId | string | (Optional) The Client ID of the Service Principal. |
clientSecret | string | (Optional) The Client Secret of the Service Principal. |
endpoint | string | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
environment | string | (Optional) The Azure Environment which should be used. |
msiEndpoint | string | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
oidcRequestToken | string | (Optional) The bearer token for the request to the OIDC provider. |
oidcRequestUrl | string | (Optional) The URL for the OIDC provider from which to request an ID token. |
resourceGroupName | string | (Required) The Name of the Resource Group in which the Storage Account exists. |
sasToken | string | (Optional) The SAS Token used to access the Blob Storage Account. |
snapshot | boolean | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
subscriptionId | string | (Optional) The Subscription ID in which the Storage Account exists. |
tenantId | string | (Optional) The Tenant ID in which the Subscription exists. |
useAzureadAuth | boolean | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
useMicrosoftGraph | boolean | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
useMsi | boolean | (Optional) Should Managed Service Identity authentication be used? |
useOidc | boolean | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
containerNameRequired
public readonly containerName: string;
- Type: string
(Required) The Name of the Storage Container within the Storage Account.
keyRequired
public readonly key: string;
- Type: string
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storageAccountNameRequired
public readonly storageAccountName: string;
- Type: string
(Required) The Name of the Storage Account.
accessKeyOptional
public readonly accessKey: string;
- Type: string
access_key - (Optional) The Access Key used to access the Blob Storage Account.
This can also be sourced from the ARM_ACCESS_KEY environment variable.
clientCertificatePasswordOptional
public readonly clientCertificatePassword: string;
- Type: string
(Optional) The password associated with the Client Certificate specified in client_certificate_path.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PASSWORD environment variable.
clientCertificatePathOptional
public readonly clientCertificatePath: string;
- Type: string
(Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PATH environment variable.
clientIdOptional
public readonly clientId: string;
- Type: string
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
clientSecretOptional
public readonly clientSecret: string;
- Type: string
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpointOptional
public readonly endpoint: string;
- Type: string
(Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable.
NOTE: An endpoint should only be configured when using Azure Stack.
environmentOptional
public readonly environment: string;
- Type: string
(Optional) The Azure Environment which should be used.
This can also be sourced from the ARM_ENVIRONMENT environment variable. Possible values are public, china, german, stack and usgovernment. Defaults to public.
msiEndpointOptional
public readonly msiEndpoint: string;
- Type: string
(Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified.
This can also be sourced from the ARM_MSI_ENDPOINT environment variable.
oidcRequestTokenOptional
public readonly oidcRequestToken: string;
- Type: string
(Optional) The bearer token for the request to the OIDC provider.
This can also be sourced from the ARM_OIDC_REQUEST_TOKEN or ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables.
oidcRequestUrlOptional
public readonly oidcRequestUrl: string;
- Type: string
(Optional) The URL for the OIDC provider from which to request an ID token.
This can also be sourced from the ARM_OIDC_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_URL environment variables.
resourceGroupNameOptional
public readonly resourceGroupName: string;
- Type: string
(Required) The Name of the Resource Group in which the Storage Account exists.
sasTokenOptional
public readonly sasToken: string;
- Type: string
(Optional) The SAS Token used to access the Blob Storage Account.
This can also be sourced from the ARM_SAS_TOKEN environment variable.
snapshotOptional
public readonly snapshot: boolean;
- Type: boolean
(Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?
Defaults to false. This value can also be sourced from the ARM_SNAPSHOT environment variable.
subscriptionIdOptional
public readonly subscriptionId: string;
- Type: string
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
tenantIdOptional
public readonly tenantId: string;
- Type: string
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
useAzureadAuthOptional
public readonly useAzureadAuth: boolean;
- Type: boolean
(Optional) Should AzureAD Authentication be used to access the Blob Storage Account.
This can also be sourced from the ARM_USE_AZUREAD environment variable.
Note: When using AzureAD for Authentication to Storage you also need to ensure the Storage Blob Data Owner role is assigned.
useMicrosoftGraphOptional
public readonly useMicrosoftGraph: boolean;
- Type: boolean
(Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?
Defaults to true.
Note: In Terraform 1.2 the Azure Backend uses MSAL (and Microsoft Graph) rather than ADAL (and Azure Active Directory Graph) for authentication by default - you can disable this by setting use_microsoft_graph to false. This setting will be removed in Terraform 1.3, due to Microsoft's deprecation of ADAL.
useMsiOptional
public readonly useMsi: boolean;
- Type: boolean
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
useOidcOptional
public readonly useOidc: boolean;
- Type: boolean
(Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable.
Note: When using OIDC for authentication, use_microsoft_graph must be set to true (which is the default).
CloudBackendProps
The Cloud Backend synthesizes a {@link https://www.terraform.io/cli/cloud/settings#the-cloud-block cloud block}. The cloud block is a nested block within the top-level terraform settings block. It specifies which Terraform Cloud workspaces to use for the current working directory. The cloud block only affects Terraform CLI's behavior. When Terraform Cloud uses a configuration that contains a cloud block - for example, when a workspace is configured to use a VCS provider directly - it ignores the block and behaves according to its own workspace settings.
https://www.terraform.io/cli/cloud/settings#arguments
Initializer
import { CloudBackendProps } from 'cdktf'
const cloudBackendProps: CloudBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
organization | string | The name of the organization containing the workspace(s) the current configuration should use. |
workspaces | NamedCloudWorkspace | TaggedCloudWorkspaces | A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration. |
hostname | string | The hostname of a Terraform Enterprise installation, if using Terraform Enterprise. |
token | string | The token used to authenticate with Terraform Cloud. |
organizationRequired
public readonly organization: string;
- Type: string
The name of the organization containing the workspace(s) the current configuration should use.
workspacesRequired
public readonly workspaces: NamedCloudWorkspace | TaggedCloudWorkspaces;
A nested block that specifies which remote Terraform Cloud workspaces to use for the current configuration.
The workspaces block must contain exactly one of the following arguments, each denoting a strategy for how workspaces should be mapped:
hostnameOptional
public readonly hostname: string;
- Type: string
- Default: app.terraform.io
The hostname of a Terraform Enterprise installation, if using Terraform Enterprise.
tokenOptional
public readonly token: string;
- Type: string
The token used to authenticate with Terraform Cloud.
We recommend omitting the token from the configuration, and instead using terraform login or manually configuring credentials in the CLI config file.
ConsulBackendProps
Stores the state in the Consul KV store at a given path. This backend supports state locking.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/consul
Initializer
import { ConsulBackendProps } from 'cdktf'
const consulBackendProps: ConsulBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
accessToken | string | (Required) Access token. |
path | string | (Required) Path in the Consul KV store. |
address | string | (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. |
caFile | string | (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. |
certFile | string | (Optional) A path to a PEM-encoded certificate provided to the remote agent; |
datacenter | string | (Optional) The datacenter to use. |
gzip | boolean | (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. |
httpAuth | string | (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. |
keyFile | string | (Optional) A path to a PEM-encoded private key, required if cert_file is specified. |
lock | boolean | (Optional) false to disable locking. |
scheme | string | (Optional) Specifies what protocol to use when talking to the given address,either http or https. |
accessTokenRequired
public readonly accessToken: string;
- Type: string
(Required) Access token.
pathRequired
public readonly path: string;
- Type: string
(Required) Path in the Consul KV store.
addressOptional
public readonly address: string;
- Type: string
(Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
Defaults to the local agent HTTP listener.
caFileOptional
public readonly caFile: string;
- Type: string
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
certFileOptional
public readonly certFile: string;
- Type: string
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenterOptional
public readonly datacenter: string;
- Type: string
(Optional) The datacenter to use.
Defaults to that of the agent.
gzipOptional
public readonly gzip: boolean;
- Type: boolean
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
httpAuthOptional
public readonly httpAuth: string;
- Type: string
(Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
keyFileOptional
public readonly keyFile: string;
- Type: string
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lockOptional
public readonly lock: boolean;
- Type: boolean
(Optional) false to disable locking.
This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.
schemeOptional
public readonly scheme: string;
- Type: string
(Optional) Specifies what protocol to use when talking to the given address,either http or https.
SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.
CosBackendProps
Stores the state as an object in a configurable prefix in a given bucket on Tencent Cloud Object Storage (COS).
This backend supports state locking.
Warning! It is highly recommended that you enable Object Versioning on the COS bucket to allow for state recovery in the case of accidental deletions and human error.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/cos
Initializer
import { CosBackendProps } from 'cdktf'
const cosBackendProps: CosBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
bucket | string | (Required) The name of the COS bucket. |
acl | string | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
encrypt | boolean | (Optional) Whether to enable server side encryption of the state file. |
key | string | (Optional) The path for saving the state file in bucket. |
prefix | string | (Optional) The directory for saving the state file in bucket. |
region | string | (Optional) The region of the COS bucket. |
secretId | string | (Optional) Secret id of Tencent Cloud. |
secretKey | string | (Optional) Secret key of Tencent Cloud. |
bucketRequired
public readonly bucket: string;
- Type: string
(Required) The name of the COS bucket.
You shall manually create it first.
aclOptional
public readonly acl: string;
- Type: string
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
encryptOptional
public readonly encrypt: boolean;
- Type: boolean
(Optional) Whether to enable server side encryption of the state file.
If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.
keyOptional
public readonly key: string;
- Type: string
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefixOptional
public readonly prefix: string;
- Type: string
(Optional) The directory for saving the state file in bucket.
Default to "env:".
regionOptional
public readonly region: string;
- Type: string
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secretIdOptional
public readonly secretId: string;
- Type: string
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secretKeyOptional
public readonly secretKey: string;
- Type: string
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
DataTerraformRemoteStateArtifactoryConfig
Initializer
import { DataTerraformRemoteStateArtifactoryConfig } from 'cdktf'
const dataTerraformRemoteStateArtifactoryConfig: DataTerraformRemoteStateArtifactoryConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
password | string | (Required) - The password. |
repo | string | (Required) - The repository name. |
subpath | string | (Required) - Path within the repository. |
url | string | (Required) - The URL. |
username | string | (Required) - The username. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
passwordRequired
public readonly password: string;
- Type: string
(Required) - The password.
repoRequired
public readonly repo: string;
- Type: string
(Required) - The repository name.
subpathRequired
public readonly subpath: string;
- Type: string
(Required) - Path within the repository.
urlRequired
public readonly url: string;
- Type: string
(Required) - The URL.
Note that this is the base url to artifactory not the full repo and subpath.
usernameRequired
public readonly username: string;
- Type: string
(Required) - The username.
DataTerraformRemoteStateAzurermConfig
Initializer
import { DataTerraformRemoteStateAzurermConfig } from 'cdktf'
const dataTerraformRemoteStateAzurermConfig: DataTerraformRemoteStateAzurermConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
containerName | string | (Required) The Name of the Storage Container within the Storage Account. |
key | string | (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. |
storageAccountName | string | (Required) The Name of the Storage Account. |
accessKey | string | access_key - (Optional) The Access Key used to access the Blob Storage Account. |
clientCertificatePassword | string | (Optional) The password associated with the Client Certificate specified in client_certificate_path. |
clientCertificatePath | string | (Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal. |
clientId | string | (Optional) The Client ID of the Service Principal. |
clientSecret | string | (Optional) The Client Secret of the Service Principal. |
endpoint | string | (Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable. |
environment | string | (Optional) The Azure Environment which should be used. |
msiEndpoint | string | (Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified. |
oidcRequestToken | string | (Optional) The bearer token for the request to the OIDC provider. |
oidcRequestUrl | string | (Optional) The URL for the OIDC provider from which to request an ID token. |
resourceGroupName | string | (Required) The Name of the Resource Group in which the Storage Account exists. |
sasToken | string | (Optional) The SAS Token used to access the Blob Storage Account. |
snapshot | boolean | (Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use? |
subscriptionId | string | (Optional) The Subscription ID in which the Storage Account exists. |
tenantId | string | (Optional) The Tenant ID in which the Subscription exists. |
useAzureadAuth | boolean | (Optional) Should AzureAD Authentication be used to access the Blob Storage Account. |
useMicrosoftGraph | boolean | (Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph? |
useMsi | boolean | (Optional) Should Managed Service Identity authentication be used? |
useOidc | boolean | (Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
containerNameRequired
public readonly containerName: string;
- Type: string
(Required) The Name of the Storage Container within the Storage Account.
keyRequired
public readonly key: string;
- Type: string
(Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container.
storageAccountNameRequired
public readonly storageAccountName: string;
- Type: string
(Required) The Name of the Storage Account.
accessKeyOptional
public readonly accessKey: string;
- Type: string
access_key - (Optional) The Access Key used to access the Blob Storage Account.
This can also be sourced from the ARM_ACCESS_KEY environment variable.
clientCertificatePasswordOptional
public readonly clientCertificatePassword: string;
- Type: string
(Optional) The password associated with the Client Certificate specified in client_certificate_path.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PASSWORD environment variable.
clientCertificatePathOptional
public readonly clientCertificatePath: string;
- Type: string
(Optional) The path to the PFX file used as the Client Certificate when authenticating as a Service Principal.
This can also be sourced from the ARM_CLIENT_CERTIFICATE_PATH environment variable.
clientIdOptional
public readonly clientId: string;
- Type: string
(Optional) The Client ID of the Service Principal.
This can also be sourced from the ARM_CLIENT_ID environment variable.
clientSecretOptional
public readonly clientSecret: string;
- Type: string
(Optional) The Client Secret of the Service Principal.
This can also be sourced from the ARM_CLIENT_SECRET environment variable.
endpointOptional
public readonly endpoint: string;
- Type: string
(Optional) The Custom Endpoint for Azure Resource Manager. This can also be sourced from the ARM_ENDPOINT environment variable.
NOTE: An endpoint should only be configured when using Azure Stack.
environmentOptional
public readonly environment: string;
- Type: string
(Optional) The Azure Environment which should be used.
This can also be sourced from the ARM_ENVIRONMENT environment variable. Possible values are public, china, german, stack and usgovernment. Defaults to public.
msiEndpointOptional
public readonly msiEndpoint: string;
- Type: string
(Optional) The path to a custom Managed Service Identity endpoint which is automatically determined if not specified.
This can also be sourced from the ARM_MSI_ENDPOINT environment variable.
oidcRequestTokenOptional
public readonly oidcRequestToken: string;
- Type: string
(Optional) The bearer token for the request to the OIDC provider.
This can also be sourced from the ARM_OIDC_REQUEST_TOKEN or ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables.
oidcRequestUrlOptional
public readonly oidcRequestUrl: string;
- Type: string
(Optional) The URL for the OIDC provider from which to request an ID token.
This can also be sourced from the ARM_OIDC_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_URL environment variables.
resourceGroupNameOptional
public readonly resourceGroupName: string;
- Type: string
(Required) The Name of the Resource Group in which the Storage Account exists.
sasTokenOptional
public readonly sasToken: string;
- Type: string
(Optional) The SAS Token used to access the Blob Storage Account.
This can also be sourced from the ARM_SAS_TOKEN environment variable.
snapshotOptional
public readonly snapshot: boolean;
- Type: boolean
(Optional) Should the Blob used to store the Terraform Statefile be snapshotted before use?
Defaults to false. This value can also be sourced from the ARM_SNAPSHOT environment variable.
subscriptionIdOptional
public readonly subscriptionId: string;
- Type: string
(Optional) The Subscription ID in which the Storage Account exists.
This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable.
tenantIdOptional
public readonly tenantId: string;
- Type: string
(Optional) The Tenant ID in which the Subscription exists.
This can also be sourced from the ARM_TENANT_ID environment variable.
useAzureadAuthOptional
public readonly useAzureadAuth: boolean;
- Type: boolean
(Optional) Should AzureAD Authentication be used to access the Blob Storage Account.
This can also be sourced from the ARM_USE_AZUREAD environment variable.
Note: When using AzureAD for Authentication to Storage you also need to ensure the Storage Blob Data Owner role is assigned.
useMicrosoftGraphOptional
public readonly useMicrosoftGraph: boolean;
- Type: boolean
(Optional) Should MSAL be used for authentication instead of ADAL, and should Microsoft Graph be used instead of Azure Active Directory Graph?
Defaults to true.
Note: In Terraform 1.2 the Azure Backend uses MSAL (and Microsoft Graph) rather than ADAL (and Azure Active Directory Graph) for authentication by default - you can disable this by setting use_microsoft_graph to false. This setting will be removed in Terraform 1.3, due to Microsoft's deprecation of ADAL.
useMsiOptional
public readonly useMsi: boolean;
- Type: boolean
(Optional) Should Managed Service Identity authentication be used?
This can also be sourced from the ARM_USE_MSI environment variable.
useOidcOptional
public readonly useOidc: boolean;
- Type: boolean
(Optional) Should OIDC authentication be used? This can also be sourced from the ARM_USE_OIDC environment variable.
Note: When using OIDC for authentication, use_microsoft_graph must be set to true (which is the default).
DataTerraformRemoteStateConfig
Initializer
import { DataTerraformRemoteStateConfig } from 'cdktf'
const dataTerraformRemoteStateConfig: DataTerraformRemoteStateConfig = { ... }
Properties
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
DataTerraformRemoteStateConsulConfig
Initializer
import { DataTerraformRemoteStateConsulConfig } from 'cdktf'
const dataTerraformRemoteStateConsulConfig: DataTerraformRemoteStateConsulConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
accessToken | string | (Required) Access token. |
path | string | (Required) Path in the Consul KV store. |
address | string | (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. |
caFile | string | (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. |
certFile | string | (Optional) A path to a PEM-encoded certificate provided to the remote agent; |
datacenter | string | (Optional) The datacenter to use. |
gzip | boolean | (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. |
httpAuth | string | (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. |
keyFile | string | (Optional) A path to a PEM-encoded private key, required if cert_file is specified. |
lock | boolean | (Optional) false to disable locking. |
scheme | string | (Optional) Specifies what protocol to use when talking to the given address,either http or https. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
accessTokenRequired
public readonly accessToken: string;
- Type: string
(Required) Access token.
pathRequired
public readonly path: string;
- Type: string
(Required) Path in the Consul KV store.
addressOptional
public readonly address: string;
- Type: string
(Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
Defaults to the local agent HTTP listener.
caFileOptional
public readonly caFile: string;
- Type: string
(Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
certFileOptional
public readonly certFile: string;
- Type: string
(Optional) A path to a PEM-encoded certificate provided to the remote agent;
requires use of key_file.
datacenterOptional
public readonly datacenter: string;
- Type: string
(Optional) The datacenter to use.
Defaults to that of the agent.
gzipOptional
public readonly gzip: boolean;
- Type: boolean
(Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
httpAuthOptional
public readonly httpAuth: string;
- Type: string
(Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
keyFileOptional
public readonly keyFile: string;
- Type: string
(Optional) A path to a PEM-encoded private key, required if cert_file is specified.
lockOptional
public readonly lock: boolean;
- Type: boolean
(Optional) false to disable locking.
This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.
schemeOptional
public readonly scheme: string;
- Type: string
(Optional) Specifies what protocol to use when talking to the given address,either http or https.
SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.
DataTerraformRemoteStateCosConfig
Initializer
import { DataTerraformRemoteStateCosConfig } from 'cdktf'
const dataTerraformRemoteStateCosConfig: DataTerraformRemoteStateCosConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
bucket | string | (Required) The name of the COS bucket. |
acl | string | (Optional) Object ACL to be applied to the state file, allows private and public-read. |
encrypt | boolean | (Optional) Whether to enable server side encryption of the state file. |
key | string | (Optional) The path for saving the state file in bucket. |
prefix | string | (Optional) The directory for saving the state file in bucket. |
region | string | (Optional) The region of the COS bucket. |
secretId | string | (Optional) Secret id of Tencent Cloud. |
secretKey | string | (Optional) Secret key of Tencent Cloud. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
bucketRequired
public readonly bucket: string;
- Type: string
(Required) The name of the COS bucket.
You shall manually create it first.
aclOptional
public readonly acl: string;
- Type: string
(Optional) Object ACL to be applied to the state file, allows private and public-read.
Defaults to private.
encryptOptional
public readonly encrypt: boolean;
- Type: boolean
(Optional) Whether to enable server side encryption of the state file.
If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.
keyOptional
public readonly key: string;
- Type: string
(Optional) The path for saving the state file in bucket.
Defaults to terraform.tfstate.
prefixOptional
public readonly prefix: string;
- Type: string
(Optional) The directory for saving the state file in bucket.
Default to "env:".
regionOptional
public readonly region: string;
- Type: string
(Optional) The region of the COS bucket.
It supports environment variables TENCENTCLOUD_REGION.
secretIdOptional
public readonly secretId: string;
- Type: string
(Optional) Secret id of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_ID.
secretKeyOptional
public readonly secretKey: string;
- Type: string
(Optional) Secret key of Tencent Cloud.
It supports environment variables TENCENTCLOUD_SECRET_KEY.
DataTerraformRemoteStateEtcdConfig
Initializer
import { DataTerraformRemoteStateEtcdConfig } from 'cdktf'
const dataTerraformRemoteStateEtcdConfig: DataTerraformRemoteStateEtcdConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
endpoints | string | (Required) A space-separated list of the etcd endpoints. |
path | string | (Required) The path where to store the state. |
password | string | (Optional) The password. |
username | string | (Optional) The username. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
endpointsRequired
public readonly endpoints: string;
- Type: string
(Required) A space-separated list of the etcd endpoints.
pathRequired
public readonly path: string;
- Type: string
(Required) The path where to store the state.
passwordOptional
public readonly password: string;
- Type: string
(Optional) The password.
usernameOptional
public readonly username: string;
- Type: string
(Optional) The username.
DataTerraformRemoteStateEtcdV3Config
Initializer
import { DataTerraformRemoteStateEtcdV3Config } from 'cdktf'
const dataTerraformRemoteStateEtcdV3Config: DataTerraformRemoteStateEtcdV3Config = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
endpoints | string[] | (Required) The list of 'etcd' endpoints which to connect to. |
cacertPath | string | (Optional) The path to a PEM-encoded CA bundle with which to verify certificates of TLS-enabled etcd servers. |
certPath | string | (Optional) The path to a PEM-encoded certificate to provide to etcd for secure client identification. |
keyPath | string | (Optional) The path to a PEM-encoded key to provide to etcd for secure client identification. |
lock | boolean | (Optional) Whether to lock state access. |
password | string | (Optional) Password used to connect to the etcd cluster. |
prefix | string | (Optional) An optional prefix to be added to keys when to storing state in etcd. |
username | string | (Optional) Username used to connect to the etcd cluster. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
endpointsRequired
public readonly endpoints: string[];
- Type: string[]
(Required) The list of 'etcd' endpoints which to connect to.
cacertPathOptional
public readonly cacertPath: string;
- Type: string
(Optional) The path to a PEM-encoded CA bundle with which to verify certificates of TLS-enabled etcd servers.
certPathOptional
public readonly certPath: string;
- Type: string
(Optional) The path to a PEM-encoded certificate to provide to etcd for secure client identification.
keyPathOptional
public readonly keyPath: string;
- Type: string
(Optional) The path to a PEM-encoded key to provide to etcd for secure client identification.
lockOptional
public readonly lock: boolean;
- Type: boolean
(Optional) Whether to lock state access.
Defaults to true.
passwordOptional
public readonly password: string;
- Type: string
(Optional) Password used to connect to the etcd cluster.
prefixOptional
public readonly prefix: string;
- Type: string
(Optional) An optional prefix to be added to keys when to storing state in etcd.
Defaults to "".
usernameOptional
public readonly username: string;
- Type: string
(Optional) Username used to connect to the etcd cluster.
DataTerraformRemoteStateGcsConfig
Initializer
import { DataTerraformRemoteStateGcsConfig } from 'cdktf'
const dataTerraformRemoteStateGcsConfig: DataTerraformRemoteStateGcsConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
bucket | string | (Required) The name of the GCS bucket. |
accessToken | 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 | string | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
encryptionKey | string | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
impersonateServiceAccount | string | (Optional) The service account to impersonate for accessing the State Bucket. |
impersonateServiceAccountDelegates | string[] | (Optional) The delegation chain for an impersonating a service account. |
prefix | string | (Optional) GCS prefix inside the bucket. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
bucketRequired
public readonly bucket: string;
- Type: string
(Required) The name of the GCS bucket.
This name must be globally unique.
accessTokenOptional
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.
credentialsOptional
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.
encryptionKeyOptional
public readonly encryptionKey: string;
- Type: string
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonateServiceAccountOptional
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.
impersonateServiceAccountDelegatesOptional
public readonly impersonateServiceAccountDelegates: string[];
- Type: string[]
(Optional) The delegation chain for an impersonating a service account.
prefixOptional
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.
DataTerraformRemoteStateHttpConfig
Initializer
import { DataTerraformRemoteStateHttpConfig } from 'cdktf'
const dataTerraformRemoteStateHttpConfig: DataTerraformRemoteStateHttpConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
address | string | (Required) The address of the REST endpoint. |
lockAddress | string | (Optional) The address of the lock REST endpoint. |
lockMethod | string | (Optional) The HTTP method to use when locking. |
password | string | (Optional) The password for HTTP basic authentication. |
retryMax | number | (Optional) The number of HTTP request retries. |
retryWaitMax | number | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
retryWaitMin | number | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
skipCertVerification | boolean | (Optional) Whether to skip TLS verification. |
unlockAddress | string | (Optional) The address of the unlock REST endpoint. |
unlockMethod | string | (Optional) The HTTP method to use when unlocking. |
updateMethod | string | (Optional) HTTP method to use when updating state. |
username | string | (Optional) The username for HTTP basic authentication. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
addressRequired
public readonly address: string;
- Type: string
(Required) The address of the REST endpoint.
lockAddressOptional
public readonly lockAddress: string;
- Type: string
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lockMethodOptional
public readonly lockMethod: string;
- Type: string
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
passwordOptional
public readonly password: string;
- Type: string
(Optional) The password for HTTP basic authentication.
retryMaxOptional
public readonly retryMax: number;
- Type: number
(Optional) The number of HTTP request retries.
Defaults to 2.
retryWaitMaxOptional
public readonly retryWaitMax: number;
- Type: number
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retryWaitMinOptional
public readonly retryWaitMin: number;
- Type: number
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skipCertVerificationOptional
public readonly skipCertVerification: boolean;
- Type: boolean
(Optional) Whether to skip TLS verification.
Defaults to false.
unlockAddressOptional
public readonly unlockAddress: string;
- Type: string
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlockMethodOptional
public readonly unlockMethod: string;
- Type: string
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
updateMethodOptional
public readonly updateMethod: string;
- Type: string
(Optional) HTTP method to use when updating state.
Defaults to POST.
usernameOptional
public readonly username: string;
- Type: string
(Optional) The username for HTTP basic authentication.
DataTerraformRemoteStateLocalConfig
Initializer
import { DataTerraformRemoteStateLocalConfig } from 'cdktf'
const dataTerraformRemoteStateLocalConfig: DataTerraformRemoteStateLocalConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
path | string | Path where the state file is stored. |
workspaceDir | string | (Optional) The path to non-default workspaces. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
pathOptional
public readonly path: string;
- Type: string
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspaceDirOptional
public readonly workspaceDir: string;
- Type: string
(Optional) The path to non-default workspaces.
DataTerraformRemoteStateMantaConfig
Initializer
import { DataTerraformRemoteStateMantaConfig } from 'cdktf'
const dataTerraformRemoteStateMantaConfig: DataTerraformRemoteStateMantaConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
account | string | No description. |
keyId | string | No description. |
path | string | No description. |
insecureSkipTlsVerify | boolean | No description. |
keyMaterial | string | No description. |
objectName | string | No description. |
url | string | No description. |
user | string | No description. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
accountRequired
public readonly account: string;
- Type: string
keyIdRequired
public readonly keyId: string;
- Type: string
pathRequired
public readonly path: string;
- Type: string
insecureSkipTlsVerifyOptional
public readonly insecureSkipTlsVerify: boolean;
- Type: boolean
keyMaterialOptional
public readonly keyMaterial: string;
- Type: string
objectNameOptional
public readonly objectName: string;
- Type: string
urlOptional
public readonly url: string;
- Type: string
userOptional
public readonly user: string;
- Type: string
DataTerraformRemoteStateOssConfig
Initializer
import { DataTerraformRemoteStateOssConfig } from 'cdktf'
const dataTerraformRemoteStateOssConfig: DataTerraformRemoteStateOssConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
bucket | string | No description. |
accessKey | string | No description. |
acl | string | No description. |
assumeRole | OssAssumeRole | No description. |
ecsRoleName | string | No description. |
encrypt | boolean | No description. |
endpoint | string | No description. |
key | string | No description. |
prefix | string | No description. |
profile | string | No description. |
region | string | No description. |
secretKey | string | No description. |
securityToken | string | No description. |
sharedCredentialsFile | string | No description. |
tablestoreEndpoint | string | No description. |
tablestoreTable | string | No description. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
bucketRequired
public readonly bucket: string;
- Type: string
accessKeyOptional
public readonly accessKey: string;
- Type: string
aclOptional
public readonly acl: string;
- Type: string
assumeRoleOptional
public readonly assumeRole: OssAssumeRole;
- Type: OssAssumeRole
ecsRoleNameOptional
public readonly ecsRoleName: string;
- Type: string
encryptOptional
public readonly encrypt: boolean;
- Type: boolean
endpointOptional
public readonly endpoint: string;
- Type: string
keyOptional
public readonly key: string;
- Type: string
prefixOptional
public readonly prefix: string;
- Type: string
profileOptional
public readonly profile: string;
- Type: string
regionOptional
public readonly region: string;
- Type: string
secretKeyOptional
public readonly secretKey: string;
- Type: string
securityTokenOptional
public readonly securityToken: string;
- Type: string
sharedCredentialsFileOptional
public readonly sharedCredentialsFile: string;
- Type: string
tablestoreEndpointOptional
public readonly tablestoreEndpoint: string;
- Type: string
tablestoreTableOptional
public readonly tablestoreTable: string;
- Type: string
DataTerraformRemoteStatePgConfig
Initializer
import { DataTerraformRemoteStatePgConfig } from 'cdktf'
const dataTerraformRemoteStatePgConfig: DataTerraformRemoteStatePgConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
connStr | string | No description. |
schemaName | string | No description. |
skipSchemaCreation | boolean | No description. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
connStrRequired
public readonly connStr: string;
- Type: string
schemaNameOptional
public readonly schemaName: string;
- Type: string
skipSchemaCreationOptional
public readonly skipSchemaCreation: boolean;
- Type: boolean
DataTerraformRemoteStateRemoteConfig
Initializer
import { DataTerraformRemoteStateRemoteConfig } from 'cdktf'
const dataTerraformRemoteStateRemoteConfig: DataTerraformRemoteStateRemoteConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
organization | string | No description. |
workspaces | IRemoteWorkspace | No description. |
hostname | string | No description. |
token | string | No description. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
organizationRequired
public readonly organization: string;
- Type: string
workspacesRequired
public readonly workspaces: IRemoteWorkspace;
- Type: IRemoteWorkspace
hostnameOptional
public readonly hostname: string;
- Type: string
tokenOptional
public readonly token: string;
- Type: string
DataTerraformRemoteStateS3Config
Initializer
import { DataTerraformRemoteStateS3Config } from 'cdktf'
const dataTerraformRemoteStateS3Config: DataTerraformRemoteStateS3Config = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
bucket | string | Name of the S3 Bucket. |
key | string | Path to the state file inside the S3 Bucket. |
accessKey | string | (Optional) AWS access key. |
acl | string | (Optional) Canned ACL to be applied to the state file. |
assumeRolePolicy | string | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
assumeRolePolicyArns | string[] | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
assumeRoleTags | {[ key: string ]: string} | (Optional) Map of assume role session tags. |
assumeRoleTransitiveTagKeys | string[] | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
dynamodbEndpoint | string | (Optional) Custom endpoint for the AWS DynamoDB API. |
dynamodbTable | string | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
encrypt | boolean | (Optional) Enable server side encryption of the state file. |
endpoint | string | (Optional) Custom endpoint for the AWS S3 API. |
externalId | string | (Optional) External identifier to use when assuming the role. |
forcePathStyle | boolean | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
iamEndpoint | string | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
kmsKeyId | string | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
maxRetries | number | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
profile | string | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
region | string | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
roleArn | string | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
secretKey | string | (Optional) AWS secret access key. |
sessionName | string | (Optional) Session name to use when assuming the role. |
sharedCredentialsFile | string | (Optional) Path to the AWS shared credentials file. |
skipCredentialsValidation | boolean | (Optional) Skip credentials validation via the STS API. |
skipMetadataApiCheck | boolean | (Optional) Skip usage of EC2 Metadata API. |
skipRegionValidation | boolean | (Optional) Skip validation of provided region name. |
sseCustomerKey | string | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
stsEndpoint | string | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
token | string | (Optional) Multi-Factor Authentication (MFA) token. |
workspaceKeyPrefix | string | (Optional) Prefix applied to the state path inside the bucket. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
bucketRequired
public readonly bucket: string;
- Type: string
Name of the S3 Bucket.
keyRequired
public readonly key: string;
- Type: string
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
accessKeyOptional
public readonly accessKey: string;
- Type: string
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
aclOptional
public readonly acl: string;
- Type: string
(Optional) Canned ACL to be applied to the state file.
assumeRolePolicyOptional
public readonly assumeRolePolicy: string;
- Type: string
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assumeRolePolicyArnsOptional
public readonly assumeRolePolicyArns: string[];
- Type: string[]
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
assumeRoleTagsOptional
public readonly assumeRoleTags: {[ key: string ]: string};
- Type: {[ key: string ]: string}
(Optional) Map of assume role session tags.
assumeRoleTransitiveTagKeysOptional
public readonly assumeRoleTransitiveTagKeys: string[];
- Type: string[]
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
dynamodbEndpointOptional
public readonly dynamodbEndpoint: string;
- Type: string
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
dynamodbTableOptional
public readonly dynamodbTable: string;
- Type: string
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
encryptOptional
public readonly encrypt: boolean;
- Type: boolean
(Optional) Enable server side encryption of the state file.
endpointOptional
public readonly endpoint: string;
- Type: string
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
externalIdOptional
public readonly externalId: string;
- Type: string
(Optional) External identifier to use when assuming the role.
forcePathStyleOptional
public readonly forcePathStyle: boolean;
- Type: boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
iamEndpointOptional
public readonly iamEndpoint: string;
- Type: string
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
kmsKeyIdOptional
public readonly kmsKeyId: string;
- Type: string
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
maxRetriesOptional
public readonly maxRetries: number;
- Type: number
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
profileOptional
public readonly profile: string;
- Type: string
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
regionOptional
public readonly region: string;
- Type: string
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
roleArnOptional
public readonly roleArn: string;
- Type: string
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secretKeyOptional
public readonly secretKey: string;
- Type: string
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
sessionNameOptional
public readonly sessionName: string;
- Type: string
(Optional) Session name to use when assuming the role.
sharedCredentialsFileOptional
public readonly sharedCredentialsFile: string;
- Type: string
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
skipCredentialsValidationOptional
public readonly skipCredentialsValidation: boolean;
- Type: boolean
(Optional) Skip credentials validation via the STS API.
skipMetadataApiCheckOptional
public readonly skipMetadataApiCheck: boolean;
- Type: boolean
(Optional) Skip usage of EC2 Metadata API.
skipRegionValidationOptional
public readonly skipRegionValidation: boolean;
- Type: boolean
(Optional) Skip validation of provided region name.
sseCustomerKeyOptional
public readonly sseCustomerKey: string;
- Type: string
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
stsEndpointOptional
public readonly stsEndpoint: string;
- Type: string
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
tokenOptional
public readonly token: string;
- Type: string
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
workspaceKeyPrefixOptional
public readonly workspaceKeyPrefix: string;
- Type: string
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
DataTerraformRemoteStateSwiftConfig
Initializer
import { DataTerraformRemoteStateSwiftConfig } from 'cdktf'
const dataTerraformRemoteStateSwiftConfig: DataTerraformRemoteStateSwiftConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
defaults | {[ key: string ]: any} | No description. |
workspace | string | No description. |
container | string | No description. |
applicationCredentialId | string | No description. |
applicationCredentialName | string | No description. |
applicationCredentialSecret | string | No description. |
archiveContainer | string | No description. |
authUrl | string | No description. |
cacertFile | string | No description. |
cert | string | No description. |
cloud | string | No description. |
defaultDomain | string | No description. |
domainId | string | No description. |
domainName | string | No description. |
expireAfter | string | No description. |
insecure | boolean | No description. |
key | string | No description. |
password | string | No description. |
projectDomainId | string | No description. |
projectDomainName | string | No description. |
regionName | string | No description. |
stateName | string | No description. |
tenantId | string | No description. |
tenantName | string | No description. |
token | string | No description. |
userDomainId | string | No description. |
userDomainName | string | No description. |
userId | string | No description. |
userName | string | No description. |
defaultsOptional
public readonly defaults: {[ key: string ]: any};
- Type: {[ key: string ]: any}
workspaceOptional
public readonly workspace: string;
- Type: string
containerRequired
public readonly container: string;
- Type: string
applicationCredentialIdOptional
public readonly applicationCredentialId: string;
- Type: string
applicationCredentialNameOptional
public readonly applicationCredentialName: string;
- Type: string
applicationCredentialSecretOptional
public readonly applicationCredentialSecret: string;
- Type: string
archiveContainerOptional
public readonly archiveContainer: string;
- Type: string
authUrlOptional
public readonly authUrl: string;
- Type: string
cacertFileOptional
public readonly cacertFile: string;
- Type: string
certOptional
public readonly cert: string;
- Type: string
cloudOptional
public readonly cloud: string;
- Type: string
defaultDomainOptional
public readonly defaultDomain: string;
- Type: string
domainIdOptional
public readonly domainId: string;
- Type: string
domainNameOptional
public readonly domainName: string;
- Type: string
expireAfterOptional
public readonly expireAfter: string;
- Type: string
insecureOptional
public readonly insecure: boolean;
- Type: boolean
keyOptional
public readonly key: string;
- Type: string
passwordOptional
public readonly password: string;
- Type: string
projectDomainIdOptional
public readonly projectDomainId: string;
- Type: string
projectDomainNameOptional
public readonly projectDomainName: string;
- Type: string
regionNameOptional
public readonly regionName: string;
- Type: string
stateNameOptional
public readonly stateName: string;
- Type: string
tenantIdOptional
public readonly tenantId: string;
- Type: string
tenantNameOptional
public readonly tenantName: string;
- Type: string
tokenOptional
public readonly token: string;
- Type: string
userDomainIdOptional
public readonly userDomainId: string;
- Type: string
userDomainNameOptional
public readonly userDomainName: string;
- Type: string
userIdOptional
public readonly userId: string;
- Type: string
userNameOptional
public readonly userName: string;
- Type: string
EncodingOptions
Properties to string encodings.
Initializer
import { EncodingOptions } from 'cdktf'
const encodingOptions: EncodingOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
displayHint | string | A hint for the Token's purpose when stringifying it. |
displayHintOptional
public readonly displayHint: string;
- Type: string
- Default: no display hint
A hint for the Token's purpose when stringifying it.
EtcdBackendProps
Stores the state in etcd 2.x at a given path.
This backend does not support state locking.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/etcd
Initializer
import { EtcdBackendProps } from 'cdktf'
const etcdBackendProps: EtcdBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
endpoints | string | (Required) A space-separated list of the etcd endpoints. |
path | string | (Required) The path where to store the state. |
password | string | (Optional) The password. |
username | string | (Optional) The username. |
endpointsRequired
public readonly endpoints: string;
- Type: string
(Required) A space-separated list of the etcd endpoints.
pathRequired
public readonly path: string;
- Type: string
(Required) The path where to store the state.
passwordOptional
public readonly password: string;
- Type: string
(Optional) The password.
usernameOptional
public readonly username: string;
- Type: string
(Optional) The username.
EtcdV3BackendProps
Stores the state in the etcd KV store with a given prefix.
This backend supports state locking.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/etcdv3
Initializer
import { EtcdV3BackendProps } from 'cdktf'
const etcdV3BackendProps: EtcdV3BackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
endpoints | string[] | (Required) The list of 'etcd' endpoints which to connect to. |
cacertPath | string | (Optional) The path to a PEM-encoded CA bundle with which to verify certificates of TLS-enabled etcd servers. |
certPath | string | (Optional) The path to a PEM-encoded certificate to provide to etcd for secure client identification. |
keyPath | string | (Optional) The path to a PEM-encoded key to provide to etcd for secure client identification. |
lock | boolean | (Optional) Whether to lock state access. |
password | string | (Optional) Password used to connect to the etcd cluster. |
prefix | string | (Optional) An optional prefix to be added to keys when to storing state in etcd. |
username | string | (Optional) Username used to connect to the etcd cluster. |
endpointsRequired
public readonly endpoints: string[];
- Type: string[]
(Required) The list of 'etcd' endpoints which to connect to.
cacertPathOptional
public readonly cacertPath: string;
- Type: string
(Optional) The path to a PEM-encoded CA bundle with which to verify certificates of TLS-enabled etcd servers.
certPathOptional
public readonly certPath: string;
- Type: string
(Optional) The path to a PEM-encoded certificate to provide to etcd for secure client identification.
keyPathOptional
public readonly keyPath: string;
- Type: string
(Optional) The path to a PEM-encoded key to provide to etcd for secure client identification.
lockOptional
public readonly lock: boolean;
- Type: boolean
(Optional) Whether to lock state access.
Defaults to true.
passwordOptional
public readonly password: string;
- Type: string
(Optional) Password used to connect to the etcd cluster.
prefixOptional
public readonly prefix: string;
- Type: string
(Optional) An optional prefix to be added to keys when to storing state in etcd.
Defaults to "".
usernameOptional
public readonly username: string;
- Type: string
(Optional) Username used to connect to the etcd cluster.
FileProvisioner
The file provisioner copies files or directories from the machine running Terraform to the newly created resource.
The file provisioner supports both ssh and winrm type connections.
See {@link https://www.terraform.io/language/resources/provisioners/file file}
Initializer
import { FileProvisioner } from 'cdktf'
const fileProvisioner: FileProvisioner = { ... }
Properties
| Name | Type | Description |
|---|---|---|
destination | string | The source file or directory. |
type | string | No description. |
connection | SSHProvisionerConnection | WinrmProvisionerConnection | Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. |
content | string | The destination path to write to on the remote system. |
source | string | The direct content to copy on the destination. |
destinationRequired
public readonly destination: string;
- Type: string
The source file or directory.
Specify it either relative to the current working directory or as an absolute path. This argument cannot be combined with content.
typeRequired
public readonly type: string;
- Type: string
connectionOptional
public readonly connection: SSHProvisionerConnection | WinrmProvisionerConnection;
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
contentOptional
public readonly content: string;
- Type: string
The destination path to write to on the remote system.
See Destination Paths below for more information.
sourceOptional
public readonly source: string;
- Type: string
The direct content to copy on the destination.
If destination is a file, the content will be written on that file. In case of a directory, a file named tf-file-content is created inside that directory. We recommend using a file as the destination when using content. This argument cannot be combined with source.
GcsBackendProps
Stores the state as an object in a configurable prefix in a pre-existing bucket on Google Cloud Storage (GCS).
The bucket must exist prior to configuring the backend.
This backend supports state locking.
Warning! It is highly recommended that you enable Object Versioning on the GCS bucket to allow for state recovery in the case of accidental deletions and human error.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/gcs
Initializer
import { GcsBackendProps } from 'cdktf'
const gcsBackendProps: GcsBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
bucket | string | (Required) The name of the GCS bucket. |
accessToken | 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 | string | (Optional) Local path to Google Cloud Platform account credentials in JSON format. |
encryptionKey | string | (Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state. |
impersonateServiceAccount | string | (Optional) The service account to impersonate for accessing the State Bucket. |
impersonateServiceAccountDelegates | string[] | (Optional) The delegation chain for an impersonating a service account. |
prefix | string | (Optional) GCS prefix inside the bucket. |
bucketRequired
public readonly bucket: string;
- Type: string
(Required) The name of the GCS bucket.
This name must be globally unique.
accessTokenOptional
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.
credentialsOptional
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.
encryptionKeyOptional
public readonly encryptionKey: string;
- Type: string
(Optional) A 32 byte base64 encoded 'customer supplied encryption key' used to encrypt all state.
impersonateServiceAccountOptional
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.
impersonateServiceAccountDelegatesOptional
public readonly impersonateServiceAccountDelegates: string[];
- Type: string[]
(Optional) The delegation chain for an impersonating a service account.
prefixOptional
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.
HttpBackendProps
Stores the state using a simple REST client.
State will be fetched via GET, updated via POST, and purged with DELETE. The method used for updating is configurable.
This backend optionally supports state locking. When locking support is enabled it will use LOCK and UNLOCK requests providing the lock info in the body. The endpoint should return a 423: Locked or 409: Conflict with the holding lock info when it's already taken, 200: OK for success. Any other status will be considered an error. The ID of the holding lock info will be added as a query parameter to state updates requests.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/http
Initializer
import { HttpBackendProps } from 'cdktf'
const httpBackendProps: HttpBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
address | string | (Required) The address of the REST endpoint. |
lockAddress | string | (Optional) The address of the lock REST endpoint. |
lockMethod | string | (Optional) The HTTP method to use when locking. |
password | string | (Optional) The password for HTTP basic authentication. |
retryMax | number | (Optional) The number of HTTP request retries. |
retryWaitMax | number | (Optional) The maximum time in seconds to wait between HTTP request attempts. |
retryWaitMin | number | (Optional) The minimum time in seconds to wait between HTTP request attempts. |
skipCertVerification | boolean | (Optional) Whether to skip TLS verification. |
unlockAddress | string | (Optional) The address of the unlock REST endpoint. |
unlockMethod | string | (Optional) The HTTP method to use when unlocking. |
updateMethod | string | (Optional) HTTP method to use when updating state. |
username | string | (Optional) The username for HTTP basic authentication. |
addressRequired
public readonly address: string;
- Type: string
(Required) The address of the REST endpoint.
lockAddressOptional
public readonly lockAddress: string;
- Type: string
(Optional) The address of the lock REST endpoint.
Defaults to disabled.
lockMethodOptional
public readonly lockMethod: string;
- Type: string
(Optional) The HTTP method to use when locking.
Defaults to LOCK.
passwordOptional
public readonly password: string;
- Type: string
(Optional) The password for HTTP basic authentication.
retryMaxOptional
public readonly retryMax: number;
- Type: number
(Optional) The number of HTTP request retries.
Defaults to 2.
retryWaitMaxOptional
public readonly retryWaitMax: number;
- Type: number
(Optional) The maximum time in seconds to wait between HTTP request attempts.
Defaults to 30.
retryWaitMinOptional
public readonly retryWaitMin: number;
- Type: number
(Optional) The minimum time in seconds to wait between HTTP request attempts.
Defaults to 1.
skipCertVerificationOptional
public readonly skipCertVerification: boolean;
- Type: boolean
(Optional) Whether to skip TLS verification.
Defaults to false.
unlockAddressOptional
public readonly unlockAddress: string;
- Type: string
(Optional) The address of the unlock REST endpoint.
Defaults to disabled.
unlockMethodOptional
public readonly unlockMethod: string;
- Type: string
(Optional) The HTTP method to use when unlocking.
Defaults to UNLOCK.
updateMethodOptional
public readonly updateMethod: string;
- Type: string
(Optional) HTTP method to use when updating state.
Defaults to POST.
usernameOptional
public readonly username: string;
- Type: string
(Optional) The username for HTTP basic authentication.
LazyAnyValueOptions
Options for creating lazy untyped tokens.
Initializer
import { LazyAnyValueOptions } from 'cdktf'
const lazyAnyValueOptions: LazyAnyValueOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
displayHint | string | Use the given name as a display hint. |
omitEmptyArray | boolean | If the produced value is an array and it is empty, return 'undefined' instead. |
displayHintOptional
public readonly displayHint: string;
- Type: string
- Default: No hint
Use the given name as a display hint.
omitEmptyArrayOptional
public readonly omitEmptyArray: boolean;
- Type: boolean
- Default: false
If the produced value is an array and it is empty, return 'undefined' instead.
LazyListValueOptions
Options for creating a lazy list token.
Initializer
import { LazyListValueOptions } from 'cdktf'
const lazyListValueOptions: LazyListValueOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
displayHint | string | Use the given name as a display hint. |
omitEmpty | boolean | If the produced list is empty, return 'undefined' instead. |
displayHintOptional
public readonly displayHint: string;
- Type: string
- Default: No hint
Use the given name as a display hint.
omitEmptyOptional
public readonly omitEmpty: boolean;
- Type: boolean
- Default: false
If the produced list is empty, return 'undefined' instead.
LazyStringValueOptions
Options for creating a lazy string token.
Initializer
import { LazyStringValueOptions } from 'cdktf'
const lazyStringValueOptions: LazyStringValueOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
displayHint | string | Use the given name as a display hint. |
displayHintOptional
public readonly displayHint: string;
- Type: string
- Default: No hint
Use the given name as a display hint.
LocalBackendProps
The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/local
Initializer
import { LocalBackendProps } from 'cdktf'
const localBackendProps: LocalBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
path | string | Path where the state file is stored. |
workspaceDir | string | (Optional) The path to non-default workspaces. |
pathOptional
public readonly path: string;
- Type: string
- Default: defaults to terraform.${stackId}.tfstate
Path where the state file is stored.
workspaceDirOptional
public readonly workspaceDir: string;
- Type: string
(Optional) The path to non-default workspaces.
LocalExecProvisioner
The local-exec provisioner invokes a local executable after a resource is created.
This invokes a process on the machine running Terraform, not on the resource.
See {@link https://www.terraform.io/language/resources/provisioners/local-exec local-exec}
Initializer
import { LocalExecProvisioner } from 'cdktf'
const localExecProvisioner: LocalExecProvisioner = { ... }
Properties
| Name | Type | Description |
|---|---|---|
command | string | This is the command to execute. |
type | string | No description. |
environment | {[ key: string ]: string} | A record of key value pairs representing the environment of the executed command. |
interpreter | string[] | If provided, this is a list of interpreter arguments used to execute the command. |
when | string | If provided, specifies when Terraform will execute the command. |
workingDir | string | If provided, specifies the working directory where command will be executed. |
commandRequired
public readonly command: string;
- Type: string
This is the command to execute.
It can be provided as a relative path to the current working directory or as an absolute path. It is evaluated in a shell, and can use environment variables or Terraform variables.
typeRequired
public readonly type: string;
- Type: string
environmentOptional
public readonly environment: {[ key: string ]: string};
- Type: {[ key: string ]: string}
A record of key value pairs representing the environment of the executed command.
It inherits the current process environment.
interpreterOptional
public readonly interpreter: string[];
- Type: string[]
If provided, this is a list of interpreter arguments used to execute the command.
The first argument is the interpreter itself. It can be provided as a relative path to the current working directory or as an absolute path The remaining arguments are appended prior to the command. This allows building command lines of the form "/bin/bash", "-c", "echo foo". If interpreter is unspecified, sensible defaults will be chosen based on the system OS.
whenOptional
public readonly when: string;
- Type: string
If provided, specifies when Terraform will execute the command.
For example, when = destroy specifies that the provisioner will run when the associated resource is destroyed
workingDirOptional
public readonly workingDir: string;
- Type: string
If provided, specifies the working directory where command will be executed.
It can be provided as a relative path to the current working directory or as an absolute path. The directory must exist.
MantaBackendProps
Initializer
import { MantaBackendProps } from 'cdktf'
const mantaBackendProps: MantaBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
account | string | No description. |
keyId | string | No description. |
path | string | No description. |
insecureSkipTlsVerify | boolean | No description. |
keyMaterial | string | No description. |
objectName | string | No description. |
url | string | No description. |
user | string | No description. |
accountRequired
public readonly account: string;
- Type: string
keyIdRequired
public readonly keyId: string;
- Type: string
pathRequired
public readonly path: string;
- Type: string
insecureSkipTlsVerifyOptional
public readonly insecureSkipTlsVerify: boolean;
- Type: boolean
keyMaterialOptional
public readonly keyMaterial: string;
- Type: string
objectNameOptional
public readonly objectName: string;
- Type: string
urlOptional
public readonly url: string;
- Type: string
userOptional
public readonly user: string;
- Type: string
OssAssumeRole
Initializer
import { OssAssumeRole } from 'cdktf'
const ossAssumeRole: OssAssumeRole = { ... }
Properties
| Name | Type | Description |
|---|---|---|
roleArn | string | No description. |
policy | string | No description. |
sessionExpiration | number | No description. |
sessionName | string | No description. |
roleArnRequired
public readonly roleArn: string;
- Type: string
policyOptional
public readonly policy: string;
- Type: string
sessionExpirationOptional
public readonly sessionExpiration: number;
- Type: number
sessionNameOptional
public readonly sessionName: string;
- Type: string
OssBackendProps
Initializer
import { OssBackendProps } from 'cdktf'
const ossBackendProps: OssBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
bucket | string | No description. |
accessKey | string | No description. |
acl | string | No description. |
assumeRole | OssAssumeRole | No description. |
ecsRoleName | string | No description. |
encrypt | boolean | No description. |
endpoint | string | No description. |
key | string | No description. |
prefix | string | No description. |
profile | string | No description. |
region | string | No description. |
secretKey | string | No description. |
securityToken | string | No description. |
sharedCredentialsFile | string | No description. |
tablestoreEndpoint | string | No description. |
tablestoreTable | string | No description. |
bucketRequired
public readonly bucket: string;
- Type: string
accessKeyOptional
public readonly accessKey: string;
- Type: string
aclOptional
public readonly acl: string;
- Type: string
assumeRoleOptional
public readonly assumeRole: OssAssumeRole;
- Type: OssAssumeRole
ecsRoleNameOptional
public readonly ecsRoleName: string;
- Type: string
encryptOptional
public readonly encrypt: boolean;
- Type: boolean
endpointOptional
public readonly endpoint: string;
- Type: string
keyOptional
public readonly key: string;
- Type: string
prefixOptional
public readonly prefix: string;
- Type: string
profileOptional
public readonly profile: string;
- Type: string
regionOptional
public readonly region: string;
- Type: string
secretKeyOptional
public readonly secretKey: string;
- Type: string
securityTokenOptional
public readonly securityToken: string;
- Type: string
sharedCredentialsFileOptional
public readonly sharedCredentialsFile: string;
- Type: string
tablestoreEndpointOptional
public readonly tablestoreEndpoint: string;
- Type: string
tablestoreTableOptional
public readonly tablestoreTable: string;
- Type: string
PgBackendProps
Initializer
import { PgBackendProps } from 'cdktf'
const pgBackendProps: PgBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
connStr | string | No description. |
schemaName | string | No description. |
skipSchemaCreation | boolean | No description. |
connStrRequired
public readonly connStr: string;
- Type: string
schemaNameOptional
public readonly schemaName: string;
- Type: string
skipSchemaCreationOptional
public readonly skipSchemaCreation: boolean;
- Type: boolean
RemoteBackendProps
Initializer
import { RemoteBackendProps } from 'cdktf'
const remoteBackendProps: RemoteBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
organization | string | No description. |
workspaces | IRemoteWorkspace | No description. |
hostname | string | No description. |
token | string | No description. |
organizationRequired
public readonly organization: string;
- Type: string
workspacesRequired
public readonly workspaces: IRemoteWorkspace;
- Type: IRemoteWorkspace
hostnameOptional
public readonly hostname: string;
- Type: string
tokenOptional
public readonly token: string;
- Type: string
RemoteExecProvisioner
The remote-exec provisioner invokes a script on a remote resource after it is created.
This can be used to run a configuration management tool, bootstrap into a cluster, etc The remote-exec provisioner requires a connection and supports both ssh and winrm.
See {@link https://www.terraform.io/language/resources/provisioners/remote-exec remote-exec}
Initializer
import { RemoteExecProvisioner } from 'cdktf'
const remoteExecProvisioner: RemoteExecProvisioner = { ... }
Properties
| Name | Type | Description |
|---|---|---|
type | string | No description. |
connection | SSHProvisionerConnection | WinrmProvisionerConnection | Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect. |
inline | string[] | This is a list of command strings. |
script | string | This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed. |
scripts | string[] | This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed. |
typeRequired
public readonly type: string;
- Type: string
connectionOptional
public readonly connection: SSHProvisionerConnection | WinrmProvisionerConnection;
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
A connection must be provided here or in the parent resource.
inlineOptional
public readonly inline: string[];
- Type: string[]
This is a list of command strings.
They are executed in the order they are provided. This cannot be provided with script or scripts.
scriptOptional
public readonly script: string;
- Type: string
This is a path (relative or absolute) to a local script that will be copied to the remote resource and then executed.
This cannot be provided with inline or scripts.
scriptsOptional
public readonly scripts: string[];
- Type: string[]
This is a list of paths (relative or absolute) to local scripts that will be copied to the remote resource and then executed.
They are executed in the order they are provided. This cannot be provided with inline or script.
ResolveOptions
Options to the resolve() operation.
NOT the same as the ResolveContext; ResolveContext is exposed to Token implementors and resolution hooks, whereas this struct is just to bundle a number of things that would otherwise be arguments to resolve() in a readable way.
Initializer
import { ResolveOptions } from 'cdktf'
const resolveOptions: ResolveOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
resolver | ITokenResolver | The resolver to apply to any resolvable tokens found. |
scope | constructs.IConstruct | The scope from which resolution is performed. |
preparing | boolean | Whether the resolution is being executed during the prepare phase or not. |
resolverRequired
public readonly resolver: ITokenResolver;
- Type: ITokenResolver
The resolver to apply to any resolvable tokens found.
scopeRequired
public readonly scope: IConstruct;
- Type: constructs.IConstruct
The scope from which resolution is performed.
preparingOptional
public readonly preparing: boolean;
- Type: boolean
- Default: false
Whether the resolution is being executed during the prepare phase or not.
S3BackendProps
Stores the state as a given key in a given bucket on Amazon S3.
This backend also supports state locking and consistency checking via Dynamo DB, which can be enabled by setting the dynamodb_table field to an existing DynamoDB table name. A single DynamoDB table can be used to lock multiple remote state files. Terraform generates key names that include the values of the bucket and key variables.
Warning! It is highly recommended that you enable Bucket Versioning on the S3 bucket to allow for state recovery in the case of accidental deletions and human error.
Read more about this backend in the Terraform docs: https://www.terraform.io/language/settings/backends/s3
Initializer
import { S3BackendProps } from 'cdktf'
const s3BackendProps: S3BackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
bucket | string | Name of the S3 Bucket. |
key | string | Path to the state file inside the S3 Bucket. |
accessKey | string | (Optional) AWS access key. |
acl | string | (Optional) Canned ACL to be applied to the state file. |
assumeRolePolicy | string | (Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed. |
assumeRolePolicyArns | string[] | (Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed. |
assumeRoleTags | {[ key: string ]: string} | (Optional) Map of assume role session tags. |
assumeRoleTransitiveTagKeys | string[] | (Optional) Set of assume role session tag keys to pass to any subsequent sessions. |
dynamodbEndpoint | string | (Optional) Custom endpoint for the AWS DynamoDB API. |
dynamodbTable | string | (Optional) Name of DynamoDB Table to use for state locking and consistency. |
encrypt | boolean | (Optional) Enable server side encryption of the state file. |
endpoint | string | (Optional) Custom endpoint for the AWS S3 API. |
externalId | string | (Optional) External identifier to use when assuming the role. |
forcePathStyle | boolean | (Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >). |
iamEndpoint | string | (Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API. |
kmsKeyId | string | (Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state. |
maxRetries | number | (Optional) The maximum number of times an AWS API request is retried on retryable failure. |
profile | string | (Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable. |
region | string | AWS Region of the S3 Bucket and DynamoDB Table (if used). |
roleArn | string | (Optional) Amazon Resource Name (ARN) of the IAM Role to assume. |
secretKey | string | (Optional) AWS secret access key. |
sessionName | string | (Optional) Session name to use when assuming the role. |
sharedCredentialsFile | string | (Optional) Path to the AWS shared credentials file. |
skipCredentialsValidation | boolean | (Optional) Skip credentials validation via the STS API. |
skipMetadataApiCheck | boolean | (Optional) Skip usage of EC2 Metadata API. |
skipRegionValidation | boolean | (Optional) Skip validation of provided region name. |
sseCustomerKey | string | (Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C). |
stsEndpoint | string | (Optional) Custom endpoint for the AWS Security Token Service (STS) API. |
token | string | (Optional) Multi-Factor Authentication (MFA) token. |
workspaceKeyPrefix | string | (Optional) Prefix applied to the state path inside the bucket. |
bucketRequired
public readonly bucket: string;
- Type: string
Name of the S3 Bucket.
keyRequired
public readonly key: string;
- Type: string
Path to the state file inside the S3 Bucket.
When using a non-default workspace, the state path will be /workspace_key_prefix/workspace_name/key
accessKeyOptional
public readonly accessKey: string;
- Type: string
(Optional) AWS access key.
If configured, must also configure secret_key. This can also be sourced from the AWS_ACCESS_KEY_ID environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config).
aclOptional
public readonly acl: string;
- Type: string
(Optional) Canned ACL to be applied to the state file.
assumeRolePolicyOptional
public readonly assumeRolePolicy: string;
- Type: string
(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
assumeRolePolicyArnsOptional
public readonly assumeRolePolicyArns: string[];
- Type: string[]
(Optional) Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.
assumeRoleTagsOptional
public readonly assumeRoleTags: {[ key: string ]: string};
- Type: {[ key: string ]: string}
(Optional) Map of assume role session tags.
assumeRoleTransitiveTagKeysOptional
public readonly assumeRoleTransitiveTagKeys: string[];
- Type: string[]
(Optional) Set of assume role session tag keys to pass to any subsequent sessions.
dynamodbEndpointOptional
public readonly dynamodbEndpoint: string;
- Type: string
(Optional) Custom endpoint for the AWS DynamoDB API.
This can also be sourced from the AWS_DYNAMODB_ENDPOINT environment variable.
dynamodbTableOptional
public readonly dynamodbTable: string;
- Type: string
(Optional) Name of DynamoDB Table to use for state locking and consistency.
The table must have a partition key named LockID with type of String. If not configured, state locking will be disabled.
encryptOptional
public readonly encrypt: boolean;
- Type: boolean
(Optional) Enable server side encryption of the state file.
endpointOptional
public readonly endpoint: string;
- Type: string
(Optional) Custom endpoint for the AWS S3 API.
This can also be sourced from the AWS_S3_ENDPOINT environment variable.
externalIdOptional
public readonly externalId: string;
- Type: string
(Optional) External identifier to use when assuming the role.
forcePathStyleOptional
public readonly forcePathStyle: boolean;
- Type: boolean
(Optional) Enable path-style S3 URLs (https://< HOST >/< BUCKET > instead of https://< BUCKET >.< HOST >).
iamEndpointOptional
public readonly iamEndpoint: string;
- Type: string
(Optional) Custom endpoint for the AWS Identity and Access Management (IAM) API.
This can also be sourced from the AWS_IAM_ENDPOINT environment variable.
kmsKeyIdOptional
public readonly kmsKeyId: string;
- Type: string
(Optional) Amazon Resource Name (ARN) of a Key Management Service (KMS) Key to use for encrypting the state.
Note that if this value is specified, Terraform will need kms:Encrypt, kms:Decrypt and kms:GenerateDataKey permissions on this KMS key.
maxRetriesOptional
public readonly maxRetries: number;
- Type: number
(Optional) The maximum number of times an AWS API request is retried on retryable failure.
Defaults to 5.
profileOptional
public readonly profile: string;
- Type: string
(Optional) Name of AWS profile in AWS shared credentials file (e.g. ~/.aws/credentials) or AWS shared configuration file (e.g. ~/.aws/config) to use for credentials and/or configuration. This can also be sourced from the AWS_PROFILE environment variable.
regionOptional
public readonly region: string;
- Type: string
AWS Region of the S3 Bucket and DynamoDB Table (if used).
This can also be sourced from the AWS_DEFAULT_REGION and AWS_REGION environment variables.
roleArnOptional
public readonly roleArn: string;
- Type: string
(Optional) Amazon Resource Name (ARN) of the IAM Role to assume.
secretKeyOptional
public readonly secretKey: string;
- Type: string
(Optional) AWS secret access key.
If configured, must also configure access_key. This can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable, AWS shared credentials file (e.g. ~/.aws/credentials), or AWS shared configuration file (e.g. ~/.aws/config)
sessionNameOptional
public readonly sessionName: string;
- Type: string
(Optional) Session name to use when assuming the role.
sharedCredentialsFileOptional
public readonly sharedCredentialsFile: string;
- Type: string
(Optional) Path to the AWS shared credentials file.
Defaults to ~/.aws/credentials.
skipCredentialsValidationOptional
public readonly skipCredentialsValidation: boolean;
- Type: boolean
(Optional) Skip credentials validation via the STS API.
skipMetadataApiCheckOptional
public readonly skipMetadataApiCheck: boolean;
- Type: boolean
(Optional) Skip usage of EC2 Metadata API.
skipRegionValidationOptional
public readonly skipRegionValidation: boolean;
- Type: boolean
(Optional) Skip validation of provided region name.
sseCustomerKeyOptional
public readonly sseCustomerKey: string;
- Type: string
(Optional) The key to use for encrypting state with Server-Side Encryption with Customer-Provided Keys (SSE-C).
This is the base64-encoded value of the key, which must decode to 256 bits. This can also be sourced from the AWS_SSE_CUSTOMER_KEY environment variable, which is recommended due to the sensitivity of the value. Setting it inside a terraform file will cause it to be persisted to disk in terraform.tfstate.
stsEndpointOptional
public readonly stsEndpoint: string;
- Type: string
(Optional) Custom endpoint for the AWS Security Token Service (STS) API.
This can also be sourced from the AWS_STS_ENDPOINT environment variable.
tokenOptional
public readonly token: string;
- Type: string
(Optional) Multi-Factor Authentication (MFA) token.
This can also be sourced from the AWS_SESSION_TOKEN environment variable.
workspaceKeyPrefixOptional
public readonly workspaceKeyPrefix: string;
- Type: string
(Optional) Prefix applied to the state path inside the bucket.
This is only relevant when using a non-default workspace. Defaults to env:
SSHProvisionerConnection
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
See {@link https://www.terraform.io/language/resources/provisioners/connection connection}
Initializer
import { SSHProvisionerConnection } from 'cdktf'
const sSHProvisionerConnection: SSHProvisionerConnection = { ... }
Properties
| Name | Type | Description |
|---|---|---|
host | string | The address of the resource to connect to. |
type | string | The connection type. |
agent | string | Set to false to disable using ssh-agent to authenticate. |
agentIdentity | string | The preferred identity from the ssh agent for authentication. |
bastionCertificate | string | The contents of a signed CA Certificate. |
bastionHost | string | Setting this enables the bastion Host connection. |
bastionHostKey | string | The public key from the remote host or the signing CA, used to verify the host connection. |
bastionPassword | string | The password to use for the bastion host. |
bastionPort | number | The port to use connect to the bastion host. |
bastionPrivateKey | string | The contents of an SSH key file to use for the bastion host. |
bastionUser | string | The user for the connection to the bastion host. |
certificate | string | The contents of a signed CA Certificate. |
hostKey | string | The public key from the remote host or the signing CA, used to verify the connection. |
password | string | The password to use for the connection. |
port | number | The port to connect to. |
privateKey | string | The contents of an SSH key to use for the connection. |
proxyHost | string | Setting this enables the SSH over HTTP connection. |
proxyPort | number | The port to use connect to the proxy host. |
proxyScheme | string | The ssh connection also supports the following fields to facilitate connections by SSH over HTTP proxy. |
proxyUserName | string | The username to use connect to the private proxy host. |
proxyUserPassword | string | The password to use connect to the private proxy host. |
scriptPath | string | The path used to copy scripts meant for remote execution. |
targetPlatform | string | The target platform to connect to. |
timeout | string | The timeout to wait for the connection to become available. |
user | string | The user to use for the connection. |
hostRequired
public readonly host: string;
- Type: string
The address of the resource to connect to.
typeRequired
public readonly type: string;
- Type: string
The connection type.
Valid values are "ssh" and "winrm". Provisioners typically assume that the remote system runs Microsoft Windows when using WinRM. Behaviors based on the SSH target_platform will force Windows-specific behavior for WinRM, unless otherwise specified.
agentOptional
public readonly agent: string;
- Type: string
Set to false to disable using ssh-agent to authenticate.
On Windows the only supported SSH authentication agent is Pageant.
agentIdentityOptional
public readonly agentIdentity: string;
- Type: string
The preferred identity from the ssh agent for authentication.
bastionCertificateOptional
public readonly bastionCertificate: string;
- Type: string
The contents of a signed CA Certificate.
The certificate argument must be used in conjunction with a bastion_private_key. These can be loaded from a file on disk using the the file function.
bastionHostOptional
public readonly bastionHost: string;
- Type: string
Setting this enables the bastion Host connection.
The provisioner will connect to bastion_host first, and then connect from there to host.
bastionHostKeyOptional
public readonly bastionHostKey: string;
- Type: string
The public key from the remote host or the signing CA, used to verify the host connection.
bastionPasswordOptional
public readonly bastionPassword: string;
- Type: string
The password to use for the bastion host.
bastionPortOptional
public readonly bastionPort: number;
- Type: number
The port to use connect to the bastion host.
bastionPrivateKeyOptional
public readonly bastionPrivateKey: string;
- Type: string
The contents of an SSH key file to use for the bastion host.
These can be loaded from a file on disk using the file function.
bastionUserOptional
public readonly bastionUser: string;
- Type: string
The user for the connection to the bastion host.
certificateOptional
public readonly certificate: string;
- Type: string
The contents of a signed CA Certificate.
The certificate argument must be used in conjunction with a private_key. These can be loaded from a file on disk using the the file function.
hostKeyOptional
public readonly hostKey: string;
- Type: string
The public key from the remote host or the signing CA, used to verify the connection.
passwordOptional
public readonly password: string;
- Type: string
The password to use for the connection.
portOptional
public readonly port: number;
- Type: number
- Default: 22
The port to connect to.
privateKeyOptional
public readonly privateKey: string;
- Type: string
The contents of an SSH key to use for the connection.
These can be loaded from a file on disk using the file function. This takes preference over password if provided.
proxyHostOptional
public readonly proxyHost: string;
- Type: string
Setting this enables the SSH over HTTP connection.
This host will be connected to first, and then the host or bastion_host connection will be made from there.
proxyPortOptional
public readonly proxyPort: number;
- Type: number
The port to use connect to the proxy host.
proxySchemeOptional
public readonly proxyScheme: string;
- Type: string
The ssh connection also supports the following fields to facilitate connections by SSH over HTTP proxy.
proxyUserNameOptional
public readonly proxyUserName: string;
- Type: string
The username to use connect to the private proxy host.
This argument should be specified only if authentication is required for the HTTP Proxy server.
proxyUserPasswordOptional
public readonly proxyUserPassword: string;
- Type: string
The password to use connect to the private proxy host.
This argument should be specified only if authentication is required for the HTTP Proxy server.
scriptPathOptional
public readonly scriptPath: string;
- Type: string
The path used to copy scripts meant for remote execution.
Refer to {@link https://www.terraform.io/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts How Provisioners Execute Remote Scripts below for more details}
targetPlatformOptional
public readonly targetPlatform: string;
- Type: string
- Default: unix
The target platform to connect to.
Valid values are "windows" and "unix". If the platform is set to windows, the default scriptpath is c:\windows\temp\terraform%RAND%.cmd, assuming the SSH default shell is cmd.exe. If the SSH default shell is PowerShell, set scriptpath to "c:/windows/temp/terraform%RAND%.ps1"
timeoutOptional
public readonly timeout: string;
- Type: string
- Default: 5m
The timeout to wait for the connection to become available.
Should be provided as a string (e.g., "30s" or "5m".)
userOptional
public readonly user: string;
- Type: string
- Default: root
The user to use for the connection.
StackAnnotation
Initializer
import { StackAnnotation } from 'cdktf'
const stackAnnotation: StackAnnotation = { ... }
Properties
| Name | Type | Description |
|---|---|---|
constructPath | string | No description. |
level | AnnotationMetadataEntryType | No description. |
message | string | No description. |
stacktrace | string[] | No description. |
constructPathRequired
public readonly constructPath: string;
- Type: string
levelRequired
public readonly level: AnnotationMetadataEntryType;
messageRequired
public readonly message: string;
- Type: string
stacktraceOptional
public readonly stacktrace: string[];
- Type: string[]
StackManifest
Initializer
import { StackManifest } from 'cdktf'
const stackManifest: StackManifest = { ... }
Properties
| Name | Type | Description |
|---|---|---|
annotations | StackAnnotation[] | No description. |
constructPath | string | No description. |
dependencies | string[] | No description. |
name | string | No description. |
synthesizedStackPath | string | No description. |
workingDirectory | string | No description. |
annotationsRequired
public readonly annotations: StackAnnotation[];
- Type: StackAnnotation[]
constructPathRequired
public readonly constructPath: string;
- Type: string
dependenciesRequired
public readonly dependencies: string[];
- Type: string[]
nameRequired
public readonly name: string;
- Type: string
synthesizedStackPathRequired
public readonly synthesizedStackPath: string;
- Type: string
workingDirectoryRequired
public readonly workingDirectory: string;
- Type: string
SwiftBackendProps
Initializer
import { SwiftBackendProps } from 'cdktf'
const swiftBackendProps: SwiftBackendProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
container | string | No description. |
applicationCredentialId | string | No description. |
applicationCredentialName | string | No description. |
applicationCredentialSecret | string | No description. |
archiveContainer | string | No description. |
authUrl | string | No description. |
cacertFile | string | No description. |
cert | string | No description. |
cloud | string | No description. |
defaultDomain | string | No description. |
domainId | string | No description. |
domainName | string | No description. |
expireAfter | string | No description. |
insecure | boolean | No description. |
key | string | No description. |
password | string | No description. |
projectDomainId | string | No description. |
projectDomainName | string | No description. |
regionName | string | No description. |
stateName | string | No description. |
tenantId | string | No description. |
tenantName | string | No description. |
token | string | No description. |
userDomainId | string | No description. |
userDomainName | string | No description. |
userId | string | No description. |
userName | string | No description. |
containerRequired
public readonly container: string;
- Type: string
applicationCredentialIdOptional
public readonly applicationCredentialId: string;
- Type: string
applicationCredentialNameOptional
public readonly applicationCredentialName: string;
- Type: string
applicationCredentialSecretOptional
public readonly applicationCredentialSecret: string;
- Type: string
archiveContainerOptional
public readonly archiveContainer: string;
- Type: string
authUrlOptional
public readonly authUrl: string;
- Type: string
cacertFileOptional
public readonly cacertFile: string;
- Type: string
certOptional
public readonly cert: string;
- Type: string
cloudOptional
public readonly cloud: string;
- Type: string
defaultDomainOptional
public readonly defaultDomain: string;
- Type: string
domainIdOptional
public readonly domainId: string;
- Type: string
domainNameOptional
public readonly domainName: string;
- Type: string
expireAfterOptional
public readonly expireAfter: string;
- Type: string
insecureOptional
public readonly insecure: boolean;
- Type: boolean
keyOptional
public readonly key: string;
- Type: string
passwordOptional
public readonly password: string;
- Type: string
projectDomainIdOptional
public readonly projectDomainId: string;
- Type: string
projectDomainNameOptional
public readonly projectDomainName: string;
- Type: string
regionNameOptional
public readonly regionName: string;
- Type: string
stateNameOptional
public readonly stateName: string;
- Type: string
tenantIdOptional
public readonly tenantId: string;
- Type: string
tenantNameOptional
public readonly tenantName: string;
- Type: string
tokenOptional
public readonly token: string;
- Type: string
userDomainIdOptional
public readonly userDomainId: string;
- Type: string
userDomainNameOptional
public readonly userDomainName: string;
- Type: string
userIdOptional
public readonly userId: string;
- Type: string
userNameOptional
public readonly userName: string;
- Type: string
TerraformAssetConfig
Initializer
import { TerraformAssetConfig } from 'cdktf'
const terraformAssetConfig: TerraformAssetConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
path | string | No description. |
assetHash | string | No description. |
type | AssetType | No description. |
pathRequired
public readonly path: string;
- Type: string
assetHashOptional
public readonly assetHash: string;
- Type: string
typeOptional
public readonly type: AssetType;
- Type: AssetType
TerraformConstructor
Initializer
import { testingMatchers } from 'cdktf'
const terraformConstructor: testingMatchers.TerraformConstructor = { ... }
Properties
| Name | Type | Description |
|---|---|---|
tfResourceType | string | No description. |
tfResourceTypeRequired
public readonly tfResourceType: string;
- Type: string
TerraformElementMetadata
Initializer
import { TerraformElementMetadata } from 'cdktf'
const terraformElementMetadata: TerraformElementMetadata = { ... }
Properties
| Name | Type | Description |
|---|---|---|
path | string | No description. |
stackTrace | string[] | No description. |
uniqueId | string | No description. |
pathRequired
public readonly path: string;
- Type: string
stackTraceRequired
public readonly stackTrace: string[];
- Type: string[]
uniqueIdRequired
public readonly uniqueId: string;
- Type: string
TerraformHclModuleOptions
Initializer
import { TerraformHclModuleOptions } from 'cdktf'
const terraformHclModuleOptions: TerraformHclModuleOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
dependsOn | ITerraformDependable[] | No description. |
forEach | ITerraformIterator | No description. |
providers | TerraformProvider | TerraformModuleProvider[] | No description. |
skipAssetCreationFromLocalModules | boolean | No description. |
source | string | No description. |
version | string | No description. |
variables | {[ key: string ]: any} | No description. |
dependsOnOptional
public readonly dependsOn: ITerraformDependable[];
- Type: ITerraformDependable[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
providersOptional
public readonly providers: TerraformProvider | TerraformModuleProvider[];
- Type: TerraformProvider | TerraformModuleProvider[]
skipAssetCreationFromLocalModulesOptional
public readonly skipAssetCreationFromLocalModules: boolean;
- Type: boolean
sourceRequired
public readonly source: string;
- Type: string
versionOptional
public readonly version: string;
- Type: string
variablesOptional
public readonly variables: {[ key: string ]: any};
- Type: {[ key: string ]: any}
TerraformMetaArguments
Initializer
import { TerraformMetaArguments } from 'cdktf'
const terraformMetaArguments: TerraformMetaArguments = { ... }
Properties
| Name | Type | Description |
|---|---|---|
connection | SSHProvisionerConnection | WinrmProvisionerConnection | No description. |
count | number | No description. |
dependsOn | ITerraformDependable[] | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[] | No description. |
connectionOptional
public readonly connection: SSHProvisionerConnection | WinrmProvisionerConnection;
countOptional
public readonly count: number;
- Type: number
dependsOnOptional
public readonly dependsOn: ITerraformDependable[];
- Type: ITerraformDependable[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
lifecycleOptional
public readonly lifecycle: TerraformResourceLifecycle;
providerOptional
public readonly provider: TerraformProvider;
- Type: TerraformProvider
provisionersOptional
public readonly provisioners: FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[];
- Type: FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[]
TerraformModuleOptions
Initializer
import { TerraformModuleOptions } from 'cdktf'
const terraformModuleOptions: TerraformModuleOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
dependsOn | ITerraformDependable[] | No description. |
forEach | ITerraformIterator | No description. |
providers | TerraformProvider | TerraformModuleProvider[] | No description. |
skipAssetCreationFromLocalModules | boolean | No description. |
source | string | No description. |
version | string | No description. |
dependsOnOptional
public readonly dependsOn: ITerraformDependable[];
- Type: ITerraformDependable[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
providersOptional
public readonly providers: TerraformProvider | TerraformModuleProvider[];
- Type: TerraformProvider | TerraformModuleProvider[]
skipAssetCreationFromLocalModulesOptional
public readonly skipAssetCreationFromLocalModules: boolean;
- Type: boolean
sourceRequired
public readonly source: string;
- Type: string
versionOptional
public readonly version: string;
- Type: string
TerraformModuleProvider
Initializer
import { TerraformModuleProvider } from 'cdktf'
const terraformModuleProvider: TerraformModuleProvider = { ... }
Properties
| Name | Type | Description |
|---|---|---|
moduleAlias | string | No description. |
provider | TerraformProvider | No description. |
moduleAliasRequired
public readonly moduleAlias: string;
- Type: string
providerRequired
public readonly provider: TerraformProvider;
- Type: TerraformProvider
TerraformModuleUserOptions
Initializer
import { TerraformModuleUserOptions } from 'cdktf'
const terraformModuleUserOptions: TerraformModuleUserOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
dependsOn | ITerraformDependable[] | No description. |
forEach | ITerraformIterator | No description. |
providers | TerraformProvider | TerraformModuleProvider[] | No description. |
skipAssetCreationFromLocalModules | boolean | No description. |
dependsOnOptional
public readonly dependsOn: ITerraformDependable[];
- Type: ITerraformDependable[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
providersOptional
public readonly providers: TerraformProvider | TerraformModuleProvider[];
- Type: TerraformProvider | TerraformModuleProvider[]
skipAssetCreationFromLocalModulesOptional
public readonly skipAssetCreationFromLocalModules: boolean;
- Type: boolean
TerraformOutputConfig
Initializer
import { TerraformOutputConfig } from 'cdktf'
const terraformOutputConfig: TerraformOutputConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
value | any | No description. |
dependsOn | ITerraformDependable[] | No description. |
description | string | No description. |
sensitive | boolean | No description. |
staticId | boolean | If set to true the synthesized Terraform Output will be named after the id passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId). |
valueRequired
public readonly value: any;
- Type: any
dependsOnOptional
public readonly dependsOn: ITerraformDependable[];
- Type: ITerraformDependable[]
descriptionOptional
public readonly description: string;
- Type: string
sensitiveOptional
public readonly sensitive: boolean;
- Type: boolean
staticIdOptional
public readonly staticId: boolean;
- Type: boolean
- Default: false
If set to true the synthesized Terraform Output will be named after the id passed to the constructor instead of the default (TerraformOutput.friendlyUniqueId).
TerraformProviderConfig
Initializer
import { TerraformProviderConfig } from 'cdktf'
const terraformProviderConfig: TerraformProviderConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
terraformResourceType | string | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
terraformProviderSource | string | No description. |
terraformResourceTypeRequired
public readonly terraformResourceType: string;
- Type: string
terraformGeneratorMetadataOptional
public readonly terraformGeneratorMetadata: TerraformProviderGeneratorMetadata;
terraformProviderSourceOptional
public readonly terraformProviderSource: string;
- Type: string
TerraformProviderGeneratorMetadata
Initializer
import { TerraformProviderGeneratorMetadata } from 'cdktf'
const terraformProviderGeneratorMetadata: TerraformProviderGeneratorMetadata = { ... }
Properties
| Name | Type | Description |
|---|---|---|
providerName | string | No description. |
providerVersion | string | No description. |
providerVersionConstraint | string | No description. |
providerNameRequired
public readonly providerName: string;
- Type: string
providerVersionOptional
public readonly providerVersion: string;
- Type: string
providerVersionConstraintOptional
public readonly providerVersionConstraint: string;
- Type: string
TerraformResourceConfig
Initializer
import { TerraformResourceConfig } from 'cdktf'
const terraformResourceConfig: TerraformResourceConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
connection | SSHProvisionerConnection | WinrmProvisionerConnection | No description. |
count | number | No description. |
dependsOn | ITerraformDependable[] | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[] | No description. |
terraformResourceType | string | No description. |
terraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
connectionOptional
public readonly connection: SSHProvisionerConnection | WinrmProvisionerConnection;
countOptional
public readonly count: number;
- Type: number
dependsOnOptional
public readonly dependsOn: ITerraformDependable[];
- Type: ITerraformDependable[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
lifecycleOptional
public readonly lifecycle: TerraformResourceLifecycle;
providerOptional
public readonly provider: TerraformProvider;
- Type: TerraformProvider
provisionersOptional
public readonly provisioners: FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[];
- Type: FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[]
terraformResourceTypeRequired
public readonly terraformResourceType: string;
- Type: string
terraformGeneratorMetadataOptional
public readonly terraformGeneratorMetadata: TerraformProviderGeneratorMetadata;
TerraformResourceLifecycle
Initializer
import { TerraformResourceLifecycle } from 'cdktf'
const terraformResourceLifecycle: TerraformResourceLifecycle = { ... }
Properties
| Name | Type | Description |
|---|---|---|
createBeforeDestroy | boolean | No description. |
ignoreChanges | string[] | string | No description. |
preventDestroy | boolean | No description. |
createBeforeDestroyOptional
public readonly createBeforeDestroy: boolean;
- Type: boolean
ignoreChangesOptional
public readonly ignoreChanges: string[] | string;
- Type: string[] | string
preventDestroyOptional
public readonly preventDestroy: boolean;
- Type: boolean
TerraformStackMetadata
Initializer
import { TerraformStackMetadata } from 'cdktf'
const terraformStackMetadata: TerraformStackMetadata = { ... }
Properties
| Name | Type | Description |
|---|---|---|
backend | string | No description. |
stackName | string | No description. |
version | string | No description. |
backendRequired
public readonly backend: string;
- Type: string
stackNameRequired
public readonly stackName: string;
- Type: string
versionRequired
public readonly version: string;
- Type: string
TerraformVariableConfig
Initializer
import { TerraformVariableConfig } from 'cdktf'
const terraformVariableConfig: TerraformVariableConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
default | any | No description. |
description | string | No description. |
nullable | boolean | No description. |
sensitive | boolean | No description. |
type | string | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. |
validation | TerraformVariableValidationConfig[] | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. |
defaultOptional
public readonly default: any;
- Type: any
descriptionOptional
public readonly description: string;
- Type: string
nullableOptional
public readonly nullable: boolean;
- Type: boolean
sensitiveOptional
public readonly sensitive: boolean;
- Type: boolean
typeOptional
public readonly type: string;
- Type: string
The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable.
If no type constraint is set then a value of any type is accepted.
While type constraints are optional, we recommend specifying them; they serve as easy reminders for users of the module, and allow Terraform to return a helpful error message if the wrong type is used.
Type constraints are created from a mixture of type keywords and type constructors. The supported type keywords are:
- string
- number
- bool
The type constructors allow you to specify complex types such as collections:
- list(\< TYPE\ >)
- set(\< TYPE\ >)
- map(\< TYPE\ >)
- object({\< ATTR NAME\ > = \< TYPE\ >, ... })
- tuple([\< TYPE\ >, ...])
The keyword any may be used to indicate that any type is acceptable. For more information on the meaning and behavior of these different types, as well as detailed information about automatic conversion of complex types, see {@link https://www.terraform.io/docs/configuration/types.html|Type Constraints}.
If both the type and default arguments are specified, the given default value must be convertible to the specified type.
validationOptional
public readonly validation: TerraformVariableValidationConfig[];
Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block.
TerraformVariableValidationConfig
Initializer
import { TerraformVariableValidationConfig } from 'cdktf'
const terraformVariableValidationConfig: TerraformVariableValidationConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
condition | any | No description. |
errorMessage | string | No description. |
conditionRequired
public readonly condition: any;
- Type: any
errorMessageRequired
public readonly errorMessage: string;
- Type: string
TestingAppOptions
Initializer
import { TestingAppOptions } from 'cdktf'
const testingAppOptions: TestingAppOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
enableFutureFlags | boolean | No description. |
fakeCdktfJsonPath | boolean | No description. |
outdir | string | No description. |
stackTraces | boolean | No description. |
stubVersion | boolean | No description. |
enableFutureFlagsOptional
public readonly enableFutureFlags: boolean;
- Type: boolean
fakeCdktfJsonPathOptional
public readonly fakeCdktfJsonPath: boolean;
- Type: boolean
outdirOptional
public readonly outdir: string;
- Type: string
stackTracesOptional
public readonly stackTraces: boolean;
- Type: boolean
stubVersionOptional
public readonly stubVersion: boolean;
- Type: boolean
WinrmProvisionerConnection
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
See {@link https://www.terraform.io/language/resources/provisioners/connection connection}
Initializer
import { WinrmProvisionerConnection } from 'cdktf'
const winrmProvisionerConnection: WinrmProvisionerConnection = { ... }
Properties
| Name | Type | Description |
|---|---|---|
host | string | The address of the resource to connect to. |
type | string | The connection type. |
cacert | string | The CA certificate to validate against. |
https | boolean | Set to true to connect using HTTPS instead of HTTP. |
insecure | boolean | Set to true to skip validating the HTTPS certificate chain. |
password | string | The password to use for the connection. |
port | number | The port to connect to. |
scriptPath | string | The path used to copy scripts meant for remote execution. |
timeout | string | The timeout to wait for the connection to become available. |
useNtlm | boolean | Set to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest. |
user | string | The user to use for the connection. |
hostRequired
public readonly host: string;
- Type: string
The address of the resource to connect to.
typeRequired
public readonly type: string;
- Type: string
The connection type.
Valid values are "ssh" and "winrm". Provisioners typically assume that the remote system runs Microsoft Windows when using WinRM. Behaviors based on the SSH target_platform will force Windows-specific behavior for WinRM, unless otherwise specified.
cacertOptional
public readonly cacert: string;
- Type: string
The CA certificate to validate against.
httpsOptional
public readonly https: boolean;
- Type: boolean
Set to true to connect using HTTPS instead of HTTP.
insecureOptional
public readonly insecure: boolean;
- Type: boolean
Set to true to skip validating the HTTPS certificate chain.
passwordOptional
public readonly password: string;
- Type: string
The password to use for the connection.
portOptional
public readonly port: number;
- Type: number
- Default: 22
The port to connect to.
scriptPathOptional
public readonly scriptPath: string;
- Type: string
The path used to copy scripts meant for remote execution.
Refer to {@link https://www.terraform.io/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts How Provisioners Execute Remote Scripts below for more details}
timeoutOptional
public readonly timeout: string;
- Type: string
- Default: 5m
The timeout to wait for the connection to become available.
Should be provided as a string (e.g., "30s" or "5m".)
useNtlmOptional
public readonly useNtlm: boolean;
- Type: boolean
Set to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest.
Refer to Authentication for Remote Connections in the Windows App Development documentation for more details.
userOptional
public readonly user: string;
- Type: string
- Default: root
The user to use for the connection.
Classes
Annotations
Includes API for attaching annotations such as warning messages to constructs.
Methods
| Name | Description |
|---|---|
addError | Adds an { "error": < message > } metadata entry to this construct. |
addInfo | Adds an info metadata entry to this construct. |
addWarning | Adds a warning metadata entry to this construct. |
addError
public addError(message: string): void
Adds an { "error": < message > } metadata entry to this construct.
The toolkit will fail synthesis when errors are reported.
messageRequired
- Type: string
The error message.
addInfo
public addInfo(message: string): void
Adds an info metadata entry to this construct.
The CLI will display the info message when apps are synthesized.
messageRequired
- Type: string
The info message.
addWarning
public addWarning(message: string): void
Adds a warning metadata entry to this construct.
The CLI will display the warning when an app is synthesized. In a future release the CLI might introduce a --strict flag which will then fail the synthesis if it encounters a warning.
messageRequired
- Type: string
The warning message.
Static Functions
| Name | Description |
|---|---|
of | Returns the annotations API for a construct scope. |
of
import { Annotations } from 'cdktf'
Annotations.of(scope: IConstruct)
Returns the annotations API for a construct scope.
scopeRequired
- Type: constructs.IConstruct
The scope.
AnyMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import { AnyMap } from 'cdktf'
new AnyMap(terraformResource: IInterpolatingParent, terraformAttribute: string)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
lookup
public lookup(key: string): any
keyRequired
- Type: string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
AnyMapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
import { AnyMapList } from 'cdktf'
new AnyMapList(terraformResource: IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
wrapsSet | boolean | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
wrapsSetRequired
- Type: boolean
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
get | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
get
public get(index: number): AnyMap
indexRequired
- Type: number
interpolationForAttribute
public interpolationForAttribute(property: string): IResolvable
propertyRequired
- Type: string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
Aspects
Aspects can be applied to CDK tree scopes and can operate on the tree before synthesis.
Methods
| Name | Description |
|---|---|
add | Adds an aspect to apply this scope before synthesis. |
add
public add(aspect: IAspect): void
Adds an aspect to apply this scope before synthesis.
aspectRequired
- Type: IAspect
The aspect to add.
Static Functions
| Name | Description |
|---|---|
of | Returns the Aspects object associated with a construct scope. |
of
import { Aspects } from 'cdktf'
Aspects.of(scope: IConstruct)
Returns the Aspects object associated with a construct scope.
scopeRequired
- Type: constructs.IConstruct
The scope for which these aspects will apply.
Properties
allRequired
public readonly all: IAspect[];
- Type: IAspect[]
The list of aspects which were directly applied on this scope.
AssertionReturn
Initializers
import { testingMatchers } from 'cdktf'
new testingMatchers.AssertionReturn(message: string, pass: boolean)
messageRequired
- Type: string
passRequired
- Type: boolean
Properties
messageRequired
public readonly message: string;
- Type: string
passRequired
public readonly pass: boolean;
- Type: boolean
BooleanMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import { BooleanMap } from 'cdktf'
new BooleanMap(terraformResource: IInterpolatingParent, terraformAttribute: string)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
lookup
public lookup(key: string): IResolvable
keyRequired
- Type: string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
BooleanMapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
import { BooleanMapList } from 'cdktf'
new BooleanMapList(terraformResource: IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
wrapsSet | boolean | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
wrapsSetRequired
- Type: boolean
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
get | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
get
public get(index: number): BooleanMap
indexRequired
- Type: number
interpolationForAttribute
public interpolationForAttribute(property: string): IResolvable
propertyRequired
- Type: string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
CloudWorkspace
A cloud workspace can either be a single named workspace, or a list of tagged workspaces.
Initializers
import { CloudWorkspace } from "cdktf";
new CloudWorkspace();
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
toTerraform | No description. |
toTerraform
public toTerraform(): any
ComplexComputedList
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import { ComplexComputedList } from 'cdktf'
new ComplexComputedList(terraformResource: IInterpolatingParent, terraformAttribute: string, complexComputedListIndex: string, wrapsSet?: boolean)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
complexComputedListIndex | string | No description. |
wrapsSet | boolean | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
complexComputedListIndexRequired
- Type: string
wrapsSetOptional
- Type: boolean
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
getAnyMapAttribute | No description. |
getBooleanAttribute | No description. |
getBooleanMapAttribute | No description. |
getListAttribute | No description. |
getNumberAttribute | No description. |
getNumberListAttribute | No description. |
getNumberMapAttribute | No description. |
getStringAttribute | No description. |
getStringMapAttribute | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
computeFqnpublic computeFqn(): string
getAnyMapAttribute
getAnyMapAttributepublic getAnyMapAttribute(terraformAttribute: string): {[ key: string ]: any}
terraformAttributeRequired
- Type: string
getBooleanAttribute
getBooleanAttributepublic getBooleanAttribute(terraformAttribute: string): IResolvable
terraformAttributeRequired
- Type: string
getBooleanMapAttribute
getBooleanMapAttributepublic getBooleanMapAttribute(terraformAttribute: string): {[ key: string ]: boolean}
terraformAttributeRequired
- Type: string
getListAttribute
getListAttributepublic getListAttribute(terraformAttribute: string): string[]
terraformAttributeRequired
- Type: string
getNumberAttribute
getNumberAttributepublic getNumberAttribute(terraformAttribute: string): number
terraformAttributeRequired
- Type: string
getNumberListAttribute
getNumberListAttributepublic getNumberListAttribute(terraformAttribute: string): number[]
terraformAttributeRequired
- Type: string
getNumberMapAttribute
getNumberMapAttributepublic getNumberMapAttribute(terraformAttribute: string): {[ key: string ]: number}
terraformAttributeRequired
- Type: string
getStringAttribute
getStringAttributepublic getStringAttribute(terraformAttribute: string): string
terraformAttributeRequired
- Type: string
getStringMapAttribute
getStringMapAttributepublic getStringMapAttribute(terraformAttribute: string): {[ key: string ]: string}
terraformAttributeRequired
- Type: string
interpolationForAttribute
interpolationForAttributepublic interpolationForAttribute(property: string): IResolvable
propertyRequired
- Type: string
resolve
resolvepublic resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
toStringpublic toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
creationStack- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
fqn- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
public readonly fqn: string;
- Type: string
ComplexList
- Implements: ITerraformAddressable, IResolvable
Initializers
import { ComplexList } from 'cdktf'
new ComplexList(terraformResource: IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
wrapsSet | boolean | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
wrapsSetRequired
- Type: boolean
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
ComplexMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import { ComplexMap } from 'cdktf'
new ComplexMap(terraformResource: IInterpolatingParent, terraformAttribute: string)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
ComplexObject
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import { ComplexObject } from 'cdktf'
new ComplexObject(terraformResource: IInterpolatingParent, terraformAttribute: string, complexObjectIsFromSet: boolean, complexObjectIndex?: string | number)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
complexObjectIsFromSet | boolean | set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items. |
complexObjectIndex | string | number | the index of the complex object in a list. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
complexObjectIsFromSetRequired
- Type: boolean
set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items.
complexObjectIndexOptional
- Type: string | number
the index of the complex object in a list.
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
getAnyMapAttribute | No description. |
getBooleanAttribute | No description. |
getBooleanMapAttribute | No description. |
getListAttribute | No description. |
getNumberAttribute | No description. |
getNumberListAttribute | No description. |
getNumberMapAttribute | No description. |
getStringAttribute | No description. |
getStringMapAttribute | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
getAnyMapAttribute
public getAnyMapAttribute(terraformAttribute: string): {[ key: string ]: any}
terraformAttributeRequired
- Type: string
getBooleanAttribute
public getBooleanAttribute(terraformAttribute: string): IResolvable
terraformAttributeRequired
- Type: string
getBooleanMapAttribute
public getBooleanMapAttribute(terraformAttribute: string): {[ key: string ]: boolean}
terraformAttributeRequired
- Type: string
getListAttribute
public getListAttribute(terraformAttribute: string): string[]
terraformAttributeRequired
- Type: string
getNumberAttribute
public getNumberAttribute(terraformAttribute: string): number
terraformAttributeRequired
- Type: string
getNumberListAttribute
public getNumberListAttribute(terraformAttribute: string): number[]
terraformAttributeRequired
- Type: string
getNumberMapAttribute
public getNumberMapAttribute(terraformAttribute: string): {[ key: string ]: number}
terraformAttributeRequired
- Type: string
getStringAttribute
public getStringAttribute(terraformAttribute: string): string
terraformAttributeRequired
- Type: string
getStringMapAttribute
public getStringMapAttribute(terraformAttribute: string): {[ key: string ]: string}
terraformAttributeRequired
- Type: string
interpolationForAttribute
public interpolationForAttribute(property: string): IResolvable
propertyRequired
- Type: string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
DefaultTokenResolver
- Implements: ITokenResolver
Default resolver implementation.
Initializers
import { DefaultTokenResolver } from 'cdktf'
new DefaultTokenResolver(concat: IFragmentConcatenator)
| Name | Type | Description |
|---|---|---|
concat | IFragmentConcatenator | No description. |
concatRequired
- Type: IFragmentConcatenator
Methods
| Name | Description |
|---|---|
resolveList | Resolves a list of string. |
resolveMap | Resolves a map token. |
resolveNumberList | Resolves a list of numbers. |
resolveString | Resolve string fragments to Tokens. |
resolveToken | Default Token resolution. |
resolveList
public resolveList(xs: string[], context: IResolveContext): any
Resolves a list of string.
xsRequired
- Type: string[]
contextRequired
- Type: IResolveContext
resolveMap
public resolveMap(xs: {[ key: string ]: any}, context: IResolveContext): any
Resolves a map token.
xsRequired
- Type: {[ key: string ]: any}
contextRequired
- Type: IResolveContext
resolveNumberList
public resolveNumberList(xs: number[], context: IResolveContext): any
Resolves a list of numbers.
xsRequired
- Type: number[]
contextRequired
- Type: IResolveContext
resolveString
public resolveString(fragments: TokenizedStringFragments, context: IResolveContext): any
Resolve string fragments to Tokens.
fragmentsRequired
- Type: TokenizedStringFragments
contextRequired
- Type: IResolveContext
resolveToken
public resolveToken(t: IResolvable, context: IResolveContext, postProcessor: IPostProcessor): any
Default Token resolution.
Resolve the Token, recurse into whatever it returns, then finally post-process it.
tRequired
- Type: IResolvable
contextRequired
- Type: IResolveContext
postProcessorRequired
- Type: IPostProcessor
Fn
Initializers
import { Fn } from "cdktf";
new Fn();
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
abs | {@link https://www.terraform.io/docs/language/functions/abs.html abs} returns the absolute value of the given number. |
abspath | {@link https://www.terraform.io/docs/language/functions/abspath.html abspath} takes a string containing a filesystem path and converts it to an absolute path. |
alltrue | {@link https://www.terraform.io/docs/language/functions/alltrue.html alltrue} returns true if all elements in a given collection are true or "true". |
anytrue | {@link https://www.terraform.io/docs/language/functions/anytrue.html anytrue} returns true if any element in a given collection is true or "true". |
base64decode | {@link https://www.terraform.io/docs/language/functions/base64decode.html base64decode} takes a string containing a Base64 character sequence and returns the original string. |
base64encode | {@link https://www.terraform.io/docs/language/functions/base64encode.html base64encode} takes a string containing a Base64 character sequence and returns the original string. |
base64gzip | {@link https://www.terraform.io/docs/language/functions/base64gzip.html base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding. |
base64sha256 | {@link https://www.terraform.io/docs/language/functions/base64sha256.html base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. |
base64sha512 | {@link https://www.terraform.io/docs/language/functions/base64sha512.html base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. |
basename | {@link https://www.terraform.io/docs/language/functions/basename.html basename} takes a string containing a filesystem path and removes all except the last portion from it. |
bcrypt | {@link https://www.terraform.io/docs/language/functions/bcrypt.html bcrypt} computes a hash of the given string using the Blowfish cipher, returning a string in the Modular Crypt Format usually expected in the shadow password file on many Unix systems. |
can | {@link https://www.terraform.io/docs/language/functions/can.html can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors. |
ceil | {@link https://www.terraform.io/docs/language/functions/ceil.html ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction. |
chomp | {@link https://www.terraform.io/docs/language/functions/chomp.html chomp} removes newline characters at the end of a string. |
chunklist | {@link https://www.terraform.io/docs/language/functions/chunklist.html chunklist} splits a single list into fixed-size chunks, returning a list of lists. |
cidrhost | {@link https://www.terraform.io/docs/language/functions/cidrhost.html cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix. |
cidrnetmask | {@link https://www.terraform.io/docs/language/functions/cidrnetmask.html cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address. |
cidrsubnet | {@link https://www.terraform.io/docs/language/functions/cidrsubnet.html cidrsubnet} calculates a subnet address within given IP network address prefix. |
cidrsubnets | {@link https://www.terraform.io/docs/language/functions/cidrsubnets.html cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix. |
coalesce | {@link https://www.terraform.io/docs/language/functions/coalesce.html coalesce} takes any number of arguments and returns the first one that isn't null or an empty string. |
coalescelist | {@link https://www.terraform.io/docs/language/functions/coalescelist.html coalescelist} takes any number of list arguments and returns the first one that isn't empty. |
compact | {@link https://www.terraform.io/docs/language/functions/compact.html compact} takes a list of strings and returns a new list with any empty string elements removed. |
concat | {@link https://www.terraform.io/docs/language/functions/concat.html concat} takes two or more lists and combines them into a single list. |
contains | {@link https://www.terraform.io/docs/language/functions/contains.html contains} determines whether a given list or set contains a given single value as one of its elements. |
csvdecode | {@link https://www.terraform.io/docs/language/functions/csvdecode.html csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data. |
dirname | {@link https://www.terraform.io/docs/language/functions/dirname.html dirname} takes a string containing a filesystem path and removes the last portion from it. |
distinct | {@link https://www.terraform.io/docs/language/functions/distinct.html distinct} takes a list and returns a new list with any duplicate elements removed. |
element | {@link https://www.terraform.io/docs/language/functions/element.html element} retrieves a single element from a list. |
file | {@link https://www.terraform.io/docs/language/functions/file.html file} takes a string containing a filesystem path and removes all except the last portion from it. |
filebase64 | {@link https://www.terraform.io/docs/language/functions/filebase64.html filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string. |
filebase64sha256 | {@link https://www.terraform.io/docs/language/functions/filebase64sha256.html filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string. |
filebase64sha512 | {@link https://www.terraform.io/docs/language/functions/filebase64sha512.html filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string. |
fileexists | {@link https://www.terraform.io/docs/language/functions/fileexists.html fileexists} determines whether a file exists at a given path. |
filemd5 | {@link https://www.terraform.io/docs/language/functions/filemd5.html filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string. |
fileset | {@link https://www.terraform.io/docs/language/functions/fileset.html fileset} enumerates a set of regular file names given a path and pattern. |
filesha1 | {@link https://www.terraform.io/docs/language/functions/filesha1.html filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string. |
filesha256 | {@link https://www.terraform.io/docs/language/functions/filesha256.html filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string. |
filesha512 | {@link https://www.terraform.io/docs/language/functions/filesha512.html filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string. |
flatten | {@link https://www.terraform.io/docs/language/functions/flatten.html flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents. |
floor | {@link https://www.terraform.io/docs/language/functions/floor.html floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction. |
format | {@link https://www.terraform.io/docs/language/functions/format.html format} produces a string by formatting a number of other values according to a specification string. |
formatdate | {@link https://www.terraform.io/docs/language/functions/formatdate.html formatdate} converts a timestamp into a different time format. |
formatlist | {@link https://www.terraform.io/docs/language/functions/formatlist.html formatlist} produces a list of strings by formatting a number of other values according to a specification string. |
indent | {@link https://www.terraform.io/docs/language/functions/indent.html indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string. |
index | {@link https://www.terraform.io/docs/language/functions/index.html index} finds the element index for a given value in a list. |
join | {@link https://www.terraform.io/docs/language/functions/join.html join} produces a string by concatenating together all elements of a given list of strings with the given delimiter. |
jsondecode | {@link https://www.terraform.io/docs/language/functions/jsondecode.html jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string. |
jsonencode | {@link https://www.terraform.io/docs/language/functions/jsonencode.html jsonencode} encodes a given value to a string using JSON syntax. |
keys | {@link https://www.terraform.io/docs/language/functions/keys.html keys} takes a map and returns a list containing the keys from that map. |
lengthOf | {@link https://www.terraform.io/docs/language/functions/length.html length} determines the length of a given list, map, or string. |
log | {@link https://www.terraform.io/docs/language/functions/log.html log} returns the logarithm of a given number in a given base. |
lookup | {@link https://www.terraform.io/docs/language/functions/lookup.html lookup} retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead. |
lower | {@link https://www.terraform.io/docs/language/functions/lower.html lower} converts all cased letters in the given string to lowercase. |
matchkeys | {@link https://www.terraform.io/docs/language/functions/matchkeys.html matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list. |
max | {@link https://www.terraform.io/docs/language/functions/max.html max} takes one or more numbers and returns the greatest number from the set. |
md5 | {@link https://www.terraform.io/docs/language/functions/md5.html md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits. |
mergeLists | {@link https://www.terraform.io/docs/language/functions/merge.html merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments. |
mergeMaps | {@link https://www.terraform.io/docs/language/functions/merge.html merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments. |
min | {@link https://www.terraform.io/docs/language/functions/min.html min} takes one or more numbers and returns the smallest number from the set. |
nonsensitive | {@link https://www.terraform.io/docs/language/functions/nonsensitive.html nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value. |
one | {@link https://www.terraform.io/docs/language/functions/one.html one} takes a list, set, or tuple value with either zero or one elements. |
parseInt | {@link https://www.terraform.io/docs/language/functions/parseint.html parseInt} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive. |
pathexpand | {@link https://www.terraform.io/docs/language/functions/pathexpand.html pathexpand} takes a string containing a filesystem path and removes the last portion from it. |
pow | {@link https://www.terraform.io/docs/language/functions/pow.html pow} calculates an exponent, by raising its first argument to the power of the second argument. |
range | {@link https://www.terraform.io/docs/language/functions/range.html range} generates a list of numbers using a start value, a limit value, and a step value. |
rawString | Use this function to wrap a string and escape it properly for the use in Terraform This is only needed in certain scenarios (e.g., if you have unescaped double quotes in the string). |
regex | {@link https://www.terraform.io/docs/language/functions/regex.html regex} applies a regular expression to a string and returns the matching substrings in pattern. |
regexall | {@link https://www.terraform.io/docs/language/functions/regexall.html regexall} applies a regular expression to a string and returns a list of all matches. |
replace | {@link https://www.terraform.io/docs/language/functions/replace.html replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string. |
reverse | {@link https://www.terraform.io/docs/language/functions/reverse.html reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order. |
rsadecrypt | {@link https://www.terraform.io/docs/language/functions/rsadecrypt.html rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext. |
sensitive | {@link https://www.terraform.io/docs/language/functions/sensitive.html sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables. |
setintersection | {@link https://www.terraform.io/docs/language/functions/setintersection.html setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. |
setproduct | {@link https://www.terraform.io/docs/language/functions/setproduct.html setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product. |
setsubtract | {@link https://www.terraform.io/docs/language/functions/slice.html setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. |
setunion | {@link https://www.terraform.io/docs/language/functions/setunion.html setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. |
sha1 | {@link https://www.terraform.io/docs/language/functions/sha1.html sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits. |
sha256 | {@link https://www.terraform.io/docs/language/functions/sha256.html sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits. |
sha512 | {@link https://www.terraform.io/docs/language/functions/sha512.html sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits. |
signum | {@link https://www.terraform.io/docs/language/functions/signum.html signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign. |
slice | {@link https://www.terraform.io/docs/language/functions/slice.html slice} extracts some consecutive elements from within a list. |
sort | {@link https://www.terraform.io/docs/language/functions/sort.html sort} takes a list of strings and returns a new list with those strings sorted lexicographically. |
split | {@link https://www.terraform.io/docs/language/functions/split.html split} produces a list by dividing a given string at all occurrences of a given separator. |
strrev | {@link https://www.terraform.io/docs/language/functions/strrev.html strrev} reverses the characters in a string. |
substr | {@link https://www.terraform.io/docs/language/functions/substr.html substr} extracts a substring from a given string by offset and length. |
sum | {@link https://www.terraform.io/docs/language/functions/sum.html sum} takes a list or set of numbers and returns the sum of those numbers. |
templatefile | {@link https://www.terraform.io/docs/language/functions/templatefile.html templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables. |
textdecodebase64 | {@link https://www.terraform.io/docs/language/functions/textdecodebase64.html textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. |
textencodebase64 | {@link https://www.terraform.io/docs/language/functions/textencodebase64.html textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters. |
timeadd | {@link https://www.terraform.io/docs/language/functions/timeadd.html timeadd} adds a duration to a timestamp, returning a new timestamp. |
timestamp | {@link https://www.terraform.io/docs/language/functions/timestamp.html timestamp} returns a UTC timestamp string in RFC 3339 format. |
title | {@link https://www.terraform.io/docs/language/functions/title.html title} converts the first letter of each word in the given string to uppercase. |
tobool | {@link https://www.terraform.io/docs/language/functions/tobool.html tobool} converts its argument to a boolean value. |
tolist | {@link https://www.terraform.io/docs/language/functions/tolist.html tolist} converts its argument to a list value. |
tomap | {@link https://www.terraform.io/docs/language/functions/tomap.html tomap} converts its argument to a map value. |
tonumber | {@link https://www.terraform.io/docs/language/functions/tonumber.html tonumber} converts its argument to a number value. |
toset | {@link https://www.terraform.io/docs/language/functions/toset.html toset} converts its argument to a set value. |
tostring | {@link https://www.terraform.io/docs/language/functions/tostring.html tostring} converts its argument to a string value. |
transpose | {@link https://www.terraform.io/docs/language/functions/transpose.html transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings. |
trim | {@link https://www.terraform.io/docs/language/functions/trim.html trim} removes the specified characters from the start and end of the given string. |
trimprefix | {@link https://www.terraform.io/docs/language/functions/trimprefix.html trimprefix} removes the specified prefix from the start of the given string. |
trimspace | {@link https://www.terraform.io/docs/language/functions/trimspace.html trimspace} removes any space characters from the start and end of the given string. |
trimsuffix | {@link https://www.terraform.io/docs/language/functions/trimsuffix.html trimsuffix} removes the specified suffix from the end of the given string. |
try | {@link https://www.terraform.io/docs/language/functions/try.html try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors. |
upper | {@link https://www.terraform.io/docs/language/functions/upper.html upper} converts all cased letters in the given string to uppercase. |
urlencode | {@link https://www.terraform.io/docs/language/functions/urlencode.html urlencode} applies URL encoding to a given string. |
uuid | {@link https://www.terraform.io/docs/language/functions/uuid.html uuid} generates a unique identifier string. |
uuidv5 | {@link https://www.terraform.io/docs/language/functions/uuidv5.html uuidv5} generates a unique identifier string. |
values | {@link https://www.terraform.io/docs/language/functions/values.html values} takes a map and returns a list containing the values of the elements in that map. |
yamldecode | {@link https://www.terraform.io/docs/language/functions/yamldecode.html yamldecode} parses a string as a subset of YAML, and produces a representation of its value. |
yamlencode | {@link https://www.terraform.io/docs/language/functions/yamlencode.html yamlencode} encodes a given value to a string using JSON syntax. |
zipmap | {@link https://www.terraform.io/docs/language/functions/zipmap.html zipmap} constructs a map from a list of keys and a corresponding list of values. |
abs
import { Fn } from 'cdktf'
Fn.abs(value: number)
{@link https://www.terraform.io/docs/language/functions/abs.html abs} returns the absolute value of the given number.
valueRequired
- Type: number
abspath
import { Fn } from 'cdktf'
Fn.abspath(value: string)
{@link https://www.terraform.io/docs/language/functions/abspath.html abspath} takes a string containing a filesystem path and converts it to an absolute path.
valueRequired
- Type: string
alltrue
import { Fn } from 'cdktf'
Fn.alltrue(values: any[])
{@link https://www.terraform.io/docs/language/functions/alltrue.html alltrue} returns true if all elements in a given collection are true or "true".
valuesRequired
- Type: any[]
anytrue
import { Fn } from 'cdktf'
Fn.anytrue(value: any[])
{@link https://www.terraform.io/docs/language/functions/anytrue.html anytrue} returns true if any element in a given collection is true or "true".
valueRequired
- Type: any[]
base64decode
import { Fn } from 'cdktf'
Fn.base64decode(value: string)
{@link https://www.terraform.io/docs/language/functions/base64decode.html base64decode} takes a string containing a Base64 character sequence and returns the original string.
valueRequired
- Type: string
base64encode
import { Fn } from 'cdktf'
Fn.base64encode(value: string)
{@link https://www.terraform.io/docs/language/functions/base64encode.html base64encode} takes a string containing a Base64 character sequence and returns the original string.
valueRequired
- Type: string
base64gzip
import { Fn } from 'cdktf'
Fn.base64gzip(value: string)
{@link https://www.terraform.io/docs/language/functions/base64gzip.html base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding.
valueRequired
- Type: string
base64sha256
import { Fn } from 'cdktf'
Fn.base64sha256(value: string)
{@link https://www.terraform.io/docs/language/functions/base64sha256.html base64sha256} computes the SHA256 hash of a given string and encodes it with Base64.
valueRequired
- Type: string
base64sha512
import { Fn } from 'cdktf'
Fn.base64sha512(value: string)
{@link https://www.terraform.io/docs/language/functions/base64sha512.html base64sha512} computes the SHA512 hash of a given string and encodes it with Base64.
valueRequired
- Type: string
basename
import { Fn } from 'cdktf'
Fn.basename(value: string)
{@link https://www.terraform.io/docs/language/functions/basename.html basename} takes a string containing a filesystem path and removes all except the last portion from it.
valueRequired
- Type: string
bcrypt
import { Fn } from 'cdktf'
Fn.bcrypt(value: string, cost?: number)
{@link https://www.terraform.io/docs/language/functions/bcrypt.html bcrypt} computes a hash of the given string using the Blowfish cipher, returning a string in the Modular Crypt Format usually expected in the shadow password file on many Unix systems.
valueRequired
- Type: string
costOptional
- Type: number
can
import { Fn } from 'cdktf'
Fn.can(expression: any)
{@link https://www.terraform.io/docs/language/functions/can.html can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors.
expressionRequired
- Type: any
ceil
import { Fn } from 'cdktf'
Fn.ceil(value: number)
{@link https://www.terraform.io/docs/language/functions/ceil.html ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction.
valueRequired
- Type: number
chomp
import { Fn } from 'cdktf'
Fn.chomp(value: string)
{@link https://www.terraform.io/docs/language/functions/chomp.html chomp} removes newline characters at the end of a string.
valueRequired
- Type: string
chunklist
import { Fn } from 'cdktf'
Fn.chunklist(value: any[], chunkSize: number)
{@link https://www.terraform.io/docs/language/functions/chunklist.html chunklist} splits a single list into fixed-size chunks, returning a list of lists.
valueRequired
- Type: any[]
chunkSizeRequired
- Type: number
cidrhost
import { Fn } from 'cdktf'
Fn.cidrhost(prefix: string, hostnum: number)
{@link https://www.terraform.io/docs/language/functions/cidrhost.html cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix.
prefixRequired
- Type: string
hostnumRequired
- Type: number
cidrnetmask
import { Fn } from 'cdktf'
Fn.cidrnetmask(prefix: string)
{@link https://www.terraform.io/docs/language/functions/cidrnetmask.html cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
prefixRequired
- Type: string
cidrsubnet
import { Fn } from 'cdktf'
Fn.cidrsubnet(prefix: string, newbits: number, netnum: number)
{@link https://www.terraform.io/docs/language/functions/cidrsubnet.html cidrsubnet} calculates a subnet address within given IP network address prefix.
prefixRequired
- Type: string
newbitsRequired
- Type: number
netnumRequired
- Type: number
cidrsubnets
import { Fn } from 'cdktf'
Fn.cidrsubnets(prefix: string, newbits: number[])
{@link https://www.terraform.io/docs/language/functions/cidrsubnets.html cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix.
prefixRequired
- Type: string
newbitsRequired
- Type: number[]
coalesce
import { Fn } from 'cdktf'
Fn.coalesce(value: any[])
{@link https://www.terraform.io/docs/language/functions/coalesce.html coalesce} takes any number of arguments and returns the first one that isn't null or an empty string.
valueRequired
- Type: any[]
Arguments are passed in an array.
coalescelist
import { Fn } from 'cdktf'
Fn.coalescelist(value: any[][])
{@link https://www.terraform.io/docs/language/functions/coalescelist.html coalescelist} takes any number of list arguments and returns the first one that isn't empty.
valueRequired
- Type: any[][]
Arguments are passed in an array.
compact
import { Fn } from 'cdktf'
Fn.compact(value: string[])
{@link https://www.terraform.io/docs/language/functions/compact.html compact} takes a list of strings and returns a new list with any empty string elements removed.
valueRequired
- Type: string[]
concat
import { Fn } from 'cdktf'
Fn.concat(value: any[][])
{@link https://www.terraform.io/docs/language/functions/concat.html concat} takes two or more lists and combines them into a single list.
valueRequired
- Type: any[][]
contains
import { Fn } from 'cdktf'
Fn.contains(list: any[] | IResolvable, value: any)
{@link https://www.terraform.io/docs/language/functions/contains.html contains} determines whether a given list or set contains a given single value as one of its elements.
listRequired
- Type: any[] | IResolvable
valueRequired
- Type: any
csvdecode
import { Fn } from 'cdktf'
Fn.csvdecode(value: string)
{@link https://www.terraform.io/docs/language/functions/csvdecode.html csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data.
valueRequired
- Type: string
dirname
import { Fn } from 'cdktf'
Fn.dirname(value: string)
{@link https://www.terraform.io/docs/language/functions/dirname.html dirname} takes a string containing a filesystem path and removes the last portion from it.
valueRequired
- Type: string
distinct
import { Fn } from 'cdktf'
Fn.distinct(list: any[] | IResolvable)
{@link https://www.terraform.io/docs/language/functions/distinct.html distinct} takes a list and returns a new list with any duplicate elements removed.
listRequired
- Type: any[] | IResolvable
element
import { Fn } from 'cdktf'
Fn.element(list: any[] | IResolvable, index: number)
{@link https://www.terraform.io/docs/language/functions/element.html element} retrieves a single element from a list.
listRequired
- Type: any[] | IResolvable
indexRequired
- Type: number
file
import { Fn } from 'cdktf'
Fn.file(value: string)
{@link https://www.terraform.io/docs/language/functions/file.html file} takes a string containing a filesystem path and removes all except the last portion from it.
valueRequired
- Type: string
filebase64
import { Fn } from 'cdktf'
Fn.filebase64(value: string)
{@link https://www.terraform.io/docs/language/functions/filebase64.html filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string.
valueRequired
- Type: string
filebase64sha256
import { Fn } from 'cdktf'
Fn.filebase64sha256(value: string)
{@link https://www.terraform.io/docs/language/functions/filebase64sha256.html filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string.
valueRequired
- Type: string
filebase64sha512
import { Fn } from 'cdktf'
Fn.filebase64sha512(value: string)
{@link https://www.terraform.io/docs/language/functions/filebase64sha512.html filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string.
valueRequired
- Type: string
fileexists
import { Fn } from 'cdktf'
Fn.fileexists(value: string)
{@link https://www.terraform.io/docs/language/functions/fileexists.html fileexists} determines whether a file exists at a given path.
valueRequired
- Type: string
filemd5
import { Fn } from 'cdktf'
Fn.filemd5(value: string)
{@link https://www.terraform.io/docs/language/functions/filemd5.html filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string.
valueRequired
- Type: string
fileset
import { Fn } from 'cdktf'
Fn.fileset(path: string, pattern: string)
{@link https://www.terraform.io/docs/language/functions/fileset.html fileset} enumerates a set of regular file names given a path and pattern.
pathRequired
- Type: string
patternRequired
- Type: string
filesha1
import { Fn } from 'cdktf'
Fn.filesha1(value: string)
{@link https://www.terraform.io/docs/language/functions/filesha1.html filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string.
valueRequired
- Type: string
filesha256
import { Fn } from 'cdktf'
Fn.filesha256(value: string)
{@link https://www.terraform.io/docs/language/functions/filesha256.html filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string.
valueRequired
- Type: string
filesha512
import { Fn } from 'cdktf'
Fn.filesha512(value: string)
{@link https://www.terraform.io/docs/language/functions/filesha512.html filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string.
valueRequired
- Type: string
flatten
import { Fn } from 'cdktf'
Fn.flatten(list: any[] | IResolvable)
{@link https://www.terraform.io/docs/language/functions/flatten.html flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents.
listRequired
- Type: any[] | IResolvable
floor
import { Fn } from 'cdktf'
Fn.floor(value: number)
{@link https://www.terraform.io/docs/language/functions/floor.html floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction.
valueRequired
- Type: number
format
import { Fn } from 'cdktf'
Fn.format(spec: string, values: any[])
{@link https://www.terraform.io/docs/language/functions/format.html format} produces a string by formatting a number of other values according to a specification string.
specRequired
- Type: string
valuesRequired
- Type: any[]
formatdate
import { Fn } from 'cdktf'
Fn.formatdate(spec: string, timestamp: string)
{@link https://www.terraform.io/docs/language/functions/formatdate.html formatdate} converts a timestamp into a different time format.
specRequired
- Type: string
timestampRequired
- Type: string
formatlist
import { Fn } from 'cdktf'
Fn.formatlist(spec: string, values: any[])
{@link https://www.terraform.io/docs/language/functions/formatlist.html formatlist} produces a list of strings by formatting a number of other values according to a specification string.
specRequired
- Type: string
valuesRequired
- Type: any[]
indent
import { Fn } from 'cdktf'
Fn.indent(indentation: number, value: string)
{@link https://www.terraform.io/docs/language/functions/indent.html indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
indentationRequired
- Type: number
valueRequired
- Type: string
index
import { Fn } from 'cdktf'
Fn.index(list: any[] | IResolvable, value: any)
{@link https://www.terraform.io/docs/language/functions/index.html index} finds the element index for a given value in a list.
listRequired
- Type: any[] | IResolvable
valueRequired
- Type: any
join
import { Fn } from 'cdktf'
Fn.join(separator: string, value: string[])
{@link https://www.terraform.io/docs/language/functions/join.html join} produces a string by concatenating together all elements of a given list of strings with the given delimiter.
separatorRequired
- Type: string
valueRequired
- Type: string[]
jsondecode
import { Fn } from 'cdktf'
Fn.jsondecode(value: string)
{@link https://www.terraform.io/docs/language/functions/jsondecode.html jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string.
valueRequired
- Type: string
jsonencode
import { Fn } from 'cdktf'
Fn.jsonencode(value: any)
{@link https://www.terraform.io/docs/language/functions/jsonencode.html jsonencode} encodes a given value to a string using JSON syntax.
valueRequired
- Type: any
keys
import { Fn } from 'cdktf'
Fn.keys(map: IResolvable | {[ key: string ]: any})
{@link https://www.terraform.io/docs/language/functions/keys.html keys} takes a map and returns a list containing the keys from that map.
mapRequired
- Type: IResolvable | {[ key: string ]: any}
lengthOf
import { Fn } from 'cdktf'
Fn.lengthOf(value: any)
{@link https://www.terraform.io/docs/language/functions/length.html length} determines the length of a given list, map, or string.
valueRequired
- Type: any
log
import { Fn } from 'cdktf'
Fn.log(value: number, base: number)
{@link https://www.terraform.io/docs/language/functions/log.html log} returns the logarithm of a given number in a given base.
valueRequired
- Type: number
baseRequired
- Type: number
lookup
import { Fn } from 'cdktf'
Fn.lookup(value: any, key: any, defaultValue: any)
{@link https://www.terraform.io/docs/language/functions/lookup.html lookup} retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead.
valueRequired
- Type: any
keyRequired
- Type: any
defaultValueRequired
- Type: any
lower
import { Fn } from 'cdktf'
Fn.lower(value: string)
{@link https://www.terraform.io/docs/language/functions/lower.html lower} converts all cased letters in the given string to lowercase.
valueRequired
- Type: string
matchkeys
import { Fn } from 'cdktf'
Fn.matchkeys(valuesList: string | any[] | IResolvable, keysList: string | any[] | IResolvable, searchSet: string | any[] | IResolvable)
{@link https://www.terraform.io/docs/language/functions/matchkeys.html matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list.
valuesListRequired
- Type: string | any[] | IResolvable
keysListRequired
- Type: string | any[] | IResolvable
searchSetRequired
- Type: string | any[] | IResolvable
max
import { Fn } from 'cdktf'
Fn.max(values: number[])
{@link https://www.terraform.io/docs/language/functions/max.html max} takes one or more numbers and returns the greatest number from the set.
valuesRequired
- Type: number[]
md5
import { Fn } from 'cdktf'
Fn.md5(value: string)
{@link https://www.terraform.io/docs/language/functions/md5.html md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits.
valueRequired
- Type: string
mergeLists
import { Fn } from 'cdktf'
Fn.mergeLists(values: any[])
{@link https://www.terraform.io/docs/language/functions/merge.html merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments.
valuesRequired
- Type: any[]
Arguments are passed in an array.
mergeMaps
import { Fn } from 'cdktf'
Fn.mergeMaps(values: any[])
{@link https://www.terraform.io/docs/language/functions/merge.html merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments.
valuesRequired
- Type: any[]
Arguments are passed in an array.
min
import { Fn } from 'cdktf'
Fn.min(values: number[])
{@link https://www.terraform.io/docs/language/functions/min.html min} takes one or more numbers and returns the smallest number from the set.
valuesRequired
- Type: number[]
nonsensitive
import { Fn } from 'cdktf'
Fn.nonsensitive(expression: any)
{@link https://www.terraform.io/docs/language/functions/nonsensitive.html nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value.
expressionRequired
- Type: any
one
import { Fn } from 'cdktf'
Fn.one(list: string | any[] | IResolvable)
{@link https://www.terraform.io/docs/language/functions/one.html one} takes a list, set, or tuple value with either zero or one elements.
listRequired
- Type: string | any[] | IResolvable
parseInt
import { Fn } from 'cdktf'
Fn.parseInt(value: string, base: number)
{@link https://www.terraform.io/docs/language/functions/parseint.html parseInt} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive.
valueRequired
- Type: string
baseRequired
- Type: number
pathexpand
import { Fn } from 'cdktf'
Fn.pathexpand(value: string)
{@link https://www.terraform.io/docs/language/functions/pathexpand.html pathexpand} takes a string containing a filesystem path and removes the last portion from it.
valueRequired
- Type: string
pow
import { Fn } from 'cdktf'
Fn.pow(value: number, power: number)
{@link https://www.terraform.io/docs/language/functions/pow.html pow} calculates an exponent, by raising its first argument to the power of the second argument.
valueRequired
- Type: number
powerRequired
- Type: number
range
import { Fn } from 'cdktf'
Fn.range(start: number, limit: number, step?: number)
{@link https://www.terraform.io/docs/language/functions/range.html range} generates a list of numbers using a start value, a limit value, and a step value.
startRequired
- Type: number
limitRequired
- Type: number
stepOptional
- Type: number
rawString
import { Fn } from 'cdktf'
Fn.rawString(str: string)
Use this function to wrap a string and escape it properly for the use in Terraform This is only needed in certain scenarios (e.g., if you have unescaped double quotes in the string).
strRequired
- Type: string
regex
import { Fn } from 'cdktf'
Fn.regex(pattern: string, value: string)
{@link https://www.terraform.io/docs/language/functions/regex.html regex} applies a regular expression to a string and returns the matching substrings in pattern.
patternRequired
- Type: string
valueRequired
- Type: string
regexall
import { Fn } from 'cdktf'
Fn.regexall(pattern: string, value: string)
{@link https://www.terraform.io/docs/language/functions/regexall.html regexall} applies a regular expression to a string and returns a list of all matches.
patternRequired
- Type: string
valueRequired
- Type: string
replace
import { Fn } from 'cdktf'
Fn.replace(value: string, substring: string, replacement: string)
{@link https://www.terraform.io/docs/language/functions/replace.html replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string.
valueRequired
- Type: string
substringRequired
- Type: string
replacementRequired
- Type: string
reverse
import { Fn } from 'cdktf'
Fn.reverse(values: any[] | IResolvable)
{@link https://www.terraform.io/docs/language/functions/reverse.html reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order.
valuesRequired
- Type: any[] | IResolvable
rsadecrypt
import { Fn } from 'cdktf'
Fn.rsadecrypt(ciphertext: string, privatekey: string)
{@link https://www.terraform.io/docs/language/functions/rsadecrypt.html rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertextRequired
- Type: string
privatekeyRequired
- Type: string
sensitive
import { Fn } from 'cdktf'
Fn.sensitive(expression: any)
{@link https://www.terraform.io/docs/language/functions/sensitive.html sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables.
expressionRequired
- Type: any
setintersection
import { Fn } from 'cdktf'
Fn.setintersection(values: any[])
{@link https://www.terraform.io/docs/language/functions/setintersection.html setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common.
valuesRequired
- Type: any[]
setproduct
import { Fn } from 'cdktf'
Fn.setproduct(values: any[])
{@link https://www.terraform.io/docs/language/functions/setproduct.html setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product.
valuesRequired
- Type: any[]
setsubtract
import { Fn } from 'cdktf'
Fn.setsubtract(minuend: string | any[] | IResolvable, subtrahend: string | any[] | IResolvable)
{@link https://www.terraform.io/docs/language/functions/slice.html setsubtract} function returns a new set containing the elements from the first set that are not present in the second set.
minuendRequired
- Type: string | any[] | IResolvable
subtrahendRequired
- Type: string | any[] | IResolvable
setunion
import { Fn } from 'cdktf'
Fn.setunion(values: any[])
{@link https://www.terraform.io/docs/language/functions/setunion.html setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets.
valuesRequired
- Type: any[]
Arguments are passed in an array.
sha1
import { Fn } from 'cdktf'
Fn.sha1(value: string)
{@link https://www.terraform.io/docs/language/functions/sha1.html sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
valueRequired
- Type: string
sha256
import { Fn } from 'cdktf'
Fn.sha256(value: string)
{@link https://www.terraform.io/docs/language/functions/sha256.html sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
valueRequired
- Type: string
sha512
import { Fn } from 'cdktf'
Fn.sha512(value: string)
{@link https://www.terraform.io/docs/language/functions/sha512.html sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
valueRequired
- Type: string
signum
import { Fn } from 'cdktf'
Fn.signum(value: number)
{@link https://www.terraform.io/docs/language/functions/signum.html signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign.
valueRequired
- Type: number
slice
import { Fn } from 'cdktf'
Fn.slice(list: string | any[] | IResolvable, startindex: number, endindex: number)
{@link https://www.terraform.io/docs/language/functions/slice.html slice} extracts some consecutive elements from within a list.
listRequired
- Type: string | any[] | IResolvable
startindexRequired
- Type: number
endindexRequired
- Type: number
sort
import { Fn } from 'cdktf'
Fn.sort(list: string | any[] | IResolvable)
{@link https://www.terraform.io/docs/language/functions/sort.html sort} takes a list of strings and returns a new list with those strings sorted lexicographically.
listRequired
- Type: string | any[] | IResolvable
split
import { Fn } from 'cdktf'
Fn.split(seperator: string, value: string)
{@link https://www.terraform.io/docs/language/functions/split.html split} produces a list by dividing a given string at all occurrences of a given separator.
seperatorRequired
- Type: string
valueRequired
- Type: string
strrev
import { Fn } from 'cdktf'
Fn.strrev(value: string)
{@link https://www.terraform.io/docs/language/functions/strrev.html strrev} reverses the characters in a string.
valueRequired
- Type: string
substr
import { Fn } from 'cdktf'
Fn.substr(value: string, offset: number, length: number)
{@link https://www.terraform.io/docs/language/functions/substr.html substr} extracts a substring from a given string by offset and length.
valueRequired
- Type: string
offsetRequired
- Type: number
lengthRequired
- Type: number
sum
import { Fn } from 'cdktf'
Fn.sum(list: string | any[] | IResolvable)
{@link https://www.terraform.io/docs/language/functions/sum.html sum} takes a list or set of numbers and returns the sum of those numbers.
listRequired
- Type: string | any[] | IResolvable
templatefile
import { Fn } from 'cdktf'
Fn.templatefile(path: string, vars: any)
{@link https://www.terraform.io/docs/language/functions/templatefile.html templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables.
pathRequired
- Type: string
varsRequired
- Type: any
textdecodebase64
import { Fn } from 'cdktf'
Fn.textdecodebase64(value: string, encodingName: string)
{@link https://www.terraform.io/docs/language/functions/textdecodebase64.html textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding.
valueRequired
- Type: string
encodingNameRequired
- Type: string
textencodebase64
import { Fn } from 'cdktf'
Fn.textencodebase64(value: string, encodingName: string)
{@link https://www.terraform.io/docs/language/functions/textencodebase64.html textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters.
valueRequired
- Type: string
encodingNameRequired
- Type: string
timeadd
import { Fn } from 'cdktf'
Fn.timeadd(timestamp: string, duration: string)
{@link https://www.terraform.io/docs/language/functions/timeadd.html timeadd} adds a duration to a timestamp, returning a new timestamp.
timestampRequired
- Type: string
durationRequired
- Type: string
timestamp
import { Fn } from "cdktf";
Fn.timestamp();
{@link https://www.terraform.io/docs/language/functions/timestamp.html timestamp} returns a UTC timestamp string in RFC 3339 format.
title
import { Fn } from 'cdktf'
Fn.title(value: string)
{@link https://www.terraform.io/docs/language/functions/title.html title} converts the first letter of each word in the given string to uppercase.
valueRequired
- Type: string
tobool
import { Fn } from 'cdktf'
Fn.tobool(expression: any)
{@link https://www.terraform.io/docs/language/functions/tobool.html tobool} converts its argument to a boolean value.
expressionRequired
- Type: any
tolist
import { Fn } from 'cdktf'
Fn.tolist(expression: any)
{@link https://www.terraform.io/docs/language/functions/tolist.html tolist} converts its argument to a list value.
expressionRequired
- Type: any
tomap
import { Fn } from 'cdktf'
Fn.tomap(expression: any)
{@link https://www.terraform.io/docs/language/functions/tomap.html tomap} converts its argument to a map value.
expressionRequired
- Type: any
tonumber
import { Fn } from 'cdktf'
Fn.tonumber(expression: any)
{@link https://www.terraform.io/docs/language/functions/tonumber.html tonumber} converts its argument to a number value.
expressionRequired
- Type: any
toset
import { Fn } from 'cdktf'
Fn.toset(expression: any)
{@link https://www.terraform.io/docs/language/functions/toset.html toset} converts its argument to a set value.
expressionRequired
- Type: any
tostring
import { Fn } from 'cdktf'
Fn.tostring(expression: any)
{@link https://www.terraform.io/docs/language/functions/tostring.html tostring} converts its argument to a string value.
expressionRequired
- Type: any
transpose
import { Fn } from 'cdktf'
Fn.transpose(value: any)
{@link https://www.terraform.io/docs/language/functions/transpose.html transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings.
valueRequired
- Type: any
trim
import { Fn } from 'cdktf'
Fn.trim(value: string, replacement: string)
{@link https://www.terraform.io/docs/language/functions/trim.html trim} removes the specified characters from the start and end of the given string.
valueRequired
- Type: string
replacementRequired
- Type: string
trimprefix
import { Fn } from 'cdktf'
Fn.trimprefix(value: string, prefix: string)
{@link https://www.terraform.io/docs/language/functions/trimprefix.html trimprefix} removes the specified prefix from the start of the given string.
valueRequired
- Type: string
prefixRequired
- Type: string
trimspace
import { Fn } from 'cdktf'
Fn.trimspace(value: string)
{@link https://www.terraform.io/docs/language/functions/trimspace.html trimspace} removes any space characters from the start and end of the given string.
valueRequired
- Type: string
trimsuffix
import { Fn } from 'cdktf'
Fn.trimsuffix(value: string, suffix: string)
{@link https://www.terraform.io/docs/language/functions/trimsuffix.html trimsuffix} removes the specified suffix from the end of the given string.
valueRequired
- Type: string
suffixRequired
- Type: string
try
import { Fn } from 'cdktf'
Fn.try(expression: any[])
{@link https://www.terraform.io/docs/language/functions/try.html try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors.
expressionRequired
- Type: any[]
upper
import { Fn } from 'cdktf'
Fn.upper(value: string)
{@link https://www.terraform.io/docs/language/functions/upper.html upper} converts all cased letters in the given string to uppercase.
valueRequired
- Type: string
urlencode
import { Fn } from 'cdktf'
Fn.urlencode(value: string)
{@link https://www.terraform.io/docs/language/functions/urlencode.html urlencode} applies URL encoding to a given string.
valueRequired
- Type: string
uuid
import { Fn } from "cdktf";
Fn.uuid();
{@link https://www.terraform.io/docs/language/functions/uuid.html uuid} generates a unique identifier string.
uuidv5
import { Fn } from 'cdktf'
Fn.uuidv5(namespace: string, name: string)
{@link https://www.terraform.io/docs/language/functions/uuidv5.html uuidv5} generates a unique identifier string.
namespaceRequired
- Type: string
nameRequired
- Type: string
values
import { Fn } from 'cdktf'
Fn.values(value: any)
{@link https://www.terraform.io/docs/language/functions/values.html values} takes a map and returns a list containing the values of the elements in that map.
valueRequired
- Type: any
yamldecode
import { Fn } from 'cdktf'
Fn.yamldecode(value: string)
{@link https://www.terraform.io/docs/language/functions/yamldecode.html yamldecode} parses a string as a subset of YAML, and produces a representation of its value.
valueRequired
- Type: string
yamlencode
import { Fn } from 'cdktf'
Fn.yamlencode(value: any)
{@link https://www.terraform.io/docs/language/functions/yamlencode.html yamlencode} encodes a given value to a string using JSON syntax.
valueRequired
- Type: any
zipmap
import { Fn } from 'cdktf'
Fn.zipmap(keyslist: any[] | IResolvable, valueslist: any[] | IResolvable)
{@link https://www.terraform.io/docs/language/functions/zipmap.html zipmap} constructs a map from a list of keys and a corresponding list of values.
keyslistRequired
- Type: any[] | IResolvable
valueslistRequired
- Type: any[] | IResolvable
Lazy
Lazily produce a value.
Can be used to return a string, list or numeric value whose actual value will only be calculated later, during synthesis.
Initializers
import { Lazy } from "cdktf";
new Lazy();
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
anyValue | Produces a lazy token from an untyped value. |
listValue | Returns a list-ified token for a lazy value. |
numberValue | Returns a numberified token for a lazy value. |
stringValue | Returns a stringified token for a lazy value. |
anyValue
import { Lazy } from 'cdktf'
Lazy.anyValue(producer: IAnyProducer, options?: LazyAnyValueOptions)
Produces a lazy token from an untyped value.
producerRequired
- Type: IAnyProducer
The lazy producer.
optionsOptional
- Type: LazyAnyValueOptions
Options.
listValue
import { Lazy } from 'cdktf'
Lazy.listValue(producer: IListProducer, options?: LazyListValueOptions)
Returns a list-ified token for a lazy value.
producerRequired
- Type: IListProducer
The producer.
optionsOptional
- Type: LazyListValueOptions
Options.
numberValue
import { Lazy } from 'cdktf'
Lazy.numberValue(producer: INumberProducer)
Returns a numberified token for a lazy value.
producerRequired
- Type: INumberProducer
The producer.
stringValue
import { Lazy } from 'cdktf'
Lazy.stringValue(producer: IStringProducer, options?: LazyStringValueOptions)
Returns a stringified token for a lazy value.
producerRequired
- Type: IStringProducer
The producer.
optionsOptional
- Type: LazyStringValueOptions
Options.
LazyBase
- Implements: IResolvable
Initializers
import { LazyBase } from "cdktf";
new LazyBase();
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
addPostProcessor | No description. |
resolve | Produce the Token's value at resolution time. |
toJSON | Turn this Token into JSON. |
toString | Return a string representation of this resolvable object. |
addPostProcessor
public addPostProcessor(postProcessor: IPostProcessor): void
postProcessorRequired
- Type: IPostProcessor
resolve
public resolve(context: IResolveContext): any
Produce the Token's value at resolution time.
contextRequired
- Type: IResolveContext
toJSON
public toJSON(): any
Turn this Token into JSON.
Called automatically when JSON.stringify() is called on a Token.
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
ListTerraformIterator
Initializers
import { ListTerraformIterator } from 'cdktf'
new ListTerraformIterator(list: string[] | IResolvable | number[] | ComplexList | StringMapList | NumberMapList | BooleanMapList | AnyMapList | boolean | IResolvable[])
| Name | Type | Description |
|---|---|---|
list | string[] | IResolvable | number[] | ComplexList | StringMapList | NumberMapList | BooleanMapList | AnyMapList | boolean | IResolvable[] | No description. |
listRequired
- Type: string[] | IResolvable | number[] | ComplexList | StringMapList | NumberMapList | BooleanMapList | AnyMapList | boolean | IResolvable[]
Methods
| Name | Description |
|---|---|
dynamic | No description. |
getAny | No description. |
getAnyMap | No description. |
getBoolean | No description. |
getBooleanMap | No description. |
getList | No description. |
getMap | No description. |
getNumber | No description. |
getNumberList | No description. |
getNumberMap | No description. |
getString | No description. |
getStringMap | No description. |
dynamic
public dynamic(attributes: {[ key: string ]: any}): IResolvable
attributesRequired
- Type: {[ key: string ]: any}
getAny
public getAny(attribute: string): IResolvable
attributeRequired
- Type: string
name of the property to retrieve.
getAnyMap
public getAnyMap(attribute: string): {[ key: string ]: any}
attributeRequired
- Type: string
name of the property to retrieve.
getBoolean
public getBoolean(attribute: string): IResolvable
attributeRequired
- Type: string
name of the property to retrieve.
getBooleanMap
public getBooleanMap(attribute: string): {[ key: string ]: boolean}
attributeRequired
- Type: string
name of the property to retrieve.
getList
public getList(attribute: string): string[]
attributeRequired
- Type: string
name of the property to retrieve.
getMap
public getMap(attribute: string): {[ key: string ]: any}
attributeRequired
- Type: string
name of the property to retrieve.
getNumber
public getNumber(attribute: string): number
attributeRequired
- Type: string
name of the property to retrieve.
getNumberList
public getNumberList(attribute: string): number[]
attributeRequired
- Type: string
name of the property to retrieve.
getNumberMap
public getNumberMap(attribute: string): {[ key: string ]: number}
attributeRequired
- Type: string
name of the property to retrieve.
getString
public getString(attribute: string): string
attributeRequired
- Type: string
name of the property to retrieve.
getStringMap
public getStringMap(attribute: string): {[ key: string ]: string}
attributeRequired
- Type: string
name of the property to retrieve.
Static Functions
fromList
import { ListTerraformIterator } from 'cdktf'
ListTerraformIterator.fromList(list: string[] | IResolvable | number[] | ComplexList | StringMapList | NumberMapList | BooleanMapList | AnyMapList | boolean | IResolvable[])
Creates a new iterator from a list.
listRequired
- Type: string[] | IResolvable | number[] | ComplexList | StringMapList | NumberMapList | BooleanMapList | AnyMapList | boolean | IResolvable[]
fromMap
import { ListTerraformIterator } from 'cdktf'
ListTerraformIterator.fromMap(map: ComplexMap | {[ key: string ]: any} | {[ key: string ]: string} | {[ key: string ]: number} | {[ key: string ]: boolean})
Creates a new iterator from a map.
mapRequired
- Type: ComplexMap | {[ key: string ]: any} | {[ key: string ]: string} | {[ key: string ]: number} | {[ key: string ]: boolean}
Properties
| Name | Type | Description |
|---|---|---|
key | any | Returns the currenty entry in the list or set that is being iterated over. |
value | any | Returns the value of the current item iterated over. |
keyRequired
public readonly key: any;
- Type: any
Returns the currenty entry in the list or set that is being iterated over.
For lists this is the same as iterator.value. If you need the index,
use count using the escape hatch:
https://www.terraform.io/cdktf/concepts/resources#escape-hatch
valueRequired
public readonly value: any;
- Type: any
Returns the value of the current item iterated over.
Manifest
- Implements: IManifest
Initializers
import { Manifest } from 'cdktf'
new Manifest(version: string, outdir: string)
versionRequired
- Type: string
outdirRequired
- Type: string
Methods
| Name | Description |
|---|---|
buildManifest | No description. |
forStack | No description. |
writeToFile | No description. |
buildManifest
public buildManifest(): IManifest
forStack
public forStack(stack: TerraformStack): StackManifest
stackRequired
- Type: TerraformStack
writeToFile
public writeToFile(): void
Properties
| Name | Type | Description |
|---|---|---|
outdir | string | No description. |
stacks | {[ key: string ]: StackManifest} | No description. |
version | string | No description. |
outdirRequired
public readonly outdir: string;
- Type: string
stacksRequired
public readonly stacks: {[ key: string ]: StackManifest};
- Type: {[ key: string ]: StackManifest}
versionRequired
public readonly version: string;
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
fileName | string | No description. |
stackFileName | string | No description. |
stacksFolder | string | No description. |
fileNameRequired
public readonly fileName: string;
- Type: string
stackFileNameRequired
public readonly stackFileName: string;
- Type: string
stacksFolderRequired
public readonly stacksFolder: string;
- Type: string
MapTerraformIterator
Initializers
import { MapTerraformIterator } from 'cdktf'
new MapTerraformIterator(map: StringMap | NumberMap | BooleanMap | AnyMap | ComplexMap | {[ key: string ]: any} | {[ key: string ]: string} | {[ key: string ]: number})
| Name | Type | Description |
|---|---|---|
map | StringMap | NumberMap | BooleanMap | AnyMap | ComplexMap | {[ key: string ]: any} | {[ key: string ]: string} | {[ key: string ]: number} | No description. |
mapRequired
- Type: StringMap | NumberMap | BooleanMap | AnyMap | ComplexMap | {[ key: string ]: any} | {[ key: string ]: string} | {[ key: string ]: number}
Methods
| Name | Description |
|---|---|
dynamic | No description. |
getAny | No description. |
getAnyMap | No description. |
getBoolean | No description. |
getBooleanMap | No description. |
getList | No description. |
getMap | No description. |
getNumber | No description. |
getNumberList | No description. |
getNumberMap | No description. |
getString | No description. |
getStringMap | No description. |
dynamic
public dynamic(attributes: {[ key: string ]: any}): IResolvable
attributesRequired
- Type: {[ key: string ]: any}
getAny
public getAny(attribute: string): IResolvable
attributeRequired
- Type: string
name of the property to retrieve.
getAnyMap
public getAnyMap(attribute: string): {[ key: string ]: any}
attributeRequired
- Type: string
name of the property to retrieve.
getBoolean
public getBoolean(attribute: string): IResolvable
attributeRequired
- Type: string
name of the property to retrieve.
getBooleanMap
public getBooleanMap(attribute: string): {[ key: string ]: boolean}
attributeRequired
- Type: string
name of the property to retrieve.
getList
public getList(attribute: string): string[]
attributeRequired
- Type: string
name of the property to retrieve.
getMap
public getMap(attribute: string): {[ key: string ]: any}
attributeRequired
- Type: string
name of the property to retrieve.
getNumber
public getNumber(attribute: string): number
attributeRequired
- Type: string
name of the property to retrieve.
getNumberList
public getNumberList(attribute: string): number[]
attributeRequired
- Type: string
name of the property to retrieve.
getNumberMap
public getNumberMap(attribute: string): {[ key: string ]: number}
attributeRequired
- Type: string
name of the property to retrieve.
getString
public getString(attribute: string): string
attributeRequired
- Type: string
name of the property to retrieve.
getStringMap
public getStringMap(attribute: string): {[ key: string ]: string}
attributeRequired
- Type: string
name of the property to retrieve.
Static Functions
fromList
import { MapTerraformIterator } from 'cdktf'
MapTerraformIterator.fromList(list: string[] | IResolvable | number[] | ComplexList | StringMapList | NumberMapList | BooleanMapList | AnyMapList | boolean | IResolvable[])
Creates a new iterator from a list.
listRequired
- Type: string[] | IResolvable | number[] | ComplexList | StringMapList | NumberMapList | BooleanMapList | AnyMapList | boolean | IResolvable[]
fromMap
import { MapTerraformIterator } from 'cdktf'
MapTerraformIterator.fromMap(map: ComplexMap | {[ key: string ]: any} | {[ key: string ]: string} | {[ key: string ]: number} | {[ key: string ]: boolean})
Creates a new iterator from a map.
mapRequired
- Type: ComplexMap | {[ key: string ]: any} | {[ key: string ]: string} | {[ key: string ]: number} | {[ key: string ]: boolean}
Properties
| Name | Type | Description |
|---|---|---|
key | string | Returns the key of the current entry in the map that is being iterated over. |
value | any | Returns the value of the current item iterated over. |
keyRequired
public readonly key: string;
- Type: string
Returns the key of the current entry in the map that is being iterated over.
valueRequired
public readonly value: any;
- Type: any
Returns the value of the current item iterated over.
NamedCloudWorkspace
The name of a single Terraform Cloud workspace.
You will only be able to use the workspace specified in the configuration with this working directory, and cannot manage workspaces from the CLI (e.g. terraform workspace select or terraform workspace new).
Initializers
import { NamedCloudWorkspace } from 'cdktf'
new NamedCloudWorkspace(name: string)
| Name | Type | Description |
|---|---|---|
name | string | No description. |
nameRequired
- Type: string
Methods
| Name | Description |
|---|---|
toTerraform | No description. |
toTerraform
public toTerraform(): any
Properties
| Name | Type | Description |
|---|---|---|
name | string | No description. |
nameRequired
public readonly name: string;
- Type: string
NamedRemoteWorkspace
- Implements: IRemoteWorkspace
Initializers
import { NamedRemoteWorkspace } from 'cdktf'
new NamedRemoteWorkspace(name: string)
| Name | Type | Description |
|---|---|---|
name | string | No description. |
nameRequired
- Type: string
Properties
| Name | Type | Description |
|---|---|---|
name | string | No description. |
nameRequired
public readonly name: string;
- Type: string
NumberMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import { NumberMap } from 'cdktf'
new NumberMap(terraformResource: IInterpolatingParent, terraformAttribute: string)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
lookup
public lookup(key: string): number
keyRequired
- Type: string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
NumberMapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
import { NumberMapList } from 'cdktf'
new NumberMapList(terraformResource: IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
wrapsSet | boolean | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
wrapsSetRequired
- Type: boolean
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
get | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
get
public get(index: number): NumberMap
indexRequired
- Type: number
interpolationForAttribute
public interpolationForAttribute(property: string): IResolvable
propertyRequired
- Type: string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
PrefixedRemoteWorkspaces
- Implements: IRemoteWorkspace
Initializers
import { PrefixedRemoteWorkspaces } from 'cdktf'
new PrefixedRemoteWorkspaces(prefix: string)
| Name | Type | Description |
|---|---|---|
prefix | string | No description. |
prefixRequired
- Type: string
Properties
| Name | Type | Description |
|---|---|---|
prefix | string | No description. |
prefixRequired
public readonly prefix: string;
- Type: string
StringConcat
- Implements: IFragmentConcatenator
Converts all fragments to strings and concats those.
Drops 'undefined's.
Initializers
import { StringConcat } from "cdktf";
new StringConcat();
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
join | Concatenates string fragments. |
join
public join(left: any, right: any): any
Concatenates string fragments.
leftRequired
- Type: any
rightRequired
- Type: any
StringMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import { StringMap } from 'cdktf'
new StringMap(terraformResource: IInterpolatingParent, terraformAttribute: string)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
lookup
public lookup(key: string): string
keyRequired
- Type: string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
StringMapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
import { StringMapList } from 'cdktf'
new StringMapList(terraformResource: IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean)
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | string | No description. |
wrapsSet | boolean | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: string
wrapsSetRequired
- Type: boolean
Methods
| Name | Description |
|---|---|
computeFqn | No description. |
get | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public computeFqn(): string
get
public get(index: number): StringMap
indexRequired
- Type: number
interpolationForAttribute
public interpolationForAttribute(property: string): IResolvable
propertyRequired
- Type: string
resolve
public resolve(_context: IResolveContext): any
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | string | No description. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqnRequired
public readonly fqn: string;
- Type: string
TaggedCloudWorkspaces
A set of Terraform Cloud workspace tags.
You will be able to use this working directory with any workspaces that have all of the specified tags, and can use the terraform workspace commands to switch between them or create new workspaces. New workspaces will automatically have the specified tags. This option conflicts with name.
Initializers
import { TaggedCloudWorkspaces } from 'cdktf'
new TaggedCloudWorkspaces(tags: string[])
| Name | Type | Description |
|---|---|---|
tags | string[] | No description. |
tagsRequired
- Type: string[]
Methods
| Name | Description |
|---|---|
toTerraform | No description. |
toTerraform
public toTerraform(): any
Properties
| Name | Type | Description |
|---|---|---|
tags | string[] | No description. |
tagsRequired
public readonly tags: string[];
- Type: string[]
TerraformIterator
- Implements: ITerraformIterator
Initializers
import { TerraformIterator } from "cdktf";
new TerraformIterator();
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
dynamic | No description. |
getAny | No description. |
getAnyMap | No description. |
getBoolean | No description. |
getBooleanMap | No description. |
getList | No description. |
getMap | No description. |
getNumber | No description. |
getNumberList | No description. |
getNumberMap | No description. |
getString | No description. |
getStringMap | No description. |
dynamic
public dynamic(attributes: {[ key: string ]: any}): IResolvable
attributesRequired
- Type: {[ key: string ]: any}
getAny
public getAny(attribute: string): IResolvable
attributeRequired
- Type: string
name of the property to retrieve.
getAnyMap
public getAnyMap(attribute: string): {[ key: string ]: any}
attributeRequired
- Type: string
name of the property to retrieve.
getBoolean
public getBoolean(attribute: string): IResolvable
attributeRequired
- Type: string
name of the property to retrieve.
getBooleanMap
public getBooleanMap(attribute: string): {[ key: string ]: boolean}
attributeRequired
- Type: string
name of the property to retrieve.
getList
public getList(attribute: string): string[]
attributeRequired
- Type: string
name of the property to retrieve.
getMap
public getMap(attribute: string): {[ key: string ]: any}
attributeRequired
- Type: string
name of the property to retrieve.
getNumber
public getNumber(attribute: string): number
attributeRequired
- Type: string
name of the property to retrieve.
getNumberList
public getNumberList(attribute: string): number[]
attributeRequired
- Type: string
name of the property to retrieve.
getNumberMap
public getNumberMap(attribute: string): {[ key: string ]: number}
attributeRequired
- Type: string
name of the property to retrieve.
getString
public getString(attribute: string): string
attributeRequired
- Type: string
name of the property to retrieve.
getStringMap
public getStringMap(attribute: string): {[ key: string ]: string}
attributeRequired
- Type: string
name of the property to retrieve.
Static Functions
fromList
import { TerraformIterator } from 'cdktf'
TerraformIterator.fromList(list: string[] | IResolvable | number[] | ComplexList | StringMapList | NumberMapList | BooleanMapList | AnyMapList | boolean | IResolvable[])
Creates a new iterator from a list.
listRequired
- Type: string[] | IResolvable | number[] | ComplexList | StringMapList | NumberMapList | BooleanMapList | AnyMapList | boolean | IResolvable[]
fromMap
import { TerraformIterator } from 'cdktf'
TerraformIterator.fromMap(map: ComplexMap | {[ key: string ]: any} | {[ key: string ]: string} | {[ key: string ]: number} | {[ key: string ]: boolean})
Creates a new iterator from a map.
mapRequired
- Type: ComplexMap | {[ key: string ]: any} | {[ key: string ]: string} | {[ key: string ]: number} | {[ key: string ]: boolean}
TerraformSelf
Expressions in connection blocks cannot refer to their parent resource by name.
References create dependencies, and referring to a resource by name within its own block would create a dependency cycle. Instead, expressions can use the self object, which represents the connection's parent resource and has all of that resource's attributes. For example, use self.public_ip to reference an aws_instance's public_ip attribute.
Initializers
import { TerraformSelf } from "cdktf";
new TerraformSelf();
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
getAny | Only usable within a connection block to reference the connections parent resource. |
getNumber | Only usable within a connection block to reference the connections parent resource. |
getString | Only usable within a connection block to reference the connections parent resource. |
getAny
import { TerraformSelf } from 'cdktf'
TerraformSelf.getAny(key: string)
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getAny("hostPort")
keyRequired
- Type: string
getNumber
import { TerraformSelf } from 'cdktf'
TerraformSelf.getNumber(key: string)
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getNumber("hostPort")
keyRequired
- Type: string
getString
import { TerraformSelf } from 'cdktf'
TerraformSelf.getString(key: string)
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getString("publicIp")
keyRequired
- Type: string
Testing
Testing utilities for cdktf applications.
Initializers
import { Testing } from "cdktf";
new Testing();
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
app | Returns an app for testing with the following properties: - Output directory is a temp dir. |
enableFutureFlags | No description. |
fakeCdktfJsonPath | No description. |
fullSynth | No description. |
renderConstructTree | No description. |
setupJest | No description. |
stubVersion | No description. |
synth | Returns the Terraform synthesized JSON. |
synthScope | No description. |
toBeValidTerraform | No description. |
toHaveDataSource | No description. |
toHaveDataSourceWithProperties | No description. |
toHaveResource | No description. |
toHaveResourceWithProperties | No description. |
app
import { Testing } from 'cdktf'
Testing.app(options?: TestingAppOptions)
Returns an app for testing with the following properties: - Output directory is a temp dir.
optionsOptional
- Type: TestingAppOptions
enableFutureFlags
import { Testing } from 'cdktf'
Testing.enableFutureFlags(app: App)
appRequired
- Type: App
fakeCdktfJsonPath
import { Testing } from 'cdktf'
Testing.fakeCdktfJsonPath(app: App)
appRequired
- Type: App
fullSynth
import { Testing } from 'cdktf'
Testing.fullSynth(stack: TerraformStack)
stackRequired
- Type: TerraformStack
renderConstructTree
import { Testing } from 'cdktf'
Testing.renderConstructTree(construct: IConstruct)
constructRequired
- Type: constructs.IConstruct
setupJest
import { Testing } from "cdktf";
Testing.setupJest();
stubVersion
import { Testing } from 'cdktf'
Testing.stubVersion(app: App)
appRequired
- Type: App
synth
import { Testing } from 'cdktf'
Testing.synth(stack: TerraformStack, runValidations?: boolean)
Returns the Terraform synthesized JSON.
stackRequired
- Type: TerraformStack
runValidationsOptional
- Type: boolean
synthScope
import { Testing } from 'cdktf'
Testing.synthScope(fn: IScopeCallback)
fnRequired
- Type: IScopeCallback
toBeValidTerraform
import { Testing } from 'cdktf'
Testing.toBeValidTerraform(received: string)
receivedRequired
- Type: string
toHaveDataSource
import { Testing } from 'cdktf'
Testing.toHaveDataSource(received: string, resourceType: string)
receivedRequired
- Type: string
resourceTypeRequired
- Type: string
toHaveDataSourceWithProperties
import { Testing } from 'cdktf'
Testing.toHaveDataSourceWithProperties(received: string, resourceType: string, properties?: {[ key: string ]: any})
receivedRequired
- Type: string
resourceTypeRequired
- Type: string
propertiesOptional
- Type: {[ key: string ]: any}
toHaveResource
import { Testing } from 'cdktf'
Testing.toHaveResource(received: string, resourceType: string)
receivedRequired
- Type: string
resourceTypeRequired
- Type: string
toHaveResourceWithProperties
import { Testing } from 'cdktf'
Testing.toHaveResourceWithProperties(received: string, resourceType: string, properties?: {[ key: string ]: any})
receivedRequired
- Type: string
resourceTypeRequired
- Type: string
propertiesOptional
- Type: {[ key: string ]: any}
Token
Represents a special or lazily-evaluated value.
Can be used to delay evaluation of a certain value in case, for example, that it requires some context or late-bound data. Can also be used to mark values that need special processing at document rendering time.
Tokens can be embedded into strings while retaining their original semantics.
Initializers
import { Token } from "cdktf";
new Token();
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
asAny | Return a resolvable representation of the given value. |
asAnyMap | Return a reversible map representation of this token. |
asBooleanMap | Return a reversible map representation of this token. |
asList | Return a reversible list representation of this token. |
asMap | Return a reversible map representation of this token. |
asNumber | Return a reversible number representation of this token. |
asNumberList | Return a reversible list representation of this token. |
asNumberMap | Return a reversible map representation of this token. |
asString | Return a reversible string representation of this token. |
asStringMap | Return a reversible map representation of this token. |
isUnresolved | Returns true if obj represents an unresolved value. |
asAny
import { Token } from 'cdktf'
Token.asAny(value: any)
Return a resolvable representation of the given value.
valueRequired
- Type: any
asAnyMap
import { Token } from 'cdktf'
Token.asAnyMap(value: any, options?: EncodingOptions)
Return a reversible map representation of this token.
valueRequired
- Type: any
optionsOptional
- Type: EncodingOptions
asBooleanMap
import { Token } from 'cdktf'
Token.asBooleanMap(value: any, options?: EncodingOptions)
Return a reversible map representation of this token.
valueRequired
- Type: any
optionsOptional
- Type: EncodingOptions
asList
import { Token } from 'cdktf'
Token.asList(value: any, options?: EncodingOptions)
Return a reversible list representation of this token.
valueRequired
- Type: any
optionsOptional
- Type: EncodingOptions
asMap
import { Token } from 'cdktf'
Token.asMap(value: any, mapValue: any, options?: EncodingOptions)
Return a reversible map representation of this token.
valueRequired
- Type: any
mapValueRequired
- Type: any
optionsOptional
- Type: EncodingOptions
asNumber
import { Token } from 'cdktf'
Token.asNumber(value: any)
Return a reversible number representation of this token.
valueRequired
- Type: any
asNumberList
import { Token } from 'cdktf'
Token.asNumberList(value: any)
Return a reversible list representation of this token.
valueRequired
- Type: any
asNumberMap
import { Token } from 'cdktf'
Token.asNumberMap(value: any, options?: EncodingOptions)
Return a reversible map representation of this token.
valueRequired
- Type: any
optionsOptional
- Type: EncodingOptions
asString
import { Token } from 'cdktf'
Token.asString(value: any, options?: EncodingOptions)
Return a reversible string representation of this token.
If the Token is initialized with a literal, the stringified value of the literal is returned. Otherwise, a special quoted string representation of the Token is returned that can be embedded into other strings.
Strings with quoted Tokens in them can be restored back into
complex values with the Tokens restored by calling resolve()
on the string.
valueRequired
- Type: any
optionsOptional
- Type: EncodingOptions
asStringMap
import { Token } from 'cdktf'
Token.asStringMap(value: any, options?: EncodingOptions)
Return a reversible map representation of this token.
valueRequired
- Type: any
optionsOptional
- Type: EncodingOptions
isUnresolved
import { Token } from 'cdktf'
Token.isUnresolved(obj: any)
Returns true if obj represents an unresolved value.
One of these must be true:
objis an IResolvableobjis a string containing at least one encodedIResolvableobjis either an encoded number or list
This does NOT recurse into lists or objects to see if they containing resolvables.
objRequired
- Type: any
The object to test.
Constants
| Name | Type | Description |
|---|---|---|
ANY_MAP_TOKEN_VALUE | string | Any map token representation. |
NUMBER_MAP_TOKEN_VALUE | number | Number Map token value representation. |
STRING_MAP_TOKEN_VALUE | string | String Map token value representation. |
ANY_MAP_TOKEN_VALUERequired
public readonly ANY_MAP_TOKEN_VALUE: string;
- Type: string
Any map token representation.
NUMBER_MAP_TOKEN_VALUERequired
public readonly NUMBER_MAP_TOKEN_VALUE: number;
- Type: number
Number Map token value representation.
STRING_MAP_TOKEN_VALUERequired
public readonly STRING_MAP_TOKEN_VALUE: string;
- Type: string
String Map token value representation.
Tokenization
Less oft-needed functions to manipulate Tokens.
Initializers
import { Tokenization } from "cdktf";
new Tokenization();
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
isResolvable | Return whether the given object is an IResolvable object. |
resolve | Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays. |
reverse | Reverse any value into Resolvables, if possible. |
reverseList | Un-encode a Tokenized value from a list. |
reverseMap | Un-encode a Tokenized value from a map. |
reverseNumber | Un-encode a Tokenized value from a number. |
reverseNumberList | Un-encode a Tokenized value from a list. |
reverseString | Un-encode a string potentially containing encoded tokens. |
stringifyNumber | Stringify a number directly or lazily if it's a Token. |
isResolvable
import { Tokenization } from 'cdktf'
Tokenization.isResolvable(obj: any)
Return whether the given object is an IResolvable object.
This is different from Token.isUnresolved() which will also check for encoded Tokens, whereas this method will only do a type check on the given object.
objRequired
- Type: any
resolve
import { Tokenization } from 'cdktf'
Tokenization.resolve(obj: any, options: ResolveOptions)
Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays.
Values can only be primitives, arrays or tokens. Other objects (i.e. with methods) will be rejected.
objRequired
- Type: any
The object to resolve.
optionsRequired
- Type: ResolveOptions
Prefix key path components for diagnostics.
reverse
import { Tokenization } from 'cdktf'
Tokenization.reverse(x: any)
Reverse any value into Resolvables, if possible.
xRequired
- Type: any
reverseList
import { Tokenization } from 'cdktf'
Tokenization.reverseList(l: string[])
Un-encode a Tokenized value from a list.
lRequired
- Type: string[]
reverseMap
import { Tokenization } from 'cdktf'
Tokenization.reverseMap(m: {[ key: string ]: any})
Un-encode a Tokenized value from a map.
mRequired
- Type: {[ key: string ]: any}
reverseNumber
import { Tokenization } from 'cdktf'
Tokenization.reverseNumber(n: number)
Un-encode a Tokenized value from a number.
nRequired
- Type: number
reverseNumberList
import { Tokenization } from 'cdktf'
Tokenization.reverseNumberList(l: number[])
Un-encode a Tokenized value from a list.
lRequired
- Type: number[]
reverseString
import { Tokenization } from 'cdktf'
Tokenization.reverseString(s: string)
Un-encode a string potentially containing encoded tokens.
sRequired
- Type: string
stringifyNumber
import { Tokenization } from 'cdktf'
Tokenization.stringifyNumber(x: number)
Stringify a number directly or lazily if it's a Token.
If it is an object (i.e., { Ref: 'SomeLogicalId' }), return it as-is.
xRequired
- Type: number
TokenizedStringFragments
Fragments of a concatenated string containing stringified Tokens.
Initializers
import { TokenizedStringFragments } from "cdktf";
new TokenizedStringFragments();
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
addIntrinsic | Adds an intrinsic fragment. |
addLiteral | Adds a literal fragment. |
addToken | Adds a token fragment. |
join | Combine the string fragments using the given joiner. |
mapTokens | Apply a transformation function to all tokens in the string. |
addIntrinsic
public addIntrinsic(value: any): void
Adds an intrinsic fragment.
valueRequired
- Type: any
the intrinsic value to add.
addLiteral
public addLiteral(lit: any): void
Adds a literal fragment.
litRequired
- Type: any
the literal to add.
addToken
public addToken(token: IResolvable): void
Adds a token fragment.
tokenRequired
- Type: IResolvable
the token to add.
join
public join(concat: IFragmentConcatenator): any
Combine the string fragments using the given joiner.
If there are any
concatRequired
- Type: IFragmentConcatenator
mapTokens
public mapTokens(mapper: ITokenMapper): TokenizedStringFragments
Apply a transformation function to all tokens in the string.
mapperRequired
- Type: ITokenMapper
Properties
| Name | Type | Description |
|---|---|---|
firstValue | any | Returns the first value. |
intrinsic | IResolvable[] | Return all intrinsic fragments from this string. |
length | number | Returns the number of fragments. |
literals | IResolvable[] | Return all literals from this string. |
tokens | IResolvable[] | Return all Tokens from this string. |
firstToken | IResolvable | Returns the first token. |
firstValueRequired
public readonly firstValue: any;
- Type: any
Returns the first value.
intrinsicRequired
public readonly intrinsic: IResolvable[];
- Type: IResolvable[]
Return all intrinsic fragments from this string.
lengthRequired
public readonly length: number;
- Type: number
Returns the number of fragments.
literalsRequired
public readonly literals: IResolvable[];
- Type: IResolvable[]
Return all literals from this string.
tokensRequired
public readonly tokens: IResolvable[];
- Type: IResolvable[]
Return all Tokens from this string.
firstTokenOptional
public readonly firstToken: IResolvable;
- Type: IResolvable
Returns the first token.
VariableType
Initializers
import { VariableType } from "cdktf";
new VariableType();
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
list | No description. |
map | No description. |
object | No description. |
set | No description. |
tuple | No description. |
list
import { VariableType } from 'cdktf'
VariableType.list(type: string)
typeRequired
- Type: string
map
import { VariableType } from 'cdktf'
VariableType.map(type: string)
typeRequired
- Type: string
object
import { VariableType } from 'cdktf'
VariableType.object(attributes: {[ key: string ]: string})
attributesRequired
- Type: {[ key: string ]: string}
set
import { VariableType } from 'cdktf'
VariableType.set(type: string)
typeRequired
- Type: string
tuple
import { VariableType } from 'cdktf'
VariableType.tuple(elements: string)
elementsRequired
- Type: string
Constants
| Name | Type | Description |
|---|---|---|
ANY | string | No description. |
BOOL | string | No description. |
LIST | string | No description. |
LIST_BOOL | string | No description. |
LIST_NUMBER | string | No description. |
LIST_STRING | string | No description. |
MAP | string | No description. |
MAP_BOOL | string | No description. |
MAP_NUMBER | string | No description. |
MAP_STRING | string | No description. |
NUMBER | string | No description. |
SET | string | No description. |
SET_BOOL | string | No description. |
SET_NUMBER | string | No description. |
SET_STRING | string | No description. |
STRING | string | No description. |
ANYRequired
public readonly ANY: string;
- Type: string
BOOLRequired
public readonly BOOL: string;
- Type: string
LISTRequired
public readonly LIST: string;
- Type: string
LIST_BOOLRequired
public readonly LIST_BOOL: string;
- Type: string
LIST_NUMBERRequired
public readonly LIST_NUMBER: string;
- Type: string
LIST_STRINGRequired
public readonly LIST_STRING: string;
- Type: string
MAPRequired
public readonly MAP: string;
- Type: string
MAP_BOOLRequired
public readonly MAP_BOOL: string;
- Type: string
MAP_NUMBERRequired
public readonly MAP_NUMBER: string;
- Type: string
MAP_STRINGRequired
public readonly MAP_STRING: string;
- Type: string
NUMBERRequired
public readonly NUMBER: string;
- Type: string
SETRequired
public readonly SET: string;
- Type: string
SET_BOOLRequired
public readonly SET_BOOL: string;
- Type: string
SET_NUMBERRequired
public readonly SET_NUMBER: string;
- Type: string
SET_STRINGRequired
public readonly SET_STRING: string;
- Type: string
STRINGRequired
public readonly STRING: string;
- Type: string
Protocols
IAnyProducer
- Implemented By: IAnyProducer
Interface for lazy untyped value producers.
Methods
| Name | Description |
|---|---|
produce | Produce the value. |
produce
public produce(context: IResolveContext): any
Produce the value.
contextRequired
- Type: IResolveContext
IAspect
- Implemented By: IAspect
Represents an Aspect.
Methods
| Name | Description |
|---|---|
visit | All aspects can visit an IConstruct. |
visit
public visit(node: IConstruct): void
All aspects can visit an IConstruct.
nodeRequired
- Type: constructs.IConstruct
IFragmentConcatenator
- Implemented By: StringConcat, IFragmentConcatenator
Function used to concatenate symbols in the target document language.
Interface so it could potentially be exposed over jsii.
Methods
| Name | Description |
|---|---|
join | Join the fragment on the left and on the right. |
join
public join(left: any, right: any): any
Join the fragment on the left and on the right.
leftRequired
- Type: any
rightRequired
- Type: any
IInterpolatingParent
- Implemented By: AnyMapList, BooleanMapList, ComplexComputedList, ComplexObject, NumberMapList, StringMapList, TerraformDataSource, TerraformResource, IInterpolatingParent
Methods
| Name | Description |
|---|---|
interpolationForAttribute | No description. |
interpolationForAttribute
public interpolationForAttribute(terraformAttribute: string): IResolvable
terraformAttributeRequired
- Type: string
IListProducer
- Implemented By: IListProducer
Interface for lazy list producers.
Methods
| Name | Description |
|---|---|
produce | Produce the list value. |
produce
public produce(context: IResolveContext): string[]
Produce the list value.
contextRequired
- Type: IResolveContext
IManifest
Properties
| Name | Type | Description |
|---|---|---|
stacks | {[ key: string ]: StackManifest} | No description. |
version | string | No description. |
stacksRequired
public readonly stacks: {[ key: string ]: StackManifest};
- Type: {[ key: string ]: StackManifest}
versionRequired
public readonly version: string;
- Type: string
INumberProducer
- Implemented By: INumberProducer
Interface for lazy number producers.
Methods
| Name | Description |
|---|---|
produce | Produce the number value. |
produce
public produce(context: IResolveContext): number
Produce the number value.
contextRequired
- Type: IResolveContext
IPostProcessor
- Implemented By: IPostProcessor
A Token that can post-process the complete resolved value, after resolve() has recursed over it.
Methods
| Name | Description |
|---|---|
postProcess | Process the completely resolved value, after full recursion/resolution has happened. |
postProcess
public postProcess(input: any, context: IResolveContext): any
Process the completely resolved value, after full recursion/resolution has happened.
inputRequired
- Type: any
contextRequired
- Type: IResolveContext
IRemoteWorkspace
- Implemented By: NamedRemoteWorkspace, PrefixedRemoteWorkspaces, IRemoteWorkspace
IResolvable
- Implemented By: AnyMap, AnyMapList, BooleanMap, BooleanMapList, ComplexComputedList, ComplexList, ComplexMap, ComplexObject, LazyBase, NumberMap, NumberMapList, StringMap, StringMapList, IResolvable
Interface for values that can be resolvable later.
Tokens are special objects that participate in synthesis.
Methods
| Name | Description |
|---|---|
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
resolve
public resolve(context: IResolveContext): any
Produce the Token's value at resolution time.
contextRequired
- Type: IResolveContext
toString
public toString(): string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
creationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
creationStackRequired
public readonly creationStack: string[];
- Type: string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
IResolveContext
- Implemented By: IResolveContext
Current resolution context for tokens.
Methods
| Name | Description |
|---|---|
registerPostProcessor | Use this postprocessor after the entire token structure has been resolved. |
resolve | Resolve an inner object. |
registerPostProcessor
public registerPostProcessor(postProcessor: IPostProcessor): void
Use this postprocessor after the entire token structure has been resolved.
postProcessorRequired
- Type: IPostProcessor
resolve
public resolve(x: any): any
Resolve an inner object.
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
preparing | boolean | True when we are still preparing, false if we're rendering the final output. |
scope | constructs.IConstruct | The scope from which resolution has been initiated. |
iteratorContext | string | TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. |
suppressBraces | boolean | True when ${} should be ommitted (because already inside them), false otherwise. |
preparingRequired
public readonly preparing: boolean;
- Type: boolean
True when we are still preparing, false if we're rendering the final output.
scopeRequired
public readonly scope: IConstruct;
- Type: constructs.IConstruct
The scope from which resolution has been initiated.
iteratorContextOptional
public readonly iteratorContext: string;
- Type: string
TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key.
suppressBracesOptional
public readonly suppressBraces: boolean;
- Type: boolean
True when ${} should be ommitted (because already inside them), false otherwise.
IResource
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
stack | TerraformStack | The stack in which this resource is defined. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
stackRequired
public readonly stack: TerraformStack;
- Type: TerraformStack
The stack in which this resource is defined.
IResourceConstructor
- Implemented By: IResourceConstructor
IScopeCallback
- Implemented By: IScopeCallback
IStackSynthesizer
- Implemented By: IStackSynthesizer
Encodes information how a certain Stack should be deployed inspired by AWS CDK v2 implementation (synth functionality was removed in constructs v10).
Methods
| Name | Description |
|---|---|
synthesize | Synthesize the associated stack to the session. |
synthesize
public synthesize(session: ISynthesisSession): void
Synthesize the associated stack to the session.
sessionRequired
- Type: ISynthesisSession
IStringProducer
- Implemented By: IStringProducer
Interface for lazy string producers.
Methods
| Name | Description |
|---|---|
produce | Produce the string value. |
produce
public produce(context: IResolveContext): string
Produce the string value.
contextRequired
- Type: IResolveContext
ISynthesisSession
- Implemented By: ISynthesisSession
Represents a single session of synthesis.
Passed into TerraformStack.onSynthesize() methods.
originally from aws/constructs lib v3.3.126 (synth functionality was removed in constructs v10)
Properties
| Name | Type | Description |
|---|---|---|
manifest | Manifest | No description. |
outdir | string | The output directory for this synthesis session. |
skipValidation | boolean | No description. |
manifestRequired
public readonly manifest: Manifest;
- Type: Manifest
outdirRequired
public readonly outdir: string;
- Type: string
The output directory for this synthesis session.
skipValidationOptional
public readonly skipValidation: boolean;
- Type: boolean
ITerraformAddressable
- Implemented By: AnyMap, AnyMapList, BooleanMap, BooleanMapList, ComplexComputedList, ComplexList, ComplexMap, ComplexObject, DataTerraformRemoteState, DataTerraformRemoteStateArtifactory, DataTerraformRemoteStateAzurerm, DataTerraformRemoteStateConsul, DataTerraformRemoteStateCos, DataTerraformRemoteStateEtcd, DataTerraformRemoteStateEtcdV3, DataTerraformRemoteStateGcs, DataTerraformRemoteStateHttp, DataTerraformRemoteStateLocal, DataTerraformRemoteStateManta, DataTerraformRemoteStateOss, DataTerraformRemoteStatePg, DataTerraformRemoteStateS3, DataTerraformRemoteStateSwift, NumberMap, NumberMapList, StringMap, StringMapList, TerraformDataSource, TerraformHclModule, TerraformLocal, TerraformModule, TerraformRemoteState, TerraformResource, TerraformVariable, ITerraformAddressable, ITerraformDependable
Properties
| Name | Type | Description |
|---|---|---|
fqn | string | No description. |
fqnRequired
public readonly fqn: string;
- Type: string
ITerraformDependable
Extends: ITerraformAddressable
Implemented By: TerraformDataSource, TerraformHclModule, TerraformModule, TerraformResource, ITerraformDependable
Properties
| Name | Type | Description |
|---|---|---|
fqn | string | No description. |
fqnRequired
public readonly fqn: string;
- Type: string
ITerraformIterator
- Implemented By: ListTerraformIterator, MapTerraformIterator, TerraformIterator, ITerraformIterator
ITerraformResource
- Implemented By: TerraformDataSource, TerraformResource, ITerraformResource
Methods
| Name | Description |
|---|---|
interpolationForAttribute | No description. |
interpolationForAttribute
public interpolationForAttribute(terraformAttribute: string): IResolvable
terraformAttributeRequired
- Type: string
Properties
| Name | Type | Description |
|---|---|---|
fqn | string | No description. |
friendlyUniqueId | string | No description. |
terraformResourceType | string | No description. |
count | number | No description. |
dependsOn | string[] | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
terraformResourceTypeRequired
public readonly terraformResourceType: string;
- Type: string
countOptional
public readonly count: number;
- Type: number
dependsOnOptional
public readonly dependsOn: string[];
- Type: string[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
lifecycleOptional
public readonly lifecycle: TerraformResourceLifecycle;
providerOptional
public readonly provider: TerraformProvider;
- Type: TerraformProvider
ITokenMapper
- Implemented By: ITokenMapper
Interface to apply operation to tokens in a string.
Interface so it can be exported via jsii.
Methods
| Name | Description |
|---|---|
mapToken | Replace a single token. |
mapToken
public mapToken(t: IResolvable): any
Replace a single token.
tRequired
- Type: IResolvable
ITokenResolver
- Implemented By: DefaultTokenResolver, ITokenResolver
How to resolve tokens.
Methods
| Name | Description |
|---|---|
resolveList | Resolve a tokenized list. |
resolveMap | Resolve a tokenized map. |
resolveNumberList | Resolve a tokenized number list. |
resolveString | Resolve a string with at least one stringified token in it. |
resolveToken | Resolve a single token. |
resolveList
public resolveList(l: string[], context: IResolveContext): any
Resolve a tokenized list.
lRequired
- Type: string[]
contextRequired
- Type: IResolveContext
resolveMap
public resolveMap(m: {[ key: string ]: any}, context: IResolveContext): any
Resolve a tokenized map.
mRequired
- Type: {[ key: string ]: any}
contextRequired
- Type: IResolveContext
resolveNumberList
public resolveNumberList(l: number[], context: IResolveContext): any
Resolve a tokenized number list.
lRequired
- Type: number[]
contextRequired
- Type: IResolveContext
resolveString
public resolveString(s: TokenizedStringFragments, context: IResolveContext): any
Resolve a string with at least one stringified token in it.
(May use concatenation)
sRequired
- Type: TokenizedStringFragments
contextRequired
- Type: IResolveContext
resolveToken
public resolveToken(t: IResolvable, context: IResolveContext, postProcessor: IPostProcessor): any
Resolve a single token.
tRequired
- Type: IResolvable
contextRequired
- Type: IResolveContext
postProcessorRequired
- Type: IPostProcessor