Terraform
Go: Classes
Annotations
Includes API for attaching annotations such as warning messages to constructs.
Methods
| Name | Description |
|---|---|
AddError | Adds an { "error": < message > } metadata entry to this construct. |
AddInfo | Adds an info metadata entry to this construct. |
AddWarning | Adds a warning metadata entry to this construct. |
AddError
func AddError(message *string)
Adds an { "error": < message > } metadata entry to this construct.
The toolkit will fail synthesis when errors are reported.
messageRequired
- Type: *string
The error message.
AddInfo
func AddInfo(message *string)
Adds an info metadata entry to this construct.
The CLI will display the info message when apps are synthesized.
messageRequired
- Type: *string
The info message.
AddWarning
func AddWarning(message *string)
Adds a warning metadata entry to this construct.
The CLI will display the warning when an app is synthesized. In a future release the CLI might introduce a --strict flag which will then fail the synthesis if it encounters a warning.
messageRequired
- Type: *string
The warning message.
Static Functions
| Name | Description |
|---|---|
Of | Returns the annotations API for a construct scope. |
Of
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Annotations_Of(scope IConstruct) Annotations
Returns the annotations API for a construct scope.
scopeRequired
- Type: github.com/aws/constructs-go/constructs/v10.IConstruct
The scope.
AnyListList
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewAnyListList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) AnyListList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
AllWithMapKey | Creating an iterator for this complex list. |
ComputeFqn | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
AllWithMapKey
func AllWithMapKey(mapKeyAttributeName *string) DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeNameRequired
- Type: *string
ComputeFqn
func ComputeFqn() *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(index *f64) IResolvable
indexRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
AnyListMap
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewAnyListMap(terraformResource IInterpolatingParent, terraformAttribute *string) AnyListMap
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(key *string) IResolvable
keyRequired
- Type: *string
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
AnyMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewAnyMap(terraformResource IInterpolatingParent, terraformAttribute *string) AnyMap
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
Lookup | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
ComputeFqn
func ComputeFqn() *string
Lookup
func Lookup(key *string) interface{}
keyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
AnyMapList
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewAnyMapList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) AnyMapList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(index *f64) AnyMap
indexRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
Aspects
Aspects can be applied to CDK tree scopes and can operate on the tree before synthesis.
Methods
| Name | Description |
|---|---|
Add | Adds an aspect to apply this scope before synthesis. |
Add
func Add(aspect IAspect)
Adds an aspect to apply this scope before synthesis.
aspectRequired
- Type: IAspect
The aspect to add.
Static Functions
| Name | Description |
|---|---|
Of | Returns the Aspects object associated with a construct scope. |
Of
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Aspects_Of(scope IConstruct) Aspects
Returns the Aspects object associated with a construct scope.
scopeRequired
- Type: github.com/aws/constructs-go/constructs/v10.IConstruct
The scope for which these aspects will apply.
Properties
AllRequired
func All() *[]IAspect
- Type: *[]IAspect
The list of aspects which were directly applied on this scope.
AssertionReturn
Class representing the contents of a return by an assertion.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf/testingmatchers"
testingmatchers.NewAssertionReturn(message *string, pass *bool) AssertionReturn
| Name | Type | Description |
|---|---|---|
message | *string | - String message containing information about the result of the assertion. |
pass | *bool | - Boolean pass denoting the success of the assertion. |
messageRequired
- Type: *string
String message containing information about the result of the assertion.
passRequired
- Type: *bool
Boolean pass denoting the success of the assertion.
Properties
| Name | Type | Description |
|---|---|---|
Message | *string | - String message containing information about the result of the assertion. |
Pass | *bool | - Boolean pass denoting the success of the assertion. |
MessageRequired
func Message() *string
- Type: *string
String message containing information about the result of the assertion.
PassRequired
func Pass() *bool
- Type: *bool
Boolean pass denoting the success of the assertion.
BooleanList
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewBooleanList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) BooleanList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
AllWithMapKey | Creating an iterator for this complex list. |
ComputeFqn | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
AllWithMapKey
func AllWithMapKey(mapKeyAttributeName *string) DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeNameRequired
- Type: *string
ComputeFqn
func ComputeFqn() *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(index *f64) IResolvable
indexRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
BooleanListList
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewBooleanListList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) BooleanListList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
AllWithMapKey | Creating an iterator for this complex list. |
ComputeFqn | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
AllWithMapKey
func AllWithMapKey(mapKeyAttributeName *string) DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeNameRequired
- Type: *string
ComputeFqn
func ComputeFqn() *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(index *f64) IResolvable
indexRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
BooleanListMap
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewBooleanListMap(terraformResource IInterpolatingParent, terraformAttribute *string) BooleanListMap
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(key *string) IResolvable
keyRequired
- Type: *string
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
BooleanMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewBooleanMap(terraformResource IInterpolatingParent, terraformAttribute *string) BooleanMap
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
Lookup | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
ComputeFqn
func ComputeFqn() *string
Lookup
func Lookup(key *string) IResolvable
keyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
BooleanMapList
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewBooleanMapList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) BooleanMapList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(index *f64) BooleanMap
indexRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
CloudWorkspace
A cloud workspace can either be a single named workspace, or a list of tagged workspaces.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewCloudWorkspace() CloudWorkspace
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
ToTerraform | No description. |
ToTerraform
func ToTerraform() interface{}
ComplexComputedList
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewComplexComputedList(terraformResource IInterpolatingParent, terraformAttribute *string, complexComputedListIndex *string, wrapsSet *bool) ComplexComputedList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
complexComputedListIndex | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
complexComputedListIndexRequired
- Type: *string
wrapsSetOptional
- Type: *bool
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
GetAnyMapAttribute | No description. |
GetBooleanAttribute | No description. |
GetBooleanMapAttribute | No description. |
GetListAttribute | No description. |
GetNumberAttribute | No description. |
GetNumberListAttribute | No description. |
GetNumberMapAttribute | No description. |
GetStringAttribute | No description. |
GetStringMapAttribute | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
ComputeFqn
ComputeFqnfunc ComputeFqn() *string
GetAnyMapAttribute
GetAnyMapAttributefunc GetAnyMapAttribute(terraformAttribute *string) *map[string]interface{}
terraformAttributeRequired
- Type: *string
GetBooleanAttribute
GetBooleanAttributefunc GetBooleanAttribute(terraformAttribute *string) IResolvable
terraformAttributeRequired
- Type: *string
GetBooleanMapAttribute
GetBooleanMapAttributefunc GetBooleanMapAttribute(terraformAttribute *string) *map[string]*bool
terraformAttributeRequired
- Type: *string
GetListAttribute
GetListAttributefunc GetListAttribute(terraformAttribute *string) *[]*string
terraformAttributeRequired
- Type: *string
GetNumberAttribute
GetNumberAttributefunc GetNumberAttribute(terraformAttribute *string) *f64
terraformAttributeRequired
- Type: *string
GetNumberListAttribute
GetNumberListAttributefunc GetNumberListAttribute(terraformAttribute *string) *[]*f64
terraformAttributeRequired
- Type: *string
GetNumberMapAttribute
GetNumberMapAttributefunc GetNumberMapAttribute(terraformAttribute *string) *map[string]*f64
terraformAttributeRequired
- Type: *string
GetStringAttribute
GetStringAttributefunc GetStringAttribute(terraformAttribute *string) *string
terraformAttributeRequired
- Type: *string
GetStringMapAttribute
GetStringMapAttributefunc GetStringMapAttribute(terraformAttribute *string) *map[string]*string
terraformAttributeRequired
- Type: *string
InterpolationForAttribute
InterpolationForAttributefunc InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
Resolvefunc Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
ToStringfunc ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
CreationStack- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
Fqn- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
func Fqn() *string
- Type: *string
ComplexList
- Implements: ITerraformAddressable, IResolvable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewComplexList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) ComplexList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
AllWithMapKey | Creating an iterator for this complex list. |
ComputeFqn | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
AllWithMapKey
func AllWithMapKey(mapKeyAttributeName *string) DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeNameRequired
- Type: *string
ComputeFqn
func ComputeFqn() *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
ComplexMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewComplexMap(terraformResource IInterpolatingParent, terraformAttribute *string) ComplexMap
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
ComplexObject
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewComplexObject(terraformResource IInterpolatingParent, terraformAttribute *string, complexObjectIsFromSet *bool, complexObjectIndex interface{}) ComplexObject
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
complexObjectIsFromSet | *bool | set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items. |
complexObjectIndex | interface{} | the index of the complex object in a list. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
complexObjectIsFromSetRequired
- Type: *bool
set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items.
complexObjectIndexOptional
- Type: interface{}
the index of the complex object in a list.
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
GetAnyMapAttribute | No description. |
GetBooleanAttribute | No description. |
GetBooleanMapAttribute | No description. |
GetListAttribute | No description. |
GetNumberAttribute | No description. |
GetNumberListAttribute | No description. |
GetNumberMapAttribute | No description. |
GetStringAttribute | No description. |
GetStringMapAttribute | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
ComputeFqn
func ComputeFqn() *string
GetAnyMapAttribute
func GetAnyMapAttribute(terraformAttribute *string) *map[string]interface{}
terraformAttributeRequired
- Type: *string
GetBooleanAttribute
func GetBooleanAttribute(terraformAttribute *string) IResolvable
terraformAttributeRequired
- Type: *string
GetBooleanMapAttribute
func GetBooleanMapAttribute(terraformAttribute *string) *map[string]*bool
terraformAttributeRequired
- Type: *string
GetListAttribute
func GetListAttribute(terraformAttribute *string) *[]*string
terraformAttributeRequired
- Type: *string
GetNumberAttribute
func GetNumberAttribute(terraformAttribute *string) *f64
terraformAttributeRequired
- Type: *string
GetNumberListAttribute
func GetNumberListAttribute(terraformAttribute *string) *[]*f64
terraformAttributeRequired
- Type: *string
GetNumberMapAttribute
func GetNumberMapAttribute(terraformAttribute *string) *map[string]*f64
terraformAttributeRequired
- Type: *string
GetStringAttribute
func GetStringAttribute(terraformAttribute *string) *string
terraformAttributeRequired
- Type: *string
GetStringMapAttribute
func GetStringMapAttribute(terraformAttribute *string) *map[string]*string
terraformAttributeRequired
- Type: *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
DefaultTokenResolver
- Implements: ITokenResolver
Default resolver implementation.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewDefaultTokenResolver(concat IFragmentConcatenator) DefaultTokenResolver
| Name | Type | Description |
|---|---|---|
concat | IFragmentConcatenator | No description. |
concatRequired
- Type: IFragmentConcatenator
Methods
| Name | Description |
|---|---|
ResolveList | Resolves a list of string. |
ResolveMap | Resolves a map token. |
ResolveNumberList | Resolves a list of numbers. |
ResolveString | Resolve string fragments to Tokens. |
ResolveToken | Default Token resolution. |
ResolveList
func ResolveList(xs *[]*string, context IResolveContext) interface{}
Resolves a list of string.
xsRequired
- Type: _[]_string
contextRequired
- Type: IResolveContext
ResolveMap
func ResolveMap(xs *map[string]interface{}, context IResolveContext) interface{}
Resolves a map token.
xsRequired
- Type: *map[string]interface{}
contextRequired
- Type: IResolveContext
ResolveNumberList
func ResolveNumberList(xs *[]*f64, context IResolveContext) interface{}
Resolves a list of numbers.
xsRequired
- Type: _[]_f64
contextRequired
- Type: IResolveContext
ResolveString
func ResolveString(fragments TokenizedStringFragments, context IResolveContext) interface{}
Resolve string fragments to Tokens.
fragmentsRequired
- Type: TokenizedStringFragments
contextRequired
- Type: IResolveContext
ResolveToken
func ResolveToken(t IResolvable, context IResolveContext, postProcessor IPostProcessor) interface{}
Default Token resolution.
Resolve the Token, recurse into whatever it returns, then finally post-process it.
tRequired
- Type: IResolvable
contextRequired
- Type: IResolveContext
postProcessorRequired
- Type: IPostProcessor
DynamicListTerraformIterator
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewDynamicListTerraformIterator(list interface{}, mapKeyAttributeName *string) DynamicListTerraformIterator
| Name | Type | Description |
|---|---|---|
list | interface{} | No description. |
mapKeyAttributeName | *string | No description. |
listRequired
- Type: interface{}
mapKeyAttributeNameRequired
- Type: *string
Methods
| Name | Description |
|---|---|
Dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
ForExpressionForList | Creates a for expression that results in a list. |
ForExpressionForMap | Creates a for expression that results in a map. |
GetAny | No description. |
GetAnyMap | No description. |
GetBoolean | No description. |
GetBooleanMap | No description. |
GetList | No description. |
GetMap | No description. |
GetNumber | No description. |
GetNumberList | No description. |
GetNumberMap | No description. |
GetString | No description. |
GetStringMap | No description. |
Keys | Creates a for expression that maps the iterators to its keys. |
PluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
Values | Creates a for expression that maps the iterators to its value in case it is a map. |
Dynamic
func Dynamic(attributes *map[string]interface{}) IResolvable
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributesRequired
- Type: *map[string]interface{}
ForExpressionForList
func ForExpressionForList(expression interface{}) IResolvable
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ].
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
expressionRequired
- Type: interface{}
The expression to use in the for mapping.
ForExpressionForMap
func ForExpressionForMap(keyExpression interface{}, valueExpression interface{}) IResolvable
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
keyExpressionRequired
- Type: interface{}
The expression to use as key in the for mapping.
valueExpressionRequired
- Type: interface{}
The expression to use as value in the for mapping.
GetAny
func GetAny(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetAnyMap
func GetAnyMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetBoolean
func GetBoolean(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetBooleanMap
func GetBooleanMap(attribute *string) *map[string]*bool
attributeRequired
- Type: *string
name of the property to retrieve.
GetList
func GetList(attribute *string) *[]*string
attributeRequired
- Type: *string
name of the property to retrieve.
GetMap
func GetMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumber
func GetNumber(attribute *string) *f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberList
func GetNumberList(attribute *string) *[]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberMap
func GetNumberMap(attribute *string) *map[string]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetString
func GetString(attribute *string) *string
attributeRequired
- Type: *string
name of the property to retrieve.
GetStringMap
func GetStringMap(attribute *string) *map[string]*string
attributeRequired
- Type: *string
name of the property to retrieve.
Keys
func Keys() IResolvable
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
PluckProperty
func PluckProperty(property *string) IResolvable
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
propertyRequired
- Type: *string
The property of the iterators values to map to.
Values
func Values() IResolvable
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
Static Functions
| Name | Description |
|---|---|
FromComplexList | Creates a new iterator from a complex list. |
FromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
FromList | Creates a new iterator from a list. |
FromMap | Creates a new iterator from a map. |
FromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
FromComplexList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DynamicListTerraformIterator_FromComplexList(list interface{}, mapKeyAttributeName *string) DynamicListTerraformIterator
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
// Example automatically generated from non-compiling source. May contain errors.
cert := NewAcmCertificate(this, jsii.String("cert"), map[string]*string{
"domainName": jsii.String("example.com"),
"validationMethod": jsii.String("DNS"),
})
dvoIterator := terraformIterator_FromComplexList(cert.domainValidationOptions, jsii.String("domain_name"))
NewRoute53Record(this, jsii.String("record"), map[string]interface{}{
"allowOverwrite": jsii.Boolean(true),
"name": dvoIterator.getString(jsii.String("name")),
"records": []interface{}{
dvoIterator.getString(jsii.String("record")),
},
"ttl": jsii.Number(60),
"type": dvoIterator.getString(jsii.String("type")),
"zoneId": Token_asString(dataAwsRoute53ZoneExample.zoneId),
"forEach": dvoIterator,
})
listRequired
- Type: interface{}
the list to iterate over.
mapKeyAttributeNameRequired
- Type: *string
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
FromDataSources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DynamicListTerraformIterator_FromDataSources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a data source that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
FromList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DynamicListTerraformIterator_FromList(list interface{}) ListTerraformIterator
Creates a new iterator from a list.
listRequired
- Type: interface{}
FromMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DynamicListTerraformIterator_FromMap(map interface{}) MapTerraformIterator
Creates a new iterator from a map.
mapRequired
- Type: interface{}
FromResources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.DynamicListTerraformIterator_FromResources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a resource that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
Properties
| Name | Type | Description |
|---|---|---|
Key | *string | Returns the key of the current entry in the map that is being iterated over. |
Value | interface{} | Returns the value of the current item iterated over. |
KeyRequired
func Key() *string
- Type: *string
Returns the key of the current entry in the map that is being iterated over.
ValueRequired
func Value() interface{}
- Type: interface{}
Returns the value of the current item iterated over.
Fn
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewFn() Fn
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
Abs | {@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it. |
Abspath | {@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory. |
Alltrue | {@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true if all elements in a given collection are true or "true". It also returns true if the collection is empty. |
Anytrue | {@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true if any element in a given collection is true or "true". It also returns false if the collection is empty. |
Base64decode | {@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string. |
Base64encode | {@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string. |
Base64gzip | {@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding. |
Base64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test")) since sha256() returns hexadecimal representation. |
Base64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test")) since sha512() returns hexadecimal representation. |
Basename | {@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it. |
Can | {@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors. |
Ceil | {@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction. |
Chomp | {@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string. |
Chunklist | {@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists. |
Cidrhost | {@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix. |
Cidrnetmask | {@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address. |
Cidrsubnet | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix. |
Cidrsubnets | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix. |
Coalesce | {@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string. |
Coalescelist | {@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty. |
Compact | {@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed. |
Concat | {@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list. |
Contains | {@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements. |
Csvdecode | {@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data. |
Dirname | {@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it. |
Distinct | {@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed. |
Element | {@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list. |
Endswith | {@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix. |
File | {@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string. |
Filebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string. |
Filebase64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string. |
Filebase64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string. |
Fileexists | {@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path. |
Filemd5 | {@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string. |
Fileset | {@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/) as the path separator for cross-system compatibility. |
Filesha1 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string. |
Filesha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string. |
Filesha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string. |
Flatten | {@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents. |
Floor | {@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction. |
Format | The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf function in C, and other similar functions in other programming languages. |
Formatdate | {@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format. |
Formatlist | {@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string. |
Indent | {@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string. |
Index | {@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list. |
Jsondecode | {@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string. |
Jsonencode | {@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax. |
Keys | {@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map. |
LengthOf | {@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string. |
Log | {@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base. |
Lower | {@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase. |
Matchkeys | {@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list. |
Max | {@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set. |
Md5 | {@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits. |
Merge | {@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments. |
Min | {@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set. |
Nonsensitive | {@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value. |
One | {@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one returns null. Otherwise, one returns the first element. If there are two or more elements then one will return an error. |
Parseint | {@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive. |
Pathexpand | {@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~ segment, and if so it replaces that segment with the current user's home directory path. |
Plantimestamp | {@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan. |
Pow | {@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument. |
Regex | {@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings. |
Regexall | {@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches. |
Replace | {@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string. |
Reverse | {@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order. |
Rsadecrypt | {@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext. |
Sensitive | {@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables. |
Setintersection | The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets. |
Setproduct | The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product. |
Setsubtract | The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set. |
Setunion | The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets. |
Sha1 | {@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits. |
Sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits. |
Sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits. |
Signum | {@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign. |
Slice | {@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list. |
Sort | {@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically. |
Split | {@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator. |
Startswith | {@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix. |
Strcontains | {@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it. |
Strrev | {@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected). |
Substr | {@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length. |
Sum | {@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers. |
Templatefile | {@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables. |
Textdecodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. |
Textencodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters. |
Timeadd | {@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp. |
Timecmp | {@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent. |
Timestamp | {@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format. |
Title | {@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase. |
Tobool | {@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value. |
Tolist | {@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value. |
Tomap | {@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value. |
Tonumber | {@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value. |
Toset | {@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value. |
Tostring | {@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value. |
Transpose | {@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings. |
Trim | {@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string. |
Trimprefix | {@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged. |
Trimspace | {@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string. |
Trimsuffix | {@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string. |
Try | {@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors. |
Upper | {@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase. |
Urlencode | {@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string. |
Uuid | {@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string. |
Uuidv5 | {@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID. |
Values | {@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map. |
Yamldecode | {@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value. |
Yamlencode | {@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax. |
Zipmap | {@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values. |
Bcrypt | {@link /terraform/docs/language/functions/bcrypt.html bcrypt} computes a hash of the given string using the Blowfish cipher, returning a string in the Modular Crypt Format usually expected in the shadow password file on many Unix systems. |
Conditional | {@link https://developer.hashicorp.com/terraform/language/expressions/conditionals} A conditional expression uses the value of a boolean expression to select one of two values. |
Join | {@link /terraform/docs/language/functions/join.html join} produces a string by concatenating together all elements of a given list of strings with the given delimiter. |
Lookup | {@link /terraform/docs/language/functions/lookup.html lookup} retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead. |
LookupNested | returns a property access expression that accesses the property at the given path in the given inputMap. |
Range | {@link /terraform/docs/language/functions/range.html range} generates a list of numbers using a start value, a limit value, and a step value. |
RawString | Use this function to wrap a string and escape it properly for the use in Terraform This is only needed in certain scenarios (e.g., if you have unescaped double quotes in the string). |
Abs
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Abs(num *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it.
numRequired
- Type: *f64
Abspath
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Abspath(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory.
pathRequired
- Type: *string
Alltrue
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Alltrue(list *[]interface{}) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true if all elements in a given collection are true or "true". It also returns true if the collection is empty.
listRequired
- Type: *[]interface{}
Anytrue
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Anytrue(list *[]interface{}) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true if any element in a given collection is true or "true". It also returns false if the collection is empty.
listRequired
- Type: *[]interface{}
Base64decode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Base64decode(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string.
strRequired
- Type: *string
Base64encode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Base64encode(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
strRequired
- Type: *string
Base64gzip
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Base64gzip(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding.
strRequired
- Type: *string
Base64sha256
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Base64sha256(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test")) since sha256() returns hexadecimal representation.
strRequired
- Type: *string
Base64sha512
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Base64sha512(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test")) since sha512() returns hexadecimal representation.
strRequired
- Type: *string
Basename
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Basename(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it.
pathRequired
- Type: *string
Can
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Can(expression interface{}) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors.
expressionRequired
- Type: interface{}
Ceil
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Ceil(num *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction.
numRequired
- Type: *f64
Chomp
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Chomp(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
strRequired
- Type: *string
Chunklist
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Chunklist(list *[]interface{}, size *f64) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists.
listRequired
- Type: *[]interface{}
sizeRequired
- Type: *f64
Cidrhost
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Cidrhost(prefix *string, hostnum *f64) *string
{@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix.
prefixRequired
- Type: *string
hostnumRequired
- Type: *f64
Cidrnetmask
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Cidrnetmask(prefix *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
prefixRequired
- Type: *string
Cidrsubnet
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Cidrsubnet(prefix *string, newbits *f64, netnum *f64) *string
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
prefixRequired
- Type: *string
newbitsRequired
- Type: *f64
netnumRequired
- Type: *f64
Cidrsubnets
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Cidrsubnets(prefix *string, newbits *[]*f64) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix.
prefixRequired
- Type: *string
newbitsRequired
- Type: _[]_f64
Coalesce
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Coalesce(vals *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string.
valsRequired
- Type: *[]interface{}
Coalescelist
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Coalescelist(vals *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty.
valsRequired
- Type: *[]interface{}
Compact
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Compact(list *[]*string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed.
listRequired
- Type: _[]_string
Concat
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Concat(seqs *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list.
seqsRequired
- Type: *[]interface{}
Contains
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Contains(list interface{}, value interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements.
listRequired
- Type: interface{}
valueRequired
- Type: interface{}
Csvdecode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Csvdecode(str *string) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data.
strRequired
- Type: *string
Dirname
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Dirname(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it.
pathRequired
- Type: *string
Distinct
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Distinct(list *[]interface{}) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed.
listRequired
- Type: *[]interface{}
Element
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Element(list interface{}, index *f64) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
listRequired
- Type: interface{}
indexRequired
- Type: *f64
Endswith
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Endswith(str *string, suffix *string) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix.
strRequired
- Type: *string
suffixRequired
- Type: *string
File
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_File(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string.
pathRequired
- Type: *string
Filebase64
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Filebase64(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string.
pathRequired
- Type: *string
Filebase64sha256
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Filebase64sha256(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Filebase64sha512
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Filebase64sha512(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Fileexists
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Fileexists(path *string) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
pathRequired
- Type: *string
Filemd5
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Filemd5(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Fileset
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Fileset(path *string, pattern *string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/) as the path separator for cross-system compatibility.
pathRequired
- Type: *string
patternRequired
- Type: *string
Filesha1
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Filesha1(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Filesha256
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Filesha256(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Filesha512
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Filesha512(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Flatten
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Flatten(list interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents.
listRequired
- Type: interface{}
Floor
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Floor(num *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction.
numRequired
- Type: *f64
Format
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Format(format *string, args *[]interface{}) interface{}
The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf function in C, and other similar functions in other programming languages.
formatRequired
- Type: *string
argsRequired
- Type: *[]interface{}
Formatdate
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Formatdate(format *string, time *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
formatRequired
- Type: *string
timeRequired
- Type: *string
Formatlist
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Formatlist(format *string, args *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string.
formatRequired
- Type: *string
argsRequired
- Type: *[]interface{}
Indent
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Indent(spaces *f64, str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
spacesRequired
- Type: *f64
strRequired
- Type: *string
Index
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Index(list interface{}, value interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list.
listRequired
- Type: interface{}
valueRequired
- Type: interface{}
Jsondecode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Jsondecode(str *string) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string.
strRequired
- Type: *string
Jsonencode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Jsonencode(val interface{}) *string
{@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax.
valRequired
- Type: interface{}
Keys
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Keys(inputMap interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map.
inputMapRequired
- Type: interface{}
LengthOf
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_LengthOf(value interface{}) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string.
valueRequired
- Type: interface{}
Log
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Log(num *f64, base *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base.
numRequired
- Type: *f64
baseRequired
- Type: *f64
Lower
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Lower(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase.
strRequired
- Type: *string
Matchkeys
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Matchkeys(values *[]interface{}, keys *[]interface{}, searchset *[]interface{}) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list.
valuesRequired
- Type: *[]interface{}
keysRequired
- Type: *[]interface{}
searchsetRequired
- Type: *[]interface{}
Max
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Max(numbers *[]*f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set.
numbersRequired
- Type: _[]_f64
Md5
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Md5(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits.
strRequired
- Type: *string
Merge
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Merge(maps *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments.
mapsRequired
- Type: *[]interface{}
Min
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Min(numbers *[]*f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set.
numbersRequired
- Type: _[]_f64
Nonsensitive
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Nonsensitive(value interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value.
valueRequired
- Type: interface{}
One
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_One(list interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one returns null. Otherwise, one returns the first element. If there are two or more elements then one will return an error.
listRequired
- Type: interface{}
Parseint
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Parseint(number interface{}, base *f64) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive.
numberRequired
- Type: interface{}
baseRequired
- Type: *f64
Pathexpand
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Pathexpand(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~ segment, and if so it replaces that segment with the current user's home directory path.
pathRequired
- Type: *string
Plantimestamp
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Plantimestamp() *string
{@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan.
Pow
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Pow(num *f64, power *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument.
numRequired
- Type: *f64
powerRequired
- Type: *f64
Regex
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Regex(pattern *string, str *string) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings.
patternRequired
- Type: *string
strRequired
- Type: *string
Regexall
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Regexall(pattern *string, str *string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches.
patternRequired
- Type: *string
strRequired
- Type: *string
Replace
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Replace(str *string, substr *string, replace *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string.
strRequired
- Type: *string
substrRequired
- Type: *string
replaceRequired
- Type: *string
Reverse
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Reverse(list interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order.
listRequired
- Type: interface{}
Rsadecrypt
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Rsadecrypt(ciphertext *string, privatekey *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertextRequired
- Type: *string
privatekeyRequired
- Type: *string
Sensitive
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Sensitive(value interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables.
valueRequired
- Type: interface{}
Setintersection
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Setintersection(first_set *[]interface{}, other_sets *[]*[]interface{}) *[]*string
The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets.
first_setRequired
- Type: *[]interface{}
other_setsRequired
- Type: [][]interface{}
Setproduct
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Setproduct(sets *[]interface{}) interface{}
The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product.
setsRequired
- Type: *[]interface{}
Setsubtract
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Setsubtract(a *[]interface{}, b *[]interface{}) *[]*string
The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set.
aRequired
- Type: *[]interface{}
bRequired
- Type: *[]interface{}
Setunion
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Setunion(first_set *[]interface{}, other_sets *[]*[]interface{}) *[]*string
The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets.
first_setRequired
- Type: *[]interface{}
other_setsRequired
- Type: [][]interface{}
Sha1
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Sha1(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
strRequired
- Type: *string
Sha256
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Sha256(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
strRequired
- Type: *string
Sha512
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Sha512(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
strRequired
- Type: *string
Signum
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Signum(num *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign.
numRequired
- Type: *f64
Slice
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Slice(list interface{}, start_index *f64, end_index *f64) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
listRequired
- Type: interface{}
start_indexRequired
- Type: *f64
end_indexRequired
- Type: *f64
Sort
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Sort(list *[]*string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically.
listRequired
- Type: _[]_string
Split
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Split(separator *string, str *string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator.
separatorRequired
- Type: *string
strRequired
- Type: *string
Startswith
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Startswith(str *string, prefix *string) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix.
strRequired
- Type: *string
prefixRequired
- Type: *string
Strcontains
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Strcontains(str *string, substr *string) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it.
strRequired
- Type: *string
substrRequired
- Type: *string
Strrev
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Strrev(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected).
strRequired
- Type: *string
Substr
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Substr(str *string, offset *f64, length *f64) *string
{@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length.
strRequired
- Type: *string
offsetRequired
- Type: *f64
lengthRequired
- Type: *f64
Sum
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Sum(list interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers.
listRequired
- Type: interface{}
Templatefile
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Templatefile(path *string, vars interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables.
pathRequired
- Type: *string
varsRequired
- Type: interface{}
Textdecodebase64
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Textdecodebase64(source *string, encoding *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding.
sourceRequired
- Type: *string
encodingRequired
- Type: *string
Textencodebase64
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Textencodebase64(str *string, encoding *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters.
strRequired
- Type: *string
encodingRequired
- Type: *string
Timeadd
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Timeadd(timestamp *string, duration *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp.
timestampRequired
- Type: *string
durationRequired
- Type: *string
Timecmp
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Timecmp(timestamp_a *string, timestamp_b *string) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent.
timestamp_aRequired
- Type: *string
timestamp_bRequired
- Type: *string
Timestamp
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Timestamp() *string
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
Title
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Title(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase.
strRequired
- Type: *string
Tobool
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Tobool(v interface{}) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
vRequired
- Type: interface{}
Tolist
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Tolist(v interface{}) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
vRequired
- Type: interface{}
Tomap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Tomap(v interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
vRequired
- Type: interface{}
Tonumber
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Tonumber(v interface{}) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
vRequired
- Type: interface{}
Toset
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Toset(v interface{}) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
vRequired
- Type: interface{}
Tostring
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Tostring(v interface{}) *string
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
vRequired
- Type: interface{}
Transpose
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Transpose(values interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings.
valuesRequired
- Type: interface{}
Trim
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Trim(str *string, cutset *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string.
strRequired
- Type: *string
cutsetRequired
- Type: *string
Trimprefix
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Trimprefix(str *string, prefix *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged.
strRequired
- Type: *string
prefixRequired
- Type: *string
Trimspace
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Trimspace(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string.
strRequired
- Type: *string
Trimsuffix
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Trimsuffix(str *string, suffix *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string.
strRequired
- Type: *string
suffixRequired
- Type: *string
Try
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Try(expressions *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors.
expressionsRequired
- Type: *[]interface{}
Upper
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Upper(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase.
strRequired
- Type: *string
Urlencode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Urlencode(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
strRequired
- Type: *string
Uuid
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Uuid() *string
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
Uuidv5
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Uuidv5(namespace *string, name *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID.
namespaceRequired
- Type: *string
nameRequired
- Type: *string
Values
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Values(mapping interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map.
mappingRequired
- Type: interface{}
Yamldecode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Yamldecode(src *string) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value.
srcRequired
- Type: *string
Yamlencode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Yamlencode(value interface{}) *string
{@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax.
valueRequired
- Type: interface{}
Zipmap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Zipmap(keys *[]*string, values interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values.
keysRequired
- Type: _[]_string
valuesRequired
- Type: interface{}
Bcrypt
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Bcrypt(str *string, cost *f64) *string
{@link /terraform/docs/language/functions/bcrypt.html bcrypt} computes a hash of the given string using the Blowfish cipher, returning a string in the Modular Crypt Format usually expected in the shadow password file on many Unix systems.
strRequired
- Type: *string
costOptional
- Type: *f64
Conditional
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Conditional(condition interface{}, trueValue interface{}, falseValue interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/expressions/conditionals} A conditional expression uses the value of a boolean expression to select one of two values.
conditionRequired
- Type: interface{}
trueValueRequired
- Type: interface{}
falseValueRequired
- Type: interface{}
Join
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Join(separator *string, list *[]*string) *string
{@link /terraform/docs/language/functions/join.html join} produces a string by concatenating together all elements of a given list of strings with the given delimiter.
separatorRequired
- Type: *string
listRequired
- Type: _[]_string
Lookup
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Lookup(inputMap interface{}, key *string, defaultValue interface{}) interface{}
{@link /terraform/docs/language/functions/lookup.html lookup} retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead.
inputMapRequired
- Type: interface{}
keyRequired
- Type: *string
defaultValueOptional
- Type: interface{}
LookupNested
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_LookupNested(inputMap interface{}, path *[]interface{}) interface{}
returns a property access expression that accesses the property at the given path in the given inputMap.
For example lookupNested(x, ["a", "b", "c"]) will return a Terraform expression like x["a"]["b"]["c"]
inputMapRequired
- Type: interface{}
pathRequired
- Type: *[]interface{}
Range
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_Range(start *f64, limit *f64, step *f64) *[]*string
{@link /terraform/docs/language/functions/range.html range} generates a list of numbers using a start value, a limit value, and a step value.
startRequired
- Type: *f64
limitRequired
- Type: *f64
stepOptional
- Type: *f64
RawString
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Fn_RawString(str *string) *string
Use this function to wrap a string and escape it properly for the use in Terraform This is only needed in certain scenarios (e.g., if you have unescaped double quotes in the string).
strRequired
- Type: *string
FnGenerated
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewFnGenerated() FnGenerated
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
Abs | {@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it. |
Abspath | {@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory. |
Alltrue | {@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true if all elements in a given collection are true or "true". It also returns true if the collection is empty. |
Anytrue | {@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true if any element in a given collection is true or "true". It also returns false if the collection is empty. |
Base64decode | {@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string. |
Base64encode | {@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string. |
Base64gzip | {@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding. |
Base64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test")) since sha256() returns hexadecimal representation. |
Base64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test")) since sha512() returns hexadecimal representation. |
Basename | {@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it. |
Can | {@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors. |
Ceil | {@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction. |
Chomp | {@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string. |
Chunklist | {@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists. |
Cidrhost | {@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix. |
Cidrnetmask | {@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address. |
Cidrsubnet | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix. |
Cidrsubnets | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix. |
Coalesce | {@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string. |
Coalescelist | {@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty. |
Compact | {@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed. |
Concat | {@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list. |
Contains | {@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements. |
Csvdecode | {@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data. |
Dirname | {@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it. |
Distinct | {@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed. |
Element | {@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list. |
Endswith | {@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix. |
File | {@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string. |
Filebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string. |
Filebase64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string. |
Filebase64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string. |
Fileexists | {@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path. |
Filemd5 | {@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string. |
Fileset | {@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/) as the path separator for cross-system compatibility. |
Filesha1 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string. |
Filesha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string. |
Filesha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string. |
Flatten | {@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents. |
Floor | {@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction. |
Format | The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf function in C, and other similar functions in other programming languages. |
Formatdate | {@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format. |
Formatlist | {@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string. |
Indent | {@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string. |
Index | {@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list. |
Jsondecode | {@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string. |
Jsonencode | {@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax. |
Keys | {@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map. |
LengthOf | {@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string. |
Log | {@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base. |
Lower | {@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase. |
Matchkeys | {@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list. |
Max | {@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set. |
Md5 | {@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits. |
Merge | {@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments. |
Min | {@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set. |
Nonsensitive | {@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value. |
One | {@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one returns null. Otherwise, one returns the first element. If there are two or more elements then one will return an error. |
Parseint | {@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive. |
Pathexpand | {@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~ segment, and if so it replaces that segment with the current user's home directory path. |
Plantimestamp | {@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan. |
Pow | {@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument. |
Regex | {@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings. |
Regexall | {@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches. |
Replace | {@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string. |
Reverse | {@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order. |
Rsadecrypt | {@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext. |
Sensitive | {@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables. |
Setintersection | The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets. |
Setproduct | The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product. |
Setsubtract | The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set. |
Setunion | The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets. |
Sha1 | {@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits. |
Sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits. |
Sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits. |
Signum | {@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign. |
Slice | {@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list. |
Sort | {@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically. |
Split | {@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator. |
Startswith | {@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix. |
Strcontains | {@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it. |
Strrev | {@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected). |
Substr | {@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length. |
Sum | {@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers. |
Templatefile | {@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables. |
Textdecodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. |
Textencodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters. |
Timeadd | {@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp. |
Timecmp | {@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent. |
Timestamp | {@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format. |
Title | {@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase. |
Tobool | {@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value. |
Tolist | {@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value. |
Tomap | {@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value. |
Tonumber | {@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value. |
Toset | {@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value. |
Tostring | {@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value. |
Transpose | {@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings. |
Trim | {@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string. |
Trimprefix | {@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged. |
Trimspace | {@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string. |
Trimsuffix | {@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string. |
Try | {@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors. |
Upper | {@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase. |
Urlencode | {@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string. |
Uuid | {@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string. |
Uuidv5 | {@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID. |
Values | {@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map. |
Yamldecode | {@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value. |
Yamlencode | {@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax. |
Zipmap | {@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values. |
Abs
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Abs(num *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it.
numRequired
- Type: *f64
Abspath
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Abspath(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory.
pathRequired
- Type: *string
Alltrue
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Alltrue(list *[]interface{}) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true if all elements in a given collection are true or "true". It also returns true if the collection is empty.
listRequired
- Type: *[]interface{}
Anytrue
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Anytrue(list *[]interface{}) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true if any element in a given collection is true or "true". It also returns false if the collection is empty.
listRequired
- Type: *[]interface{}
Base64decode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Base64decode(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string.
strRequired
- Type: *string
Base64encode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Base64encode(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
strRequired
- Type: *string
Base64gzip
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Base64gzip(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding.
strRequired
- Type: *string
Base64sha256
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Base64sha256(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test")) since sha256() returns hexadecimal representation.
strRequired
- Type: *string
Base64sha512
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Base64sha512(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test")) since sha512() returns hexadecimal representation.
strRequired
- Type: *string
Basename
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Basename(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it.
pathRequired
- Type: *string
Can
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Can(expression interface{}) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors.
expressionRequired
- Type: interface{}
Ceil
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Ceil(num *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction.
numRequired
- Type: *f64
Chomp
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Chomp(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
strRequired
- Type: *string
Chunklist
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Chunklist(list *[]interface{}, size *f64) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists.
listRequired
- Type: *[]interface{}
sizeRequired
- Type: *f64
Cidrhost
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Cidrhost(prefix *string, hostnum *f64) *string
{@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix.
prefixRequired
- Type: *string
hostnumRequired
- Type: *f64
Cidrnetmask
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Cidrnetmask(prefix *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
prefixRequired
- Type: *string
Cidrsubnet
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Cidrsubnet(prefix *string, newbits *f64, netnum *f64) *string
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
prefixRequired
- Type: *string
newbitsRequired
- Type: *f64
netnumRequired
- Type: *f64
Cidrsubnets
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Cidrsubnets(prefix *string, newbits *[]*f64) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix.
prefixRequired
- Type: *string
newbitsRequired
- Type: _[]_f64
Coalesce
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Coalesce(vals *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string.
valsRequired
- Type: *[]interface{}
Coalescelist
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Coalescelist(vals *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty.
valsRequired
- Type: *[]interface{}
Compact
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Compact(list *[]*string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed.
listRequired
- Type: _[]_string
Concat
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Concat(seqs *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list.
seqsRequired
- Type: *[]interface{}
Contains
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Contains(list interface{}, value interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements.
listRequired
- Type: interface{}
valueRequired
- Type: interface{}
Csvdecode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Csvdecode(str *string) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data.
strRequired
- Type: *string
Dirname
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Dirname(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it.
pathRequired
- Type: *string
Distinct
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Distinct(list *[]interface{}) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed.
listRequired
- Type: *[]interface{}
Element
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Element(list interface{}, index *f64) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
listRequired
- Type: interface{}
indexRequired
- Type: *f64
Endswith
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Endswith(str *string, suffix *string) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix.
strRequired
- Type: *string
suffixRequired
- Type: *string
File
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_File(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string.
pathRequired
- Type: *string
Filebase64
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Filebase64(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string.
pathRequired
- Type: *string
Filebase64sha256
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Filebase64sha256(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Filebase64sha512
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Filebase64sha512(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Fileexists
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Fileexists(path *string) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
pathRequired
- Type: *string
Filemd5
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Filemd5(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Fileset
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Fileset(path *string, pattern *string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/) as the path separator for cross-system compatibility.
pathRequired
- Type: *string
patternRequired
- Type: *string
Filesha1
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Filesha1(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Filesha256
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Filesha256(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Filesha512
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Filesha512(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string.
pathRequired
- Type: *string
Flatten
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Flatten(list interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents.
listRequired
- Type: interface{}
Floor
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Floor(num *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction.
numRequired
- Type: *f64
Format
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Format(format *string, args *[]interface{}) interface{}
The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf function in C, and other similar functions in other programming languages.
formatRequired
- Type: *string
argsRequired
- Type: *[]interface{}
Formatdate
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Formatdate(format *string, time *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
formatRequired
- Type: *string
timeRequired
- Type: *string
Formatlist
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Formatlist(format *string, args *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string.
formatRequired
- Type: *string
argsRequired
- Type: *[]interface{}
Indent
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Indent(spaces *f64, str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
spacesRequired
- Type: *f64
strRequired
- Type: *string
Index
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Index(list interface{}, value interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list.
listRequired
- Type: interface{}
valueRequired
- Type: interface{}
Jsondecode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Jsondecode(str *string) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string.
strRequired
- Type: *string
Jsonencode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Jsonencode(val interface{}) *string
{@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax.
valRequired
- Type: interface{}
Keys
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Keys(inputMap interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map.
inputMapRequired
- Type: interface{}
LengthOf
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_LengthOf(value interface{}) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string.
valueRequired
- Type: interface{}
Log
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Log(num *f64, base *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base.
numRequired
- Type: *f64
baseRequired
- Type: *f64
Lower
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Lower(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase.
strRequired
- Type: *string
Matchkeys
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Matchkeys(values *[]interface{}, keys *[]interface{}, searchset *[]interface{}) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list.
valuesRequired
- Type: *[]interface{}
keysRequired
- Type: *[]interface{}
searchsetRequired
- Type: *[]interface{}
Max
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Max(numbers *[]*f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set.
numbersRequired
- Type: _[]_f64
Md5
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Md5(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits.
strRequired
- Type: *string
Merge
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Merge(maps *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments.
mapsRequired
- Type: *[]interface{}
Min
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Min(numbers *[]*f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set.
numbersRequired
- Type: _[]_f64
Nonsensitive
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Nonsensitive(value interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value.
valueRequired
- Type: interface{}
One
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_One(list interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one returns null. Otherwise, one returns the first element. If there are two or more elements then one will return an error.
listRequired
- Type: interface{}
Parseint
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Parseint(number interface{}, base *f64) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive.
numberRequired
- Type: interface{}
baseRequired
- Type: *f64
Pathexpand
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Pathexpand(path *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~ segment, and if so it replaces that segment with the current user's home directory path.
pathRequired
- Type: *string
Plantimestamp
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Plantimestamp() *string
{@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan.
Pow
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Pow(num *f64, power *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument.
numRequired
- Type: *f64
powerRequired
- Type: *f64
Regex
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Regex(pattern *string, str *string) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings.
patternRequired
- Type: *string
strRequired
- Type: *string
Regexall
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Regexall(pattern *string, str *string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches.
patternRequired
- Type: *string
strRequired
- Type: *string
Replace
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Replace(str *string, substr *string, replace *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string.
strRequired
- Type: *string
substrRequired
- Type: *string
replaceRequired
- Type: *string
Reverse
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Reverse(list interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order.
listRequired
- Type: interface{}
Rsadecrypt
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Rsadecrypt(ciphertext *string, privatekey *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertextRequired
- Type: *string
privatekeyRequired
- Type: *string
Sensitive
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Sensitive(value interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables.
valueRequired
- Type: interface{}
Setintersection
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Setintersection(first_set *[]interface{}, other_sets *[]*[]interface{}) *[]*string
The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets.
first_setRequired
- Type: *[]interface{}
other_setsRequired
- Type: [][]interface{}
Setproduct
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Setproduct(sets *[]interface{}) interface{}
The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product.
setsRequired
- Type: *[]interface{}
Setsubtract
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Setsubtract(a *[]interface{}, b *[]interface{}) *[]*string
The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set.
aRequired
- Type: *[]interface{}
bRequired
- Type: *[]interface{}
Setunion
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Setunion(first_set *[]interface{}, other_sets *[]*[]interface{}) *[]*string
The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets.
first_setRequired
- Type: *[]interface{}
other_setsRequired
- Type: [][]interface{}
Sha1
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Sha1(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
strRequired
- Type: *string
Sha256
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Sha256(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
strRequired
- Type: *string
Sha512
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Sha512(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
strRequired
- Type: *string
Signum
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Signum(num *f64) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign.
numRequired
- Type: *f64
Slice
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Slice(list interface{}, start_index *f64, end_index *f64) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
listRequired
- Type: interface{}
start_indexRequired
- Type: *f64
end_indexRequired
- Type: *f64
Sort
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Sort(list *[]*string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically.
listRequired
- Type: _[]_string
Split
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Split(separator *string, str *string) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator.
separatorRequired
- Type: *string
strRequired
- Type: *string
Startswith
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Startswith(str *string, prefix *string) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix.
strRequired
- Type: *string
prefixRequired
- Type: *string
Strcontains
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Strcontains(str *string, substr *string) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it.
strRequired
- Type: *string
substrRequired
- Type: *string
Strrev
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Strrev(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected).
strRequired
- Type: *string
Substr
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Substr(str *string, offset *f64, length *f64) *string
{@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length.
strRequired
- Type: *string
offsetRequired
- Type: *f64
lengthRequired
- Type: *f64
Sum
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Sum(list interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers.
listRequired
- Type: interface{}
Templatefile
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Templatefile(path *string, vars interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables.
pathRequired
- Type: *string
varsRequired
- Type: interface{}
Textdecodebase64
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Textdecodebase64(source *string, encoding *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding.
sourceRequired
- Type: *string
encodingRequired
- Type: *string
Textencodebase64
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Textencodebase64(str *string, encoding *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters.
strRequired
- Type: *string
encodingRequired
- Type: *string
Timeadd
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Timeadd(timestamp *string, duration *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp.
timestampRequired
- Type: *string
durationRequired
- Type: *string
Timecmp
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Timecmp(timestamp_a *string, timestamp_b *string) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent.
timestamp_aRequired
- Type: *string
timestamp_bRequired
- Type: *string
Timestamp
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Timestamp() *string
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
Title
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Title(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase.
strRequired
- Type: *string
Tobool
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Tobool(v interface{}) IResolvable
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
vRequired
- Type: interface{}
Tolist
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Tolist(v interface{}) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
vRequired
- Type: interface{}
Tomap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Tomap(v interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
vRequired
- Type: interface{}
Tonumber
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Tonumber(v interface{}) *f64
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
vRequired
- Type: interface{}
Toset
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Toset(v interface{}) *[]*string
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
vRequired
- Type: interface{}
Tostring
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Tostring(v interface{}) *string
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
vRequired
- Type: interface{}
Transpose
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Transpose(values interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings.
valuesRequired
- Type: interface{}
Trim
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Trim(str *string, cutset *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string.
strRequired
- Type: *string
cutsetRequired
- Type: *string
Trimprefix
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Trimprefix(str *string, prefix *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged.
strRequired
- Type: *string
prefixRequired
- Type: *string
Trimspace
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Trimspace(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string.
strRequired
- Type: *string
Trimsuffix
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Trimsuffix(str *string, suffix *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string.
strRequired
- Type: *string
suffixRequired
- Type: *string
Try
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Try(expressions *[]interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors.
expressionsRequired
- Type: *[]interface{}
Upper
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Upper(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase.
strRequired
- Type: *string
Urlencode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Urlencode(str *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
strRequired
- Type: *string
Uuid
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Uuid() *string
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
Uuidv5
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Uuidv5(namespace *string, name *string) *string
{@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID.
namespaceRequired
- Type: *string
nameRequired
- Type: *string
Values
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Values(mapping interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map.
mappingRequired
- Type: interface{}
Yamldecode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Yamldecode(src *string) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value.
srcRequired
- Type: *string
Yamlencode
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Yamlencode(value interface{}) *string
{@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax.
valueRequired
- Type: interface{}
Zipmap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.FnGenerated_Zipmap(keys *[]*string, values interface{}) interface{}
{@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values.
keysRequired
- Type: _[]_string
valuesRequired
- Type: interface{}
Lazy
Lazily produce a value.
Can be used to return a string, list or numeric value whose actual value will only be calculated later, during synthesis.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewLazy() Lazy
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
AnyValue | Produces a lazy token from an untyped value. |
ListValue | Returns a list-ified token for a lazy value. |
NumberValue | Returns a numberified token for a lazy value. |
StringValue | Returns a stringified token for a lazy value. |
AnyValue
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Lazy_AnyValue(producer IAnyProducer, options LazyAnyValueOptions) IResolvable
Produces a lazy token from an untyped value.
producerRequired
- Type: IAnyProducer
The lazy producer.
optionsOptional
- Type: LazyAnyValueOptions
Options.
ListValue
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Lazy_ListValue(producer IListProducer, options LazyListValueOptions) *[]*string
Returns a list-ified token for a lazy value.
producerRequired
- Type: IListProducer
The producer.
optionsOptional
- Type: LazyListValueOptions
Options.
NumberValue
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Lazy_NumberValue(producer INumberProducer) *f64
Returns a numberified token for a lazy value.
producerRequired
- Type: INumberProducer
The producer.
StringValue
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Lazy_StringValue(producer IStringProducer, options LazyStringValueOptions) *string
Returns a stringified token for a lazy value.
producerRequired
- Type: IStringProducer
The producer.
optionsOptional
- Type: LazyStringValueOptions
Options.
LazyBase
- Implements: IResolvable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewLazyBase() LazyBase
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
AddPostProcessor | No description. |
Resolve | Produce the Token's value at resolution time. |
ToJSON | Turn this Token into JSON. |
ToString | Return a string representation of this resolvable object. |
AddPostProcessor
func AddPostProcessor(postProcessor IPostProcessor)
postProcessorRequired
- Type: IPostProcessor
Resolve
func Resolve(context IResolveContext) interface{}
Produce the Token's value at resolution time.
contextRequired
- Type: IResolveContext
ToJSON
func ToJSON() interface{}
Turn this Token into JSON.
Called automatically when JSON.stringify() is called on a Token.
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
ListTerraformIterator
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewListTerraformIterator(list interface{}) ListTerraformIterator
| Name | Type | Description |
|---|---|---|
list | interface{} | No description. |
listRequired
- Type: interface{}
Methods
| Name | Description |
|---|---|
Dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
ForExpressionForList | Creates a for expression that results in a list. |
ForExpressionForMap | Creates a for expression that results in a map. |
GetAny | No description. |
GetAnyMap | No description. |
GetBoolean | No description. |
GetBooleanMap | No description. |
GetList | No description. |
GetMap | No description. |
GetNumber | No description. |
GetNumberList | No description. |
GetNumberMap | No description. |
GetString | No description. |
GetStringMap | No description. |
Keys | Creates a for expression that maps the iterators to its keys. |
PluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
Values | Creates a for expression that maps the iterators to its value in case it is a map. |
Dynamic
func Dynamic(attributes *map[string]interface{}) IResolvable
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributesRequired
- Type: *map[string]interface{}
ForExpressionForList
func ForExpressionForList(expression interface{}) IResolvable
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ].
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
expressionRequired
- Type: interface{}
The expression to use in the for mapping.
ForExpressionForMap
func ForExpressionForMap(keyExpression interface{}, valueExpression interface{}) IResolvable
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
keyExpressionRequired
- Type: interface{}
The expression to use as key in the for mapping.
valueExpressionRequired
- Type: interface{}
The expression to use as value in the for mapping.
GetAny
func GetAny(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetAnyMap
func GetAnyMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetBoolean
func GetBoolean(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetBooleanMap
func GetBooleanMap(attribute *string) *map[string]*bool
attributeRequired
- Type: *string
name of the property to retrieve.
GetList
func GetList(attribute *string) *[]*string
attributeRequired
- Type: *string
name of the property to retrieve.
GetMap
func GetMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumber
func GetNumber(attribute *string) *f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberList
func GetNumberList(attribute *string) *[]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberMap
func GetNumberMap(attribute *string) *map[string]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetString
func GetString(attribute *string) *string
attributeRequired
- Type: *string
name of the property to retrieve.
GetStringMap
func GetStringMap(attribute *string) *map[string]*string
attributeRequired
- Type: *string
name of the property to retrieve.
Keys
func Keys() IResolvable
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
PluckProperty
func PluckProperty(property *string) IResolvable
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
propertyRequired
- Type: *string
The property of the iterators values to map to.
Values
func Values() IResolvable
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
Static Functions
| Name | Description |
|---|---|
FromComplexList | Creates a new iterator from a complex list. |
FromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
FromList | Creates a new iterator from a list. |
FromMap | Creates a new iterator from a map. |
FromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
FromComplexList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ListTerraformIterator_FromComplexList(list interface{}, mapKeyAttributeName *string) DynamicListTerraformIterator
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
// Example automatically generated from non-compiling source. May contain errors.
cert := NewAcmCertificate(this, jsii.String("cert"), map[string]*string{
"domainName": jsii.String("example.com"),
"validationMethod": jsii.String("DNS"),
})
dvoIterator := terraformIterator_FromComplexList(cert.domainValidationOptions, jsii.String("domain_name"))
NewRoute53Record(this, jsii.String("record"), map[string]interface{}{
"allowOverwrite": jsii.Boolean(true),
"name": dvoIterator.getString(jsii.String("name")),
"records": []interface{}{
dvoIterator.getString(jsii.String("record")),
},
"ttl": jsii.Number(60),
"type": dvoIterator.getString(jsii.String("type")),
"zoneId": Token_asString(dataAwsRoute53ZoneExample.zoneId),
"forEach": dvoIterator,
})
listRequired
- Type: interface{}
the list to iterate over.
mapKeyAttributeNameRequired
- Type: *string
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
FromDataSources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ListTerraformIterator_FromDataSources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a data source that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
FromList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ListTerraformIterator_FromList(list interface{}) ListTerraformIterator
Creates a new iterator from a list.
listRequired
- Type: interface{}
FromMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ListTerraformIterator_FromMap(map interface{}) MapTerraformIterator
Creates a new iterator from a map.
mapRequired
- Type: interface{}
FromResources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ListTerraformIterator_FromResources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a resource that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
Properties
| Name | Type | Description |
|---|---|---|
Key | interface{} | Returns the currently entry in the list or set that is being iterated over. |
Value | interface{} | Returns the value of the current item iterated over. |
KeyRequired
func Key() interface{}
- Type: interface{}
Returns the currently entry in the list or set that is being iterated over.
For lists this is the same as iterator.value. If you need the index,
use count via TerraformCount:
https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-count
ValueRequired
func Value() interface{}
- Type: interface{}
Returns the value of the current item iterated over.
Manifest
- Implements: IManifest
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewManifest(version *string, outdir *string, hclOutput *bool) Manifest
| Name | Type | Description |
|---|---|---|
version | *string | No description. |
outdir | *string | No description. |
hclOutput | *bool | No description. |
versionRequired
- Type: *string
outdirRequired
- Type: *string
hclOutputRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
BuildManifest | No description. |
ForStack | No description. |
WriteToFile | No description. |
BuildManifest
func BuildManifest() IManifest
ForStack
func ForStack(stack TerraformStack) StackManifest
stackRequired
- Type: TerraformStack
WriteToFile
func WriteToFile()
Properties
| Name | Type | Description |
|---|---|---|
HclOutput | *bool | No description. |
Outdir | *string | No description. |
StackFileName | *string | No description. |
Stacks | *map[string]StackManifest | No description. |
Version | *string | No description. |
HclOutputRequired
func HclOutput() *bool
- Type: *bool
OutdirRequired
func Outdir() *string
- Type: *string
StackFileNameRequired
func StackFileName() *string
- Type: *string
StacksRequired
func Stacks() *map[string]StackManifest
- Type: *map[string]StackManifest
VersionRequired
func Version() *string
- Type: *string
Constants
| Name | Type | Description |
|---|---|---|
FileName | *string | No description. |
StackMetadataPath | *string | No description. |
StacksFolder | *string | No description. |
FileNameRequired
func FileName() *string
- Type: *string
StackMetadataPathRequired
func StackMetadataPath() *string
- Type: *string
StacksFolderRequired
func StacksFolder() *string
- Type: *string
MapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewMapList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) MapList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
MapTerraformIterator
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewMapTerraformIterator(map interface{}) MapTerraformIterator
| Name | Type | Description |
|---|---|---|
map | interface{} | No description. |
mapRequired
- Type: interface{}
Methods
| Name | Description |
|---|---|
Dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
ForExpressionForList | Creates a for expression that results in a list. |
ForExpressionForMap | Creates a for expression that results in a map. |
GetAny | No description. |
GetAnyMap | No description. |
GetBoolean | No description. |
GetBooleanMap | No description. |
GetList | No description. |
GetMap | No description. |
GetNumber | No description. |
GetNumberList | No description. |
GetNumberMap | No description. |
GetString | No description. |
GetStringMap | No description. |
Keys | Creates a for expression that maps the iterators to its keys. |
PluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
Values | Creates a for expression that maps the iterators to its value in case it is a map. |
Dynamic
func Dynamic(attributes *map[string]interface{}) IResolvable
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributesRequired
- Type: *map[string]interface{}
ForExpressionForList
func ForExpressionForList(expression interface{}) IResolvable
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ].
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
expressionRequired
- Type: interface{}
The expression to use in the for mapping.
ForExpressionForMap
func ForExpressionForMap(keyExpression interface{}, valueExpression interface{}) IResolvable
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
keyExpressionRequired
- Type: interface{}
The expression to use as key in the for mapping.
valueExpressionRequired
- Type: interface{}
The expression to use as value in the for mapping.
GetAny
func GetAny(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetAnyMap
func GetAnyMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetBoolean
func GetBoolean(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetBooleanMap
func GetBooleanMap(attribute *string) *map[string]*bool
attributeRequired
- Type: *string
name of the property to retrieve.
GetList
func GetList(attribute *string) *[]*string
attributeRequired
- Type: *string
name of the property to retrieve.
GetMap
func GetMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumber
func GetNumber(attribute *string) *f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberList
func GetNumberList(attribute *string) *[]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberMap
func GetNumberMap(attribute *string) *map[string]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetString
func GetString(attribute *string) *string
attributeRequired
- Type: *string
name of the property to retrieve.
GetStringMap
func GetStringMap(attribute *string) *map[string]*string
attributeRequired
- Type: *string
name of the property to retrieve.
Keys
func Keys() IResolvable
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
PluckProperty
func PluckProperty(property *string) IResolvable
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
propertyRequired
- Type: *string
The property of the iterators values to map to.
Values
func Values() IResolvable
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
Static Functions
| Name | Description |
|---|---|
FromComplexList | Creates a new iterator from a complex list. |
FromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
FromList | Creates a new iterator from a list. |
FromMap | Creates a new iterator from a map. |
FromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
FromComplexList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.MapTerraformIterator_FromComplexList(list interface{}, mapKeyAttributeName *string) DynamicListTerraformIterator
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
// Example automatically generated from non-compiling source. May contain errors.
cert := NewAcmCertificate(this, jsii.String("cert"), map[string]*string{
"domainName": jsii.String("example.com"),
"validationMethod": jsii.String("DNS"),
})
dvoIterator := terraformIterator_FromComplexList(cert.domainValidationOptions, jsii.String("domain_name"))
NewRoute53Record(this, jsii.String("record"), map[string]interface{}{
"allowOverwrite": jsii.Boolean(true),
"name": dvoIterator.getString(jsii.String("name")),
"records": []interface{}{
dvoIterator.getString(jsii.String("record")),
},
"ttl": jsii.Number(60),
"type": dvoIterator.getString(jsii.String("type")),
"zoneId": Token_asString(dataAwsRoute53ZoneExample.zoneId),
"forEach": dvoIterator,
})
listRequired
- Type: interface{}
the list to iterate over.
mapKeyAttributeNameRequired
- Type: *string
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
FromDataSources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.MapTerraformIterator_FromDataSources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a data source that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
FromList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.MapTerraformIterator_FromList(list interface{}) ListTerraformIterator
Creates a new iterator from a list.
listRequired
- Type: interface{}
FromMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.MapTerraformIterator_FromMap(map interface{}) MapTerraformIterator
Creates a new iterator from a map.
mapRequired
- Type: interface{}
FromResources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.MapTerraformIterator_FromResources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a resource that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
Properties
| Name | Type | Description |
|---|---|---|
Key | *string | Returns the key of the current entry in the map that is being iterated over. |
Value | interface{} | Returns the value of the current item iterated over. |
KeyRequired
func Key() *string
- Type: *string
Returns the key of the current entry in the map that is being iterated over.
ValueRequired
func Value() interface{}
- Type: interface{}
Returns the value of the current item iterated over.
MigrateIds
- Implements: IAspect
For migrating past 0.17 where the feature flag for the old id generation logic was removed after being deprecated since 0.15.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewMigrateIds() MigrateIds
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
Visit | All aspects can visit an IConstruct. |
Visit
func Visit(node IConstruct)
All aspects can visit an IConstruct.
nodeRequired
- Type: github.com/aws/constructs-go/constructs/v10.IConstruct
NamedCloudWorkspace
The name of a single Terraform Cloud workspace.
You will only be able to use the workspace specified in the configuration with this working directory, and cannot manage workspaces from the CLI (e.g. terraform workspace select or terraform workspace new).
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewNamedCloudWorkspace(name *string, project *string) NamedCloudWorkspace
nameRequired
- Type: *string
projectOptional
- Type: *string
Methods
| Name | Description |
|---|---|
ToTerraform | No description. |
ToHclTerraform | No description. |
ToTerraform
func ToTerraform() interface{}
ToHclTerraform
func ToHclTerraform() interface{}
Properties
NameRequired
func Name() *string
- Type: *string
ProjectOptional
func Project() *string
- Type: *string
NamedRemoteWorkspace
- Implements: IRemoteWorkspace
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewNamedRemoteWorkspace(name *string) NamedRemoteWorkspace
| Name | Type | Description |
|---|---|---|
name | *string | No description. |
nameRequired
- Type: *string
Properties
| Name | Type | Description |
|---|---|---|
Name | *string | No description. |
NameRequired
func Name() *string
- Type: *string
NumberListList
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewNumberListList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) NumberListList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
AllWithMapKey | Creating an iterator for this complex list. |
ComputeFqn | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
AllWithMapKey
func AllWithMapKey(mapKeyAttributeName *string) DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeNameRequired
- Type: *string
ComputeFqn
func ComputeFqn() *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(index *f64) *[]*f64
indexRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
NumberListMap
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewNumberListMap(terraformResource IInterpolatingParent, terraformAttribute *string) NumberListMap
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(key *string) *[]*f64
keyRequired
- Type: *string
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
NumberMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewNumberMap(terraformResource IInterpolatingParent, terraformAttribute *string) NumberMap
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
Lookup | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
ComputeFqn
func ComputeFqn() *string
Lookup
func Lookup(key *string) *f64
keyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
NumberMapList
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewNumberMapList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) NumberMapList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(index *f64) NumberMap
indexRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
Op
This class contains static functions for all arithmetical and logical operators in the Terraform configuration language.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewOp() Op
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
Add | Renders left + right. |
And | Renders left && right. |
Div | Renders left / right. |
Eq | Renders left == right. |
Gt | Renders left > right. |
Gte | Renders left >= right. |
Lt | Renders left < right. |
Lte | Renders left < = right. |
Mod | Renders left % right. |
Mul | Renders left * right. |
Negate | Renders -expression. |
Neq | Renders left != right. |
Not | Renders !expression. |
Or | Renders left || right. |
Sub | Renders left - right. |
Add
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Add(left interface{}, right interface{}) *f64
Renders left + right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
And
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_And(left interface{}, right interface{}) IResolvable
Renders left && right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Div
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Div(left interface{}, right interface{}) *f64
Renders left / right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Eq
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Eq(left interface{}, right interface{}) IResolvable
Renders left == right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Gt
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Gt(left interface{}, right interface{}) IResolvable
Renders left > right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Gte
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Gte(left interface{}, right interface{}) IResolvable
Renders left >= right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Lt
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Lt(left interface{}, right interface{}) IResolvable
Renders left < right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Lte
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Lte(left interface{}, right interface{}) IResolvable
Renders left < = right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Mod
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Mod(left interface{}, right interface{}) *f64
Renders left % right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Mul
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Mul(left interface{}, right interface{}) *f64
Renders left * right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Negate
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Negate(expression interface{}) *f64
Renders -expression.
expressionRequired
- Type: interface{}
Neq
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Neq(left interface{}, right interface{}) IResolvable
Renders left != right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Not
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Not(expression interface{}) IResolvable
Renders !expression.
expressionRequired
- Type: interface{}
Or
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Or(left interface{}, right interface{}) IResolvable
Renders left || right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
Sub
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Op_Sub(left interface{}, right interface{}) *f64
Renders left - right.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
PrefixedRemoteWorkspaces
- Implements: IRemoteWorkspace
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewPrefixedRemoteWorkspaces(prefix *string) PrefixedRemoteWorkspaces
| Name | Type | Description |
|---|---|---|
prefix | *string | No description. |
prefixRequired
- Type: *string
Properties
| Name | Type | Description |
|---|---|---|
Prefix | *string | No description. |
PrefixRequired
func Prefix() *string
- Type: *string
ResourceTerraformIterator
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewResourceTerraformIterator(element ITerraformResource) ResourceTerraformIterator
| Name | Type | Description |
|---|---|---|
element | ITerraformResource | No description. |
elementRequired
- Type: ITerraformResource
Methods
| Name | Description |
|---|---|
Dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
ForExpressionForList | Creates a for expression that results in a list. |
ForExpressionForMap | Creates a for expression that results in a map. |
GetAny | No description. |
GetAnyMap | No description. |
GetBoolean | No description. |
GetBooleanMap | No description. |
GetList | No description. |
GetMap | No description. |
GetNumber | No description. |
GetNumberList | No description. |
GetNumberMap | No description. |
GetString | No description. |
GetStringMap | No description. |
Keys | Creates a for expression that maps the iterators to its keys. |
PluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
Values | Creates a for expression that maps the iterators to its value in case it is a map. |
Dynamic
func Dynamic(attributes *map[string]interface{}) IResolvable
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributesRequired
- Type: *map[string]interface{}
ForExpressionForList
func ForExpressionForList(expression interface{}) IResolvable
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ].
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
expressionRequired
- Type: interface{}
The expression to use in the for mapping.
ForExpressionForMap
func ForExpressionForMap(keyExpression interface{}, valueExpression interface{}) IResolvable
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
keyExpressionRequired
- Type: interface{}
The expression to use as key in the for mapping.
valueExpressionRequired
- Type: interface{}
The expression to use as value in the for mapping.
GetAny
func GetAny(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetAnyMap
func GetAnyMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetBoolean
func GetBoolean(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetBooleanMap
func GetBooleanMap(attribute *string) *map[string]*bool
attributeRequired
- Type: *string
name of the property to retrieve.
GetList
func GetList(attribute *string) *[]*string
attributeRequired
- Type: *string
name of the property to retrieve.
GetMap
func GetMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumber
func GetNumber(attribute *string) *f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberList
func GetNumberList(attribute *string) *[]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberMap
func GetNumberMap(attribute *string) *map[string]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetString
func GetString(attribute *string) *string
attributeRequired
- Type: *string
name of the property to retrieve.
GetStringMap
func GetStringMap(attribute *string) *map[string]*string
attributeRequired
- Type: *string
name of the property to retrieve.
Keys
func Keys() IResolvable
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
PluckProperty
func PluckProperty(property *string) IResolvable
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
propertyRequired
- Type: *string
The property of the iterators values to map to.
Values
func Values() IResolvable
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
Static Functions
| Name | Description |
|---|---|
FromComplexList | Creates a new iterator from a complex list. |
FromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
FromList | Creates a new iterator from a list. |
FromMap | Creates a new iterator from a map. |
FromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
FromComplexList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ResourceTerraformIterator_FromComplexList(list interface{}, mapKeyAttributeName *string) DynamicListTerraformIterator
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
// Example automatically generated from non-compiling source. May contain errors.
cert := NewAcmCertificate(this, jsii.String("cert"), map[string]*string{
"domainName": jsii.String("example.com"),
"validationMethod": jsii.String("DNS"),
})
dvoIterator := terraformIterator_FromComplexList(cert.domainValidationOptions, jsii.String("domain_name"))
NewRoute53Record(this, jsii.String("record"), map[string]interface{}{
"allowOverwrite": jsii.Boolean(true),
"name": dvoIterator.getString(jsii.String("name")),
"records": []interface{}{
dvoIterator.getString(jsii.String("record")),
},
"ttl": jsii.Number(60),
"type": dvoIterator.getString(jsii.String("type")),
"zoneId": Token_asString(dataAwsRoute53ZoneExample.zoneId),
"forEach": dvoIterator,
})
listRequired
- Type: interface{}
the list to iterate over.
mapKeyAttributeNameRequired
- Type: *string
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
FromDataSources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ResourceTerraformIterator_FromDataSources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a data source that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
FromList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ResourceTerraformIterator_FromList(list interface{}) ListTerraformIterator
Creates a new iterator from a list.
listRequired
- Type: interface{}
FromMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ResourceTerraformIterator_FromMap(map interface{}) MapTerraformIterator
Creates a new iterator from a map.
mapRequired
- Type: interface{}
FromResources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.ResourceTerraformIterator_FromResources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a resource that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
Properties
| Name | Type | Description |
|---|---|---|
Key | interface{} | Returns the current entry in the list or set that is being iterated over. |
Value | interface{} | Returns the value of the current item iterated over. |
KeyRequired
func Key() interface{}
- Type: interface{}
Returns the current entry in the list or set that is being iterated over.
For lists this is the same as iterator.value. If you need the index,
use count via TerraformCount:
https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-count
ValueRequired
func Value() interface{}
- Type: interface{}
Returns the value of the current item iterated over.
StringConcat
- Implements: IFragmentConcatenator
Converts all fragments to strings and concats those.
Drops 'undefined's.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewStringConcat() StringConcat
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
Join | Concatenates string fragments. |
Join
func Join(left interface{}, right interface{}) interface{}
Concatenates string fragments.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
StringListList
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewStringListList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) StringListList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
AllWithMapKey | Creating an iterator for this complex list. |
ComputeFqn | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
AllWithMapKey
func AllWithMapKey(mapKeyAttributeName *string) DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeNameRequired
- Type: *string
ComputeFqn
func ComputeFqn() *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(index *f64) *[]*string
indexRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
StringListMap
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewStringListMap(terraformResource IInterpolatingParent, terraformAttribute *string) StringListMap
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(key *string) *[]*string
keyRequired
- Type: *string
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
StringMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewStringMap(terraformResource IInterpolatingParent, terraformAttribute *string) StringMap
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
Lookup | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
ComputeFqn
func ComputeFqn() *string
Lookup
func Lookup(key *string) *string
keyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
StringMapList
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewStringMapList(terraformResource IInterpolatingParent, terraformAttribute *string, wrapsSet *bool) StringMapList
| Name | Type | Description |
|---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | *string | No description. |
wrapsSet | *bool | No description. |
terraformResourceRequired
- Type: IInterpolatingParent
terraformAttributeRequired
- Type: *string
wrapsSetRequired
- Type: *bool
Methods
| Name | Description |
|---|---|
ComputeFqn | No description. |
InterpolationForAttribute | No description. |
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Get | No description. |
ComputeFqn
func ComputeFqn() *string
InterpolationForAttribute
func InterpolationForAttribute(property *string) IResolvable
propertyRequired
- Type: *string
Resolve
func Resolve(_context IResolveContext) interface{}
Produce the Token's value at resolution time.
_contextRequired
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
func Get(index *f64) StringMap
indexRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | *string | No description. |
CreationStackRequired
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
FqnRequired
func Fqn() *string
- Type: *string
TaggedCloudWorkspaces
A set of Terraform Cloud workspace tags.
You will be able to use this working directory with any workspaces that have all of the specified tags, and can use the terraform workspace commands to switch between them or create new workspaces. New workspaces will automatically have the specified tags. This option conflicts with name.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewTaggedCloudWorkspaces(tags *[]*string, project *string) TaggedCloudWorkspaces
tagsRequired
- Type: _[]_string
projectOptional
- Type: *string
Methods
| Name | Description |
|---|---|
ToTerraform | No description. |
ToHclTerraform | No description. |
ToTerraform
func ToTerraform() interface{}
ToHclTerraform
func ToHclTerraform() interface{}
Properties
TagsRequired
func Tags() *[]*string
- Type: _[]_string
ProjectOptional
func Project() *string
- Type: *string
TerraformCount
Iterator for the Terraform count property.
Methods
| Name | Description |
|---|---|
ToString | No description. |
ToTerraform | No description. |
ToString
func ToString() *string
ToTerraform
func ToTerraform() *f64
Static Functions
| Name | Description |
|---|---|
IsTerraformCount | No description. |
Of | No description. |
IsTerraformCount
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformCount_IsTerraformCount(x interface{}) *bool
xRequired
- Type: interface{}
Of
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformCount_Of(count *f64) TerraformCount
countRequired
- Type: *f64
Properties
| Name | Type | Description |
|---|---|---|
Index | *f64 | No description. |
IndexRequired
func Index() *f64
- Type: *f64
TerraformIterator
- Implements: ITerraformIterator
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewTerraformIterator() TerraformIterator
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
Dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
ForExpressionForList | Creates a for expression that results in a list. |
ForExpressionForMap | Creates a for expression that results in a map. |
GetAny | No description. |
GetAnyMap | No description. |
GetBoolean | No description. |
GetBooleanMap | No description. |
GetList | No description. |
GetMap | No description. |
GetNumber | No description. |
GetNumberList | No description. |
GetNumberMap | No description. |
GetString | No description. |
GetStringMap | No description. |
Keys | Creates a for expression that maps the iterators to its keys. |
PluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
Values | Creates a for expression that maps the iterators to its value in case it is a map. |
Dynamic
func Dynamic(attributes *map[string]interface{}) IResolvable
Creates a dynamic expression that can be used to loop over this iterator in a dynamic block.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributesRequired
- Type: *map[string]interface{}
ForExpressionForList
func ForExpressionForList(expression interface{}) IResolvable
Creates a for expression that results in a list.
This method allows you to create every possible for expression, but requires more knowledge about Terraform's for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty() instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromList(myIteratorSourceVar).forExpressionForList("val.foo if val.bar == true")
will result in [ for key, val in var.myIteratorSource: val.foo if val.bar == true ].
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
expressionRequired
- Type: interface{}
The expression to use in the for mapping.
ForExpressionForMap
func ForExpressionForMap(keyExpression interface{}, valueExpression interface{}) IResolvable
Creates a for expression that results in a map.
This method allows you to create every possible for expression, but requires more knowledge about Terraforms for expression syntax. For the most common use cases you can use keys(), values(), and pluckProperty instead.
You may write any valid Terraform for each expression, e.g.
TerraformIterator.fromMap(myIteratorSourceVar).forExpressionForMap("key", "val.foo if val.bar == true")
will result in { for key, val in var.myIteratorSource: key = > val.foo if val.bar == true }.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
keyExpressionRequired
- Type: interface{}
The expression to use as key in the for mapping.
valueExpressionRequired
- Type: interface{}
The expression to use as value in the for mapping.
GetAny
func GetAny(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetAnyMap
func GetAnyMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetBoolean
func GetBoolean(attribute *string) IResolvable
attributeRequired
- Type: *string
name of the property to retrieve.
GetBooleanMap
func GetBooleanMap(attribute *string) *map[string]*bool
attributeRequired
- Type: *string
name of the property to retrieve.
GetList
func GetList(attribute *string) *[]*string
attributeRequired
- Type: *string
name of the property to retrieve.
GetMap
func GetMap(attribute *string) *map[string]interface{}
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumber
func GetNumber(attribute *string) *f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberList
func GetNumberList(attribute *string) *[]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetNumberMap
func GetNumberMap(attribute *string) *map[string]*f64
attributeRequired
- Type: *string
name of the property to retrieve.
GetString
func GetString(attribute *string) *string
attributeRequired
- Type: *string
name of the property to retrieve.
GetStringMap
func GetStringMap(attribute *string) *map[string]*string
attributeRequired
- Type: *string
name of the property to retrieve.
Keys
func Keys() IResolvable
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
PluckProperty
func PluckProperty(property *string) IResolvable
Creates a for expression that accesses the key on each element of the iterator.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
propertyRequired
- Type: *string
The property of the iterators values to map to.
Values
func Values() IResolvable
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString.
Static Functions
| Name | Description |
|---|---|
FromComplexList | Creates a new iterator from a complex list. |
FromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
FromList | Creates a new iterator from a list. |
FromMap | Creates a new iterator from a map. |
FromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
FromComplexList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformIterator_FromComplexList(list interface{}, mapKeyAttributeName *string) DynamicListTerraformIterator
Creates a new iterator from a complex list.
One example for this would be a list of maps. The list will be converted into a map with the mapKeyAttributeName as the key.
Example
// Example automatically generated from non-compiling source. May contain errors.
cert := NewAcmCertificate(this, jsii.String("cert"), map[string]*string{
"domainName": jsii.String("example.com"),
"validationMethod": jsii.String("DNS"),
})
dvoIterator := terraformIterator_FromComplexList(cert.domainValidationOptions, jsii.String("domain_name"))
NewRoute53Record(this, jsii.String("record"), map[string]interface{}{
"allowOverwrite": jsii.Boolean(true),
"name": dvoIterator.getString(jsii.String("name")),
"records": []interface{}{
dvoIterator.getString(jsii.String("record")),
},
"ttl": jsii.Number(60),
"type": dvoIterator.getString(jsii.String("type")),
"zoneId": Token_asString(dataAwsRoute53ZoneExample.zoneId),
"forEach": dvoIterator,
})
listRequired
- Type: interface{}
the list to iterate over.
mapKeyAttributeNameRequired
- Type: *string
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
FromDataSources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformIterator_FromDataSources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a data source that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
FromList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformIterator_FromList(list interface{}) ListTerraformIterator
Creates a new iterator from a list.
listRequired
- Type: interface{}
FromMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformIterator_FromMap(map interface{}) MapTerraformIterator
Creates a new iterator from a map.
mapRequired
- Type: interface{}
FromResources
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformIterator_FromResources(resource ITerraformResource) ResourceTerraformIterator
Creates a new iterator from a resource that has been created with the for_each argument.
resourceRequired
- Type: ITerraformResource
TerraformResourceTargets
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewTerraformResourceTargets() TerraformResourceTargets
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
AddResourceTarget | No description. |
GetResourceByTarget | No description. |
AddResourceTarget
func AddResourceTarget(resource TerraformResource, target *string)
resourceRequired
- Type: TerraformResource
targetRequired
- Type: *string
GetResourceByTarget
func GetResourceByTarget(target *string) TerraformResource
targetRequired
- Type: *string
TerraformSelf
Expressions in connection blocks cannot refer to their parent resource by name.
References create dependencies, and referring to a resource by name within its own block would create a dependency cycle. Instead, expressions can use the self object, which represents the connection's parent resource and has all of that resource's attributes. For example, use self.public_ip to reference an aws_instance's public_ip attribute.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewTerraformSelf() TerraformSelf
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
GetAny | Only usable within a connection block to reference the connections parent resource. |
GetNumber | Only usable within a connection block to reference the connections parent resource. |
GetString | Only usable within a connection block to reference the connections parent resource. |
GetAny
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformSelf_GetAny(key *string) interface{}
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getAny("hostPort")
keyRequired
- Type: *string
GetNumber
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformSelf_GetNumber(key *string) *f64
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getNumber("hostPort")
keyRequired
- Type: *string
GetString
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.TerraformSelf_GetString(key *string) *string
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getString("publicIp")
keyRequired
- Type: *string
Testing
Testing utilities for cdktf applications.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewTesting() Testing
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
App | Returns an app for testing with the following properties: - Output directory is a temp dir. |
EnableFutureFlags | No description. |
FakeCdktfJsonPath | No description. |
FullSynth | No description. |
RenderConstructTree | No description. |
SetupJest | No description. |
StubVersion | No description. |
Synth | Returns the Terraform synthesized JSON. |
SynthHcl | Returns the Terraform synthesized JSON. |
SynthScope | No description. |
ToBeValidTerraform | No description. |
ToHaveDataSource | No description. |
ToHaveDataSourceWithProperties | No description. |
ToHaveProvider | No description. |
ToHaveProviderWithProperties | No description. |
ToHaveResource | No description. |
ToHaveResourceWithProperties | No description. |
App
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_App(options TestingAppConfig) App
Returns an app for testing with the following properties: - Output directory is a temp dir.
optionsOptional
- Type: TestingAppConfig
EnableFutureFlags
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_EnableFutureFlags(app App) App
appRequired
- Type: App
FakeCdktfJsonPath
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_FakeCdktfJsonPath(app App) App
appRequired
- Type: App
FullSynth
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_FullSynth(stack TerraformStack) *string
stackRequired
- Type: TerraformStack
RenderConstructTree
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_RenderConstructTree(construct IConstruct) *string
constructRequired
- Type: github.com/aws/constructs-go/constructs/v10.IConstruct
SetupJest
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_SetupJest()
StubVersion
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_StubVersion(app App) App
appRequired
- Type: App
Synth
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_Synth(stack TerraformStack, runValidations *bool) *string
Returns the Terraform synthesized JSON.
stackRequired
- Type: TerraformStack
runValidationsOptional
- Type: *bool
SynthHcl
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_SynthHcl(stack TerraformStack, runValidations *bool, returnMetadata *bool) interface{}
Returns the Terraform synthesized JSON.
stackRequired
- Type: TerraformStack
runValidationsOptional
- Type: *bool
returnMetadataOptional
- Type: *bool
SynthScope
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_SynthScope(fn IScopeCallback) *string
fnRequired
- Type: IScopeCallback
ToBeValidTerraform
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_ToBeValidTerraform(received *string) *bool
receivedRequired
- Type: *string
ToHaveDataSource
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_ToHaveDataSource(received *string, resourceType *string) *bool
receivedRequired
- Type: *string
resourceTypeRequired
- Type: *string
ToHaveDataSourceWithProperties
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_ToHaveDataSourceWithProperties(received *string, resourceType *string, properties *map[string]interface{}) *bool
receivedRequired
- Type: *string
resourceTypeRequired
- Type: *string
propertiesOptional
- Type: *map[string]interface{}
ToHaveProvider
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_ToHaveProvider(received *string, resourceType *string) *bool
receivedRequired
- Type: *string
resourceTypeRequired
- Type: *string
ToHaveProviderWithProperties
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_ToHaveProviderWithProperties(received *string, resourceType *string, properties *map[string]interface{}) *bool
receivedRequired
- Type: *string
resourceTypeRequired
- Type: *string
propertiesOptional
- Type: *map[string]interface{}
ToHaveResource
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_ToHaveResource(received *string, resourceType *string) *bool
receivedRequired
- Type: *string
resourceTypeRequired
- Type: *string
ToHaveResourceWithProperties
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Testing_ToHaveResourceWithProperties(received *string, resourceType *string, properties *map[string]interface{}) *bool
receivedRequired
- Type: *string
resourceTypeRequired
- Type: *string
propertiesOptional
- Type: *map[string]interface{}
Token
Represents a special or lazily-evaluated value.
Can be used to delay evaluation of a certain value in case, for example, that it requires some context or late-bound data. Can also be used to mark values that need special processing at document rendering time.
Tokens can be embedded into strings while retaining their original semantics.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewToken() Token
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
AsAny | Return a resolvable representation of the given value. |
AsAnyMap | Return a reversible map representation of this token. |
AsBooleanMap | Return a reversible map representation of this token. |
AsList | Return a reversible list representation of this token. |
AsMap | Return a reversible map representation of this token. |
AsNumber | Return a reversible number representation of this token. |
AsNumberList | Return a reversible list representation of this token. |
AsNumberMap | Return a reversible map representation of this token. |
AsString | Return a reversible string representation of this token. |
AsStringMap | Return a reversible map representation of this token. |
IsUnresolved | Returns true if obj represents an unresolved value. |
NullValue | Return a Token containing a null value. |
AsAny
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsAny(value interface{}) IResolvable
Return a resolvable representation of the given value.
valueRequired
- Type: interface{}
AsAnyMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsAnyMap(value interface{}, options EncodingOptions) *map[string]interface{}
Return a reversible map representation of this token.
valueRequired
- Type: interface{}
optionsOptional
- Type: EncodingOptions
AsBooleanMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsBooleanMap(value interface{}, options EncodingOptions) *map[string]*bool
Return a reversible map representation of this token.
valueRequired
- Type: interface{}
optionsOptional
- Type: EncodingOptions
AsList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsList(value interface{}, options EncodingOptions) *[]*string
Return a reversible list representation of this token.
valueRequired
- Type: interface{}
optionsOptional
- Type: EncodingOptions
AsMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsMap(value interface{}, mapValue interface{}, options EncodingOptions) *map[string]interface{}
Return a reversible map representation of this token.
valueRequired
- Type: interface{}
mapValueRequired
- Type: interface{}
optionsOptional
- Type: EncodingOptions
AsNumber
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsNumber(value interface{}) *f64
Return a reversible number representation of this token.
valueRequired
- Type: interface{}
AsNumberList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsNumberList(value interface{}) *[]*f64
Return a reversible list representation of this token.
valueRequired
- Type: interface{}
AsNumberMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsNumberMap(value interface{}, options EncodingOptions) *map[string]*f64
Return a reversible map representation of this token.
valueRequired
- Type: interface{}
optionsOptional
- Type: EncodingOptions
AsString
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsString(value interface{}, options EncodingOptions) *string
Return a reversible string representation of this token.
If the Token is initialized with a literal, the stringified value of the literal is returned. Otherwise, a special quoted string representation of the Token is returned that can be embedded into other strings.
Strings with quoted Tokens in them can be restored back into
complex values with the Tokens restored by calling resolve()
on the string.
valueRequired
- Type: interface{}
optionsOptional
- Type: EncodingOptions
AsStringMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_AsStringMap(value interface{}, options EncodingOptions) *map[string]*string
Return a reversible map representation of this token.
valueRequired
- Type: interface{}
optionsOptional
- Type: EncodingOptions
IsUnresolved
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_IsUnresolved(obj interface{}) *bool
Returns true if obj represents an unresolved value.
One of these must be true:
objis an IResolvableobjis a string containing at least one encodedIResolvableobjis either an encoded number or list
This does NOT recurse into lists or objects to see if they containing resolvables.
objRequired
- Type: interface{}
The object to test.
NullValue
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Token_NullValue() IResolvable
Return a Token containing a null value.
Note: This is different than undefined, nil, None or similar
as it will end up in the Terraform config and can be used to explicitly
not set an attribute (which is sometimes required by Terraform providers)
Constants
| Name | Type | Description |
|---|---|---|
AnyMapTokenValue | *string | Any map token representation. |
NumberMapTokenValue | *f64 | Number Map token value representation. |
StringMapTokenValue | *string | String Map token value representation. |
AnyMapTokenValueRequired
func AnyMapTokenValue() *string
- Type: *string
Any map token representation.
NumberMapTokenValueRequired
func NumberMapTokenValue() *f64
- Type: *f64
Number Map token value representation.
StringMapTokenValueRequired
func StringMapTokenValue() *string
- Type: *string
String Map token value representation.
Tokenization
Less oft-needed functions to manipulate Tokens.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewTokenization() Tokenization
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
IsResolvable | Return whether the given object is an IResolvable object. |
Resolve | Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays. |
Reverse | Reverse any value into Resolvables, if possible. |
ReverseList | Un-encode a Tokenized value from a list. |
ReverseMap | Un-encode a Tokenized value from a map. |
ReverseNumber | Un-encode a Tokenized value from a number. |
ReverseNumberList | Un-encode a Tokenized value from a list. |
ReverseString | Un-encode a string potentially containing encoded tokens. |
StringifyNumber | Stringify a number directly or lazily if it's a Token. |
IsResolvable
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Tokenization_IsResolvable(obj interface{}) *bool
Return whether the given object is an IResolvable object.
This is different from Token.isUnresolved() which will also check for encoded Tokens, whereas this method will only do a type check on the given object.
objRequired
- Type: interface{}
Resolve
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Tokenization_Resolve(obj interface{}, options ResolveOptions) interface{}
Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays.
Values can only be primitives, arrays or tokens. Other objects (i.e. with methods) will be rejected.
objRequired
- Type: interface{}
The object to resolve.
optionsRequired
- Type: ResolveOptions
Prefix key path components for diagnostics.
Reverse
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Tokenization_Reverse(x interface{}) *[]IResolvable
Reverse any value into Resolvables, if possible.
xRequired
- Type: interface{}
ReverseList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Tokenization_ReverseList(l *[]*string) IResolvable
Un-encode a Tokenized value from a list.
lRequired
- Type: _[]_string
ReverseMap
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Tokenization_ReverseMap(m *map[string]interface{}) IResolvable
Un-encode a Tokenized value from a map.
mRequired
- Type: *map[string]interface{}
ReverseNumber
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Tokenization_ReverseNumber(n *f64) IResolvable
Un-encode a Tokenized value from a number.
nRequired
- Type: *f64
ReverseNumberList
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Tokenization_ReverseNumberList(l *[]*f64) IResolvable
Un-encode a Tokenized value from a list.
lRequired
- Type: _[]_f64
ReverseString
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Tokenization_ReverseString(s *string) TokenizedStringFragments
Un-encode a string potentially containing encoded tokens.
sRequired
- Type: *string
StringifyNumber
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.Tokenization_StringifyNumber(x *f64) *string
Stringify a number directly or lazily if it's a Token.
If it is an object (i.e., { Ref: 'SomeLogicalId' }), return it as-is.
xRequired
- Type: *f64
TokenizedStringFragments
Fragments of a concatenated string containing stringified Tokens.
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewTokenizedStringFragments() TokenizedStringFragments
| Name | Type | Description |
|---|
Methods
| Name | Description |
|---|---|
AddEscape | No description. |
AddIntrinsic | Adds an intrinsic fragment. |
AddLiteral | Adds a literal fragment. |
AddToken | Adds a token fragment. |
Concat | No description. |
Join | Combine the string fragments using the given joiner. |
MapTokens | Apply a transformation function to all tokens in the string. |
AddEscape
func AddEscape(kind *string)
kindRequired
- Type: *string
AddIntrinsic
func AddIntrinsic(value interface{})
Adds an intrinsic fragment.
valueRequired
- Type: interface{}
the intrinsic value to add.
AddLiteral
func AddLiteral(lit interface{})
Adds a literal fragment.
litRequired
- Type: interface{}
the literal to add.
AddToken
func AddToken(token IResolvable)
Adds a token fragment.
tokenRequired
- Type: IResolvable
the token to add.
Concat
func Concat(other TokenizedStringFragments)
otherRequired
- Type: TokenizedStringFragments
Join
func Join(concat IFragmentConcatenator) interface{}
Combine the string fragments using the given joiner.
If there are any
concatRequired
- Type: IFragmentConcatenator
MapTokens
func MapTokens(context IResolveContext) TokenizedStringFragments
Apply a transformation function to all tokens in the string.
contextRequired
- Type: IResolveContext
Properties
| Name | Type | Description |
|---|---|---|
Escapes | *[]IResolvable | Return all escape fragments from this string. |
FirstValue | interface{} | Returns the first value. |
Intrinsic | *[]IResolvable | Return all intrinsic fragments from this string. |
Length | *f64 | Returns the number of fragments. |
Literals | *[]IResolvable | Return all literals from this string. |
Tokens | *[]IResolvable | Return all Tokens from this string. |
FirstToken | IResolvable | Returns the first token. |
EscapesRequired
func Escapes() *[]IResolvable
- Type: *[]IResolvable
Return all escape fragments from this string.
FirstValueRequired
func FirstValue() interface{}
- Type: interface{}
Returns the first value.
IntrinsicRequired
func Intrinsic() *[]IResolvable
- Type: *[]IResolvable
Return all intrinsic fragments from this string.
LengthRequired
func Length() *f64
- Type: *f64
Returns the number of fragments.
LiteralsRequired
func Literals() *[]IResolvable
- Type: *[]IResolvable
Return all literals from this string.
TokensRequired
func Tokens() *[]IResolvable
- Type: *[]IResolvable
Return all Tokens from this string.
FirstTokenOptional
func FirstToken() IResolvable
- Type: IResolvable
Returns the first token.
VariableType
Initializers
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.NewVariableType() VariableType
| Name | Type | Description |
|---|
Static Functions
| Name | Description |
|---|---|
List | No description. |
Map | No description. |
Object | No description. |
Set | No description. |
Tuple | No description. |
List
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.VariableType_List(type *string) *string
typeRequired
- Type: *string
Map
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.VariableType_Map(type *string) *string
typeRequired
- Type: *string
Object
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.VariableType_Object(attributes *map[string]*string) *string
attributesRequired
- Type: _map[string]_string
Set
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.VariableType_Set(type *string) *string
typeRequired
- Type: *string
Tuple
import "github.com/hashicorp/terraform-cdk-go/cdktf"
cdktf.VariableType_Tuple(elements ...*string) *string
elementsRequired
- Type: ...*string
Constants
| Name | Type | Description |
|---|---|---|
Any | *string | No description. |
Bool | *string | No description. |
List | *string | No description. |
ListBool | *string | No description. |
ListNumber | *string | No description. |
ListString | *string | No description. |
Map | *string | No description. |
MapBool | *string | No description. |
MapNumber | *string | No description. |
MapString | *string | No description. |
Number | *string | No description. |
Set | *string | No description. |
SetBool | *string | No description. |
SetNumber | *string | No description. |
SetString | *string | No description. |
String | *string | No description. |
AnyRequired
func Any() *string
- Type: *string
BoolRequired
func Bool() *string
- Type: *string
ListRequired
func List() *string
- Type: *string
ListBoolRequired
func ListBool() *string
- Type: *string
ListNumberRequired
func ListNumber() *string
- Type: *string
ListStringRequired
func ListString() *string
- Type: *string
MapRequired
func Map() *string
- Type: *string
MapBoolRequired
func MapBool() *string
- Type: *string
MapNumberRequired
func MapNumber() *string
- Type: *string
MapStringRequired
func MapString() *string
- Type: *string
NumberRequired
func Number() *string
- Type: *string
SetRequired
func Set() *string
- Type: *string
SetBoolRequired
func SetBool() *string
- Type: *string
SetNumberRequired
func SetNumber() *string
- Type: *string
SetStringRequired
func SetString() *string
- Type: *string
StringRequired
func String() *string
- Type: *string