Initializers
| 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
Token.asString.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
attributesRequired
- Type: *map[string]interface{}
ForExpressionForList
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{}
ForExpressionForMap
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{}
valueExpressionRequired
- Type: interface{}
GetAny
attributeRequired
- Type: *string
GetAnyMap
attributeRequired
- Type: *string
GetBoolean
attributeRequired
- Type: *string
GetBooleanMap
attributeRequired
- Type: *string
GetList
attributeRequired
- Type: *string
GetMap
attributeRequired
- Type: *string
GetNumber
attributeRequired
- Type: *string
GetNumberList
attributeRequired
- Type: *string
GetNumberMap
attributeRequired
- Type: *string
GetString
attributeRequired
- Type: *string
GetStringMap
attributeRequired
- Type: *string
Keys
Token.asString.
PluckProperty
Token.asString.
propertyRequired
- Type: *string
Values
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
listRequired
- Type: interface{}
mapKeyAttributeNameRequired
- Type: *string
FromDataSources
for_each argument.
resourceRequired
- Type: ITerraformResource
FromList
listRequired
- Type: interface{}
FromMap
mapRequired
- Type: interface{}
FromResources
for_each argument.
resourceRequired
- Type: ITerraformResource
Properties
KeyRequired
- Type: interface{}
iterator.value. If you need the index,
use count via TerraformCount:
https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-count
ValueRequired
- Type: interface{}