Terraform
Typescript: Constructs
App
Represents a cdktf application.
Initializers
import { App } from 'cdktf'
new App(config?: AppConfig)
config
Optional
- Type: AppConfig
configuration.
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.
fromStack
Required
- Type: TerraformStack
toStack
Required
- Type: TerraformStack
identifier
Required
- 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.
x
Required
- Type: any
Any object.
isApp
import { App } from 'cdktf'
App.isApp(x: any)
x
Required
- Type: any
of
import { App } from 'cdktf'
App.of(construct: IConstruct)
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
hclOutput | boolean | No description. |
manifest | Manifest | No description. |
outdir | string | The output directory into which resources will be synthesized. |
skipBackendValidation | boolean | Whether to skip backend validation during synthesis of the app. |
skipValidation | boolean | Whether to skip all validations during synthesis of the app. |
targetStackId | string | The stack which will be synthesized. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
hclOutput
Required
public readonly hclOutput: boolean;
- Type: boolean
manifest
Required
public readonly manifest: Manifest;
- Type: Manifest
outdir
Required
public readonly outdir: string;
- Type: string
The output directory into which resources will be synthesized.
skipBackendValidation
Required
public readonly skipBackendValidation: boolean;
- Type: boolean
Whether to skip backend validation during synthesis of the app.
skipValidation
Required
public readonly skipValidation: boolean;
- Type: boolean
Whether to skip all validations during synthesis of the app.
targetStackId
Optional
public readonly targetStackId: string;
- Type: string
The stack which will be synthesized.
If not set, all stacks will be synthesized.
AzurermBackend
Initializers
import { AzurermBackend } from 'cdktf'
new AzurermBackend(scope: Construct, props: AzurermBackendConfig)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
props | AzurermBackendConfig | No description. |
scope
Required
- Type: constructs.Construct
props
Required
- Type: AzurermBackendConfig
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
path
Required
- Type: string
value
Required
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- 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.
toHclTerraform
public toHclTerraform(): any
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.
scope
Required
- Type: constructs.Construct
name
Required
- Type: string
_fromStack
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
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.
x
Required
- Type: any
Any object.
isTerraformElement
import { AzurermBackend } from 'cdktf'
AzurermBackend.isTerraformElement(x: any)
x
Required
- Type: any
isBackend
import { AzurermBackend } from 'cdktf'
AzurermBackend.isBackend(x: any)
x
Required
- Type: any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStack
Required
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqn
Required
public readonly fqn: string;
- Type: string
friendlyUniqueId
Required
public readonly friendlyUniqueId: string;
- Type: string
CloudBackend
The Cloud Backend synthesizes a {@link https://developer.hashicorp.com/terraform/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: CloudBackendConfig)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
props | CloudBackendConfig | No description. |
scope
Required
- Type: constructs.Construct
props
Required
- Type: CloudBackendConfig
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
path
Required
- Type: string
value
Required
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- 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.
toHclTerraform
public toHclTerraform(): any
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.
scope
Required
- Type: constructs.Construct
name
Required
- Type: string
_fromStack
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
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.
x
Required
- Type: any
Any object.
isTerraformElement
import { CloudBackend } from 'cdktf'
CloudBackend.isTerraformElement(x: any)
x
Required
- Type: any
isBackend
import { CloudBackend } from 'cdktf'
CloudBackend.isBackend(x: any)
x
Required
- Type: any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStack
Required
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqn
Required
public readonly fqn: string;
- Type: string
friendlyUniqueId
Required
public readonly friendlyUniqueId: string;
- Type: string
ConsulBackend
Initializers
import { ConsulBackend } from 'cdktf'
new ConsulBackend(scope: Construct, props: ConsulBackendConfig)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
props | ConsulBackendConfig | No description. |
scope
Required
- Type: constructs.Construct
props
Required
- Type: ConsulBackendConfig
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
path
Required
- Type: string
value
Required
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- 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.
toHclTerraform
public toHclTerraform(): any
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.
scope
Required
- Type: constructs.Construct
name
Required
- Type: string
_fromStack
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
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.
x
Required
- Type: any
Any object.
isTerraformElement
import { ConsulBackend } from 'cdktf'
ConsulBackend.isTerraformElement(x: any)
x
Required
- Type: any
isBackend
import { ConsulBackend } from 'cdktf'
ConsulBackend.isBackend(x: any)
x
Required
- Type: any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStack
Required
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqn
Required
public readonly fqn: string;
- Type: string
friendlyUniqueId
Required
public readonly friendlyUniqueId: string;
- Type: string
CosBackend
Initializers
import { CosBackend } from 'cdktf'
new CosBackend(scope: Construct, props: CosBackendConfig)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
props | CosBackendConfig | No description. |
scope
Required
- Type: constructs.Construct
props
Required
- Type: CosBackendConfig
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
getRemoteStateDataSource | Creates a TerraformRemoteState resource that accesses this backend. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
path
Required
- Type: string
value
Required
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- 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.
toHclTerraform
public toHclTerraform(): any
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.
scope
Required
- Type: constructs.Construct
name
Required
- Type: string
_fromStack
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
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.
x
Required
- Type: any
Any object.
isTerraformElement
import { CosBackend } from 'cdktf'
CosBackend.isTerraformElement(x: any)
x
Required
- Type: any
isBackend
import { CosBackend } from 'cdktf'
CosBackend.isBackend(x: any)
x
Required
- Type: any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStack
Required
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqn
Required
public readonly fqn: string;
- Type: string
friendlyUniqueId
Required
public readonly friendlyUniqueId: string;
- Type: string
DataResource
The DataResource implements the standard resource lifecycle, but does not directly take any other actions.
You can use the DataResource resource without requiring or configuring a provider.
The DataResource resource is useful for storing values which need to follow a manage resource lifecycle, and for triggering provisioners when there is no other logical managed resource in which to place them.
It requires Terraform 1.4 or later.
It is also possible to generate these bindings by adding "terraform.io/builtin/terraform" to the "terraformProviders" key in your cdktf.json file and running "cdktf get".
https://developer.hashicorp.com/terraform/language/resources/terraform-data
Initializers
import { DataResource } from 'cdktf'
new DataResource(scope: Construct, id: string, config?: DataConfig)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | The scope in which to define this construct. |
id | string | The scoped construct ID. |
config | DataConfig | No description. |
scope
Required
- Type: constructs.Construct
The scope in which to define this construct.
id
Required
- Type: string
The scoped construct ID.
Must be unique amongst siblings in the same scope
config
Optional
- Type: DataConfig
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. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | Adds this resource to the terraform JSON output. |
addMoveTarget | Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move. |
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. |
hasResourceMove | No description. |
importFrom | No description. |
interpolationForAttribute | No description. |
moveFromId | Move the resource corresponding to "id" to this resource. |
moveTo | Moves this resource to the target resource given by moveTarget. |
moveToId | Moves this resource to the resource corresponding to "id". |
resetInput | No description. |
resetTriggersReplace | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addOverride
public addOverride(path: string, value: any): void
path
Required
- Type: string
value
Required
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- 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.
toHclTerraform
public toHclTerraform(): any
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
addMoveTarget
public addMoveTarget(moveTarget: string): void
Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move.
moveTarget
Required
- Type: string
The string move target that will correspond to this resource.
getAnyMapAttribute
public getAnyMapAttribute(terraformAttribute: string): {[ key: string ]: any}
terraformAttribute
Required
- Type: string
getBooleanAttribute
public getBooleanAttribute(terraformAttribute: string): IResolvable
terraformAttribute
Required
- Type: string
getBooleanMapAttribute
public getBooleanMapAttribute(terraformAttribute: string): {[ key: string ]: boolean}
terraformAttribute
Required
- Type: string
getListAttribute
public getListAttribute(terraformAttribute: string): string[]
terraformAttribute
Required
- Type: string
getNumberAttribute
public getNumberAttribute(terraformAttribute: string): number
terraformAttribute
Required
- Type: string
getNumberListAttribute
public getNumberListAttribute(terraformAttribute: string): number[]
terraformAttribute
Required
- Type: string
getNumberMapAttribute
public getNumberMapAttribute(terraformAttribute: string): {[ key: string ]: number}
terraformAttribute
Required
- Type: string
getStringAttribute
public getStringAttribute(terraformAttribute: string): string
terraformAttribute
Required
- Type: string
getStringMapAttribute
public getStringMapAttribute(terraformAttribute: string): {[ key: string ]: string}
terraformAttribute
Required
- Type: string
hasResourceMove
public hasResourceMove(): TerraformResourceMoveByTarget | TerraformResourceMoveById
importFrom
public importFrom(id: string, provider?: TerraformProvider): void
id
Required
- Type: string
provider
Optional
- Type: TerraformProvider
interpolationForAttribute
public interpolationForAttribute(terraformAttribute: string): IResolvable
terraformAttribute
Required
- Type: string
moveFromId
public moveFromId(id: string): void
Move the resource corresponding to "id" to this resource.
Note that the resource being moved from must be marked as moved using it's instance function.
id
Required
- Type: string
Full id of resource being moved from, e.g. "aws_s3_bucket.example".
moveTo
public moveTo(moveTarget: string, index?: string | number): void
Moves this resource to the target resource given by moveTarget.
moveTarget
Required
- Type: string
The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.
index
Optional
- Type: string | number
Optional The index corresponding to the key the resource is to appear in the foreach of a resource to move to.
moveToId
public moveToId(id: string): void
Moves this resource to the resource corresponding to "id".
id
Required
- Type: string
Full id of resource to move to, e.g. "aws_s3_bucket.example".
resetInput
public resetInput(): void
resetTriggersReplace
public resetTriggersReplace(): void
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isTerraformResource | No description. |
generateConfigForImport | Generates CDKTF code for importing a Data resource upon running "cdktf plan < stack-name >". |
isConstruct
import { DataResource } from 'cdktf'
DataResource.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.
x
Required
- Type: any
Any object.
isTerraformElement
import { DataResource } from 'cdktf'
DataResource.isTerraformElement(x: any)
x
Required
- Type: any
isTerraformResource
import { DataResource } from 'cdktf'
DataResource.isTerraformResource(x: any)
x
Required
- Type: any
generateConfigForImport
import { DataResource } from 'cdktf'
DataResource.generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: TerraformProvider)
Generates CDKTF code for importing a Data resource upon running "cdktf plan < stack-name >".
scope
Required
- Type: constructs.Construct
The scope in which to define this construct.
importToId
Required
- Type: string
The construct id used in the generated config for the Data to import.
importFromId
Required
- Type: string
The id of the existing Data that should be imported.
Refer to the {@link https://terraform.io/providers/builtin/terraform/latest/docs/resources/data#import import section} in the documentation of this resource for the id to use
provider
Optional
- Type: TerraformProvider
? Optional instance of the provider where the Data to import is found.
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 | TerraformCount | No description. |
dependsOn | string[] | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
provisioners | FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[] | No description. |
id | string | No description. |
output | AnyMap | No description. |
inputInput | {[ key: string ]: any} | No description. |
triggersReplaceInput | {[ key: string ]: any} | No description. |
input | {[ key: string ]: any} | (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. |
triggersReplace | {[ key: string ]: any} | (Optional) A value which is stored in the instance state, and will force replacement when the value changes. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStack
Required
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqn
Required
public readonly fqn: string;
- Type: string
friendlyUniqueId
Required
public readonly friendlyUniqueId: string;
- Type: string
terraformMetaArguments
Required
public readonly terraformMetaArguments: {[ key: string ]: any};
- Type: {[ key: string ]: any}
terraformResourceType
Required
public readonly terraformResourceType: string;
- Type: string
terraformGeneratorMetadata
Optional
public readonly terraformGeneratorMetadata: TerraformProviderGeneratorMetadata;
connection
Optional
public readonly connection: SSHProvisionerConnection | WinrmProvisionerConnection;
count
Optional
public readonly count: number | TerraformCount;
- Type: number | TerraformCount
dependsOn
Optional
public readonly dependsOn: string[];
- Type: string[]
forEach
Optional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
lifecycle
Optional
public readonly lifecycle: TerraformResourceLifecycle;
provider
Optional
public readonly provider: TerraformProvider;
- Type: TerraformProvider
provisioners
Optional
public readonly provisioners: FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[];
- Type: FileProvisioner | LocalExecProvisioner | RemoteExecProvisioner[]
id
Required
public readonly id: string;
- Type: string
output
Required
public readonly output: AnyMap;
- Type: AnyMap
inputInput
Optional
public readonly inputInput: {[ key: string ]: any};
- Type: {[ key: string ]: any}
triggersReplaceInput
Optional
public readonly triggersReplaceInput: {[ key: string ]: any};
- Type: {[ key: string ]: any}
input
Required
public readonly input: {[ key: string ]: any};
- Type: {[ key: string ]: any}
(Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#input
triggersReplace
Required
public readonly triggersReplace: {[ key: string ]: any};
- Type: {[ key: string ]: any}
(Optional) A value which is stored in the instance state, and will force replacement when the value changes.
https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace
Constants
Name | Type | Description |
---|---|---|
tfResourceType | string | No description. |
tfResourceType
Required
public readonly tfResourceType: 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. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
config
Required
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
path
Required
- Type: string
value
Required
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- 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.
toHclTerraform
public toHclTerraform(): any
Adds this resource to the terraform JSON output.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
output
Required
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
output
Required
- Type: string
getList
public getList(output: string): string[]
output
Required
- Type: string
getNumber
public getNumber(output: string): number
output
Required
- Type: string
getString
public getString(output: string): string
output
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
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.
x
Required
- Type: any
Any object.
isTerraformElement
import { DataTerraformRemoteState } from 'cdktf'
DataTerraformRemoteState.isTerraformElement(x: any)
x
Required
- Type: any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStack
Required
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqn
Required
public readonly fqn: string;
- Type: string
friendlyUniqueId
Required
public readonly friendlyUniqueId: string;
- Type: string
Constants
Name | Type | Description |
---|---|---|
tfResourceType | string | No description. |
tfResourceType
Required
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. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
config
Required
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
path
Required
- Type: string
value
Required
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- 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.
toHclTerraform
public toHclTerraform(): any
Adds this resource to the terraform JSON output.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
output
Required
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
output
Required
- Type: string
getList
public getList(output: string): string[]
output
Required
- Type: string
getNumber
public getNumber(output: string): number
output
Required
- Type: string
getString
public getString(output: string): string
output
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
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.
x
Required
- Type: any
Any object.
isTerraformElement
import { DataTerraformRemoteStateAzurerm } from 'cdktf'
DataTerraformRemoteStateAzurerm.isTerraformElement(x: any)
x
Required
- Type: any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStack
Required
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqn
Required
public readonly fqn: string;
- Type: string
friendlyUniqueId
Required
public readonly friendlyUniqueId: string;
- Type: string
Constants
Name | Type | Description |
---|---|---|
tfResourceType | string | No description. |
tfResourceType
Required
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. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
config
Required
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
path
Required
- Type: string
value
Required
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- 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.
toHclTerraform
public toHclTerraform(): any
Adds this resource to the terraform JSON output.
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
Adds this resource to the terraform JSON output.
get
public get(output: string): IResolvable
output
Required
- Type: string
getBoolean
public getBoolean(output: string): IResolvable
output
Required
- Type: string
getList
public getList(output: string): string[]
output
Required
- Type: string
getNumber
public getNumber(output: string): number
output
Required
- Type: string
getString
public getString(output: string): string
output
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
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.
x
Required
- Type: any
Any object.
isTerraformElement
import { DataTerraformRemoteStateConsul } from 'cdktf'
DataTerraformRemoteStateConsul.isTerraformElement(x: any)
x
Required
- Type: any
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | string | No description. |
friendlyUniqueId | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
cdktfStack
Required
public readonly cdktfStack: TerraformStack;
- Type: TerraformStack
fqn
Required
public readonly fqn: string;
- Type: string
friendlyUniqueId
Required
public readonly friendlyUniqueId: string;
- Type: string
Constants
Name | Type | Description |
---|---|---|
tfResourceType | string | No description. |
tfResourceType
Required
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. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
config
Required
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. |
toHclTerraform | Adds this resource to the terraform JSON output. |
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
path
Required
- Type: string
value
Required
- Type: any
overrideLogicalId
public overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
newLogicalId
Required
- 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.
toHclTerraform
public toHclTerraform(): any
Adds this resource to the terraform JSON output.
toMetadata
public toMetadata(): any