Terraform
Go: Constructs
App
Represents a cdktf application.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewApp(config AppConfig) App
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
func ToString() *string
Returns a string representation of this construct.
CrossStackReference
func 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
func Synth()
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 "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.App_IsConstruct(x interface{}) *bool
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: interface{}
Any object.
IsApp
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.App_IsApp(x interface{}) *bool
x
Required
- Type: interface{}
Of
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.App_Of(construct IConstruct) App
construct
Required
- Type: github.com/aws/constructs-go/constructs/v10.IConstruct
Properties
Name | Type | Description |
---|---|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
HclOutput | *bool | No description. |
Manifest | Manifest | No description. |
Outdir | *string | The output directory into which resources will be synthesized. |
SkipBackendValidation | *bool | Whether to skip backend validation during synthesis of the app. |
SkipValidation | *bool | Whether to skip all validations during synthesis of the app. |
TargetStackId | *string | The stack which will be synthesized. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
HclOutput
Required
func HclOutput() *bool
- Type: *bool
Manifest
Required
func Manifest() Manifest
- Type: Manifest
Outdir
Required
func Outdir() *string
- Type: *string
The output directory into which resources will be synthesized.
SkipBackendValidation
Required
func SkipBackendValidation() *bool
- Type: *bool
Whether to skip backend validation during synthesis of the app.
SkipValidation
Required
func SkipValidation() *bool
- Type: *bool
Whether to skip all validations during synthesis of the app.
TargetStackId
Optional
func TargetStackId() *string
- Type: *string
The stack which will be synthesized.
If not set, all stacks will be synthesized.
AzurermBackend
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewAzurermBackend(scope Construct, props AzurermBackendConfig) AzurermBackend
Name | Type | Description |
---|---|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | No description. |
props | AzurermBackendConfig | No description. |
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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
func ToString() *string
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
path
Required
- Type: *string
value
Required
- Type: interface{}
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)
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
func ResetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
ToHclTerraform
func ToHclTerraform() interface{}
ToMetadata
func ToMetadata() interface{}
ToTerraform
func ToTerraform() interface{}
Adds this resource to the terraform JSON output.
GetRemoteStateDataSource
func GetRemoteStateDataSource(scope Construct, name *string, _fromStack *string) TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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 "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.AzurermBackend_IsConstruct(x interface{}) *bool
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: interface{}
Any object.
IsTerraformElement
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.AzurermBackend_IsTerraformElement(x interface{}) *bool
x
Required
- Type: interface{}
IsBackend
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.AzurermBackend_IsBackend(x interface{}) *bool
x
Required
- Type: interface{}
Properties
Name | Type | Description |
---|---|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
CdktfStack | TerraformStack | No description. |
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
CdktfStack
Required
func CdktfStack() TerraformStack
- Type: TerraformStack
Fqn
Required
func Fqn() *string
- Type: *string
FriendlyUniqueId
Required
func 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 "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewCloudBackend(scope Construct, props CloudBackendConfig) CloudBackend
Name | Type | Description |
---|---|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | No description. |
props | CloudBackendConfig | No description. |
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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
func ToString() *string
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
path
Required
- Type: *string
value
Required
- Type: interface{}
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)
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
func ResetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
ToHclTerraform
func ToHclTerraform() interface{}
ToMetadata
func ToMetadata() interface{}
ToTerraform
func ToTerraform() interface{}
Adds this resource to the terraform JSON output.
GetRemoteStateDataSource
func GetRemoteStateDataSource(scope Construct, name *string, _fromStack *string) TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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 "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.CloudBackend_IsConstruct(x interface{}) *bool
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: interface{}
Any object.
IsTerraformElement
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.CloudBackend_IsTerraformElement(x interface{}) *bool
x
Required
- Type: interface{}
IsBackend
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.CloudBackend_IsBackend(x interface{}) *bool
x
Required
- Type: interface{}
Properties
Name | Type | Description |
---|---|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
CdktfStack | TerraformStack | No description. |
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
CdktfStack
Required
func CdktfStack() TerraformStack
- Type: TerraformStack
Fqn
Required
func Fqn() *string
- Type: *string
FriendlyUniqueId
Required
func FriendlyUniqueId() *string
- Type: *string
ConsulBackend
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewConsulBackend(scope Construct, props ConsulBackendConfig) ConsulBackend
Name | Type | Description |
---|---|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | No description. |
props | ConsulBackendConfig | No description. |
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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
func ToString() *string
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
path
Required
- Type: *string
value
Required
- Type: interface{}
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)
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
func ResetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
ToHclTerraform
func ToHclTerraform() interface{}
ToMetadata
func ToMetadata() interface{}
ToTerraform
func ToTerraform() interface{}
Adds this resource to the terraform JSON output.
GetRemoteStateDataSource
func GetRemoteStateDataSource(scope Construct, name *string, _fromStack *string) TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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 "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ConsulBackend_IsConstruct(x interface{}) *bool
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: interface{}
Any object.
IsTerraformElement
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ConsulBackend_IsTerraformElement(x interface{}) *bool
x
Required
- Type: interface{}
IsBackend
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ConsulBackend_IsBackend(x interface{}) *bool
x
Required
- Type: interface{}
Properties
Name | Type | Description |
---|---|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
CdktfStack | TerraformStack | No description. |
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
CdktfStack
Required
func CdktfStack() TerraformStack
- Type: TerraformStack
Fqn
Required
func Fqn() *string
- Type: *string
FriendlyUniqueId
Required
func FriendlyUniqueId() *string
- Type: *string
CosBackend
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewCosBackend(scope Construct, props CosBackendConfig) CosBackend
Name | Type | Description |
---|---|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | No description. |
props | CosBackendConfig | No description. |
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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
func ToString() *string
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
path
Required
- Type: *string
value
Required
- Type: interface{}
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)
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
func ResetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
ToHclTerraform
func ToHclTerraform() interface{}
ToMetadata
func ToMetadata() interface{}
ToTerraform
func ToTerraform() interface{}
Adds this resource to the terraform JSON output.
GetRemoteStateDataSource
func GetRemoteStateDataSource(scope Construct, name *string, _fromStack *string) TerraformRemoteState
Creates a TerraformRemoteState resource that accesses this backend.
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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 "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.CosBackend_IsConstruct(x interface{}) *bool
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: interface{}
Any object.
IsTerraformElement
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.CosBackend_IsTerraformElement(x interface{}) *bool
x
Required
- Type: interface{}
IsBackend
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.CosBackend_IsBackend(x interface{}) *bool
x
Required
- Type: interface{}
Properties
Name | Type | Description |
---|---|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
CdktfStack | TerraformStack | No description. |
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
CdktfStack
Required
func CdktfStack() TerraformStack
- Type: TerraformStack
Fqn
Required
func Fqn() *string
- Type: *string
FriendlyUniqueId
Required
func 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 "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewDataResource(scope Construct, id *string, config DataConfig) DataResource
Name | Type | Description |
---|---|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | The scope in which to define this construct. |
id | *string | The scoped construct ID. |
config | DataConfig | No description. |
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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
func ToString() *string
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
path
Required
- Type: *string
value
Required
- Type: interface{}
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)
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
func ResetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
ToHclTerraform
func ToHclTerraform() interface{}
ToMetadata
func ToMetadata() interface{}
ToTerraform
func ToTerraform() interface{}
Adds this resource to the terraform JSON output.
AddMoveTarget
func AddMoveTarget(moveTarget *string)
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
func GetAnyMapAttribute(terraformAttribute *string) *map[string]interface{}
terraformAttribute
Required
- Type: *string
GetBooleanAttribute
func GetBooleanAttribute(terraformAttribute *string) IResolvable
terraformAttribute
Required
- Type: *string
GetBooleanMapAttribute
func GetBooleanMapAttribute(terraformAttribute *string) *map[string]*bool
terraformAttribute
Required
- Type: *string
GetListAttribute
func GetListAttribute(terraformAttribute *string) *[]*string
terraformAttribute
Required
- Type: *string
GetNumberAttribute
func GetNumberAttribute(terraformAttribute *string) *f64
terraformAttribute
Required
- Type: *string
GetNumberListAttribute
func GetNumberListAttribute(terraformAttribute *string) *[]*f64
terraformAttribute
Required
- Type: *string
GetNumberMapAttribute
func GetNumberMapAttribute(terraformAttribute *string) *map[string]*f64
terraformAttribute
Required
- Type: *string
GetStringAttribute
func GetStringAttribute(terraformAttribute *string) *string
terraformAttribute
Required
- Type: *string
GetStringMapAttribute
func GetStringMapAttribute(terraformAttribute *string) *map[string]*string
terraformAttribute
Required
- Type: *string
HasResourceMove
func HasResourceMove() interface{}
ImportFrom
func ImportFrom(id *string, provider TerraformProvider)
id
Required
- Type: *string
provider
Optional
- Type: TerraformProvider
InterpolationForAttribute
func InterpolationForAttribute(terraformAttribute *string) IResolvable
terraformAttribute
Required
- Type: *string
MoveFromId
func MoveFromId(id *string)
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
func MoveTo(moveTarget *string, index interface{})
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: interface{}
Optional The index corresponding to the key the resource is to appear in the foreach of a resource to move to.
MoveToId
func MoveToId(id *string)
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
func ResetInput()
ResetTriggersReplace
func ResetTriggersReplace()
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 "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataResource_IsConstruct(x interface{}) *bool
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: interface{}
Any object.
IsTerraformElement
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataResource_IsTerraformElement(x interface{}) *bool
x
Required
- Type: interface{}
IsTerraformResource
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataResource_IsTerraformResource(x interface{}) *bool
x
Required
- Type: interface{}
GenerateConfigForImport
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataResource_GenerateConfigForImport(scope Construct, importToId *string, importFromId *string, provider TerraformProvider) ImportableResource
Generates CDKTF code for importing a Data resource upon running "cdktf plan < stack-name >".
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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 | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
CdktfStack | TerraformStack | No description. |
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
TerraformMetaArguments | *map[string]interface{} | No description. |
TerraformResourceType | *string | No description. |
TerraformGeneratorMetadata | TerraformProviderGeneratorMetadata | No description. |
Connection | interface{} | No description. |
Count | interface{} | No description. |
DependsOn | _[]_string | No description. |
ForEach | ITerraformIterator | No description. |
Lifecycle | TerraformResourceLifecycle | No description. |
Provider | TerraformProvider | No description. |
Provisioners | *[]interface{} | No description. |
Id | *string | No description. |
Output | AnyMap | No description. |
InputInput | *map[string]interface{} | No description. |
TriggersReplaceInput | *map[string]interface{} | No description. |
Input | *map[string]interface{} | (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. |
TriggersReplace | *map[string]interface{} | (Optional) A value which is stored in the instance state, and will force replacement when the value changes. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
CdktfStack
Required
func CdktfStack() TerraformStack
- Type: TerraformStack
Fqn
Required
func Fqn() *string
- Type: *string
FriendlyUniqueId
Required
func FriendlyUniqueId() *string
- Type: *string
TerraformMetaArguments
Required
func TerraformMetaArguments() *map[string]interface{}
- Type: *map[string]interface{}
TerraformResourceType
Required
func TerraformResourceType() *string
- Type: *string
TerraformGeneratorMetadata
Optional
func TerraformGeneratorMetadata() TerraformProviderGeneratorMetadata
Connection
Optional
func Connection() interface{}
- Type: interface{}
Count
Optional
func Count() interface{}
- Type: interface{}
DependsOn
Optional
func DependsOn() *[]*string
- Type: _[]_string
ForEach
Optional
func ForEach() ITerraformIterator
- Type: ITerraformIterator
Lifecycle
Optional
func Lifecycle() TerraformResourceLifecycle
Provider
Optional
func Provider() TerraformProvider
- Type: TerraformProvider
Provisioners
Optional
func Provisioners() *[]interface{}
- Type: *[]interface{}
Id
Required
func Id() *string
- Type: *string
Output
Required
func Output() AnyMap
- Type: AnyMap
InputInput
Optional
func InputInput() *map[string]interface{}
- Type: *map[string]interface{}
TriggersReplaceInput
Optional
func TriggersReplaceInput() *map[string]interface{}
- Type: *map[string]interface{}
Input
Required
func Input() *map[string]interface{}
- Type: *map[string]interface{}
(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
func TriggersReplace() *map[string]interface{}
- Type: *map[string]interface{}
(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
func TfResourceType() *string
- Type: *string
DataTerraformRemoteState
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewDataTerraformRemoteState(scope Construct, id *string, config DataTerraformRemoteStateRemoteConfig) DataTerraformRemoteState
Name | Type | Description |
---|---|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | No description. |
id | *string | No description. |
config | DataTerraformRemoteStateRemoteConfig | No description. |
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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
func ToString() *string
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
path
Required
- Type: *string
value
Required
- Type: interface{}
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)
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
func ResetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
ToHclTerraform
func ToHclTerraform() interface{}
Adds this resource to the terraform JSON output.
ToMetadata
func ToMetadata() interface{}
ToTerraform
func ToTerraform() interface{}
Adds this resource to the terraform JSON output.
Get
func Get(output *string) IResolvable
output
Required
- Type: *string
GetBoolean
func GetBoolean(output *string) IResolvable
output
Required
- Type: *string
GetList
func GetList(output *string) *[]*string
output
Required
- Type: *string
GetNumber
func GetNumber(output *string) *f64
output
Required
- Type: *string
GetString
func GetString(output *string) *string
output
Required
- Type: *string
Static Functions
Name | Description |
---|---|
IsConstruct | Checks if x is a construct. |
IsTerraformElement | No description. |
IsConstruct
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataTerraformRemoteState_IsConstruct(x interface{}) *bool
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: interface{}
Any object.
IsTerraformElement
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataTerraformRemoteState_IsTerraformElement(x interface{}) *bool
x
Required
- Type: interface{}
Properties
Name | Type | Description |
---|---|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
CdktfStack | TerraformStack | No description. |
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
CdktfStack
Required
func CdktfStack() TerraformStack
- Type: TerraformStack
Fqn
Required
func Fqn() *string
- Type: *string
FriendlyUniqueId
Required
func FriendlyUniqueId() *string
- Type: *string
Constants
Name | Type | Description |
---|---|---|
TfResourceType | *string | No description. |
TfResourceType
Required
func TfResourceType() *string
- Type: *string
DataTerraformRemoteStateAzurerm
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewDataTerraformRemoteStateAzurerm(scope Construct, id *string, config DataTerraformRemoteStateAzurermConfig) DataTerraformRemoteStateAzurerm
Name | Type | Description |
---|---|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | No description. |
id | *string | No description. |
config | DataTerraformRemoteStateAzurermConfig | No description. |
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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
func ToString() *string
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
path
Required
- Type: *string
value
Required
- Type: interface{}
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)
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
func ResetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
ToHclTerraform
func ToHclTerraform() interface{}
Adds this resource to the terraform JSON output.
ToMetadata
func ToMetadata() interface{}
ToTerraform
func ToTerraform() interface{}
Adds this resource to the terraform JSON output.
Get
func Get(output *string) IResolvable
output
Required
- Type: *string
GetBoolean
func GetBoolean(output *string) IResolvable
output
Required
- Type: *string
GetList
func GetList(output *string) *[]*string
output
Required
- Type: *string
GetNumber
func GetNumber(output *string) *f64
output
Required
- Type: *string
GetString
func GetString(output *string) *string
output
Required
- Type: *string
Static Functions
Name | Description |
---|---|
IsConstruct | Checks if x is a construct. |
IsTerraformElement | No description. |
IsConstruct
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataTerraformRemoteStateAzurerm_IsConstruct(x interface{}) *bool
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: interface{}
Any object.
IsTerraformElement
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataTerraformRemoteStateAzurerm_IsTerraformElement(x interface{}) *bool
x
Required
- Type: interface{}
Properties
Name | Type | Description |
---|---|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
CdktfStack | TerraformStack | No description. |
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
CdktfStack
Required
func CdktfStack() TerraformStack
- Type: TerraformStack
Fqn
Required
func Fqn() *string
- Type: *string
FriendlyUniqueId
Required
func FriendlyUniqueId() *string
- Type: *string
Constants
Name | Type | Description |
---|---|---|
TfResourceType | *string | No description. |
TfResourceType
Required
func TfResourceType() *string
- Type: *string
DataTerraformRemoteStateConsul
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewDataTerraformRemoteStateConsul(scope Construct, id *string, config DataTerraformRemoteStateConsulConfig) DataTerraformRemoteStateConsul
Name | Type | Description |
---|---|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | No description. |
id | *string | No description. |
config | DataTerraformRemoteStateConsulConfig | No description. |
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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
func ToString() *string
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
path
Required
- Type: *string
value
Required
- Type: interface{}
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)
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
func ResetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
ToHclTerraform
func ToHclTerraform() interface{}
Adds this resource to the terraform JSON output.
ToMetadata
func ToMetadata() interface{}
ToTerraform
func ToTerraform() interface{}
Adds this resource to the terraform JSON output.
Get
func Get(output *string) IResolvable
output
Required
- Type: *string
GetBoolean
func GetBoolean(output *string) IResolvable
output
Required
- Type: *string
GetList
func GetList(output *string) *[]*string
output
Required
- Type: *string
GetNumber
func GetNumber(output *string) *f64
output
Required
- Type: *string
GetString
func GetString(output *string) *string
output
Required
- Type: *string
Static Functions
Name | Description |
---|---|
IsConstruct | Checks if x is a construct. |
IsTerraformElement | No description. |
IsConstruct
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataTerraformRemoteStateConsul_IsConstruct(x interface{}) *bool
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: interface{}
Any object.
IsTerraformElement
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DataTerraformRemoteStateConsul_IsTerraformElement(x interface{}) *bool
x
Required
- Type: interface{}
Properties
Name | Type | Description |
---|---|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
CdktfStack | TerraformStack | No description. |
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
CdktfStack
Required
func CdktfStack() TerraformStack
- Type: TerraformStack
Fqn
Required
func Fqn() *string
- Type: *string
FriendlyUniqueId
Required
func FriendlyUniqueId() *string
- Type: *string
Constants
Name | Type | Description |
---|---|---|
TfResourceType | *string | No description. |
TfResourceType
Required
func TfResourceType() *string
- Type: *string
DataTerraformRemoteStateCos
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewDataTerraformRemoteStateCos(scope Construct, id *string, config DataTerraformRemoteStateCosConfig) DataTerraformRemoteStateCos
Name | Type | Description |
---|---|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | No description. |
id | *string | No description. |
config | DataTerraformRemoteStateCosConfig | No description. |
scope
Required
- Type: github.com/aws/constructs-go/constructs/v10.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
func ToString() *string
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
path
Required
- Type: *string
value
Required
- Type: interface{}
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)