Initializers
| Name | Type | Description |
|---|---|---|
List | string[]|IResolvable|double[]|bool|IResolvable[] | No description. |
MapKeyAttributeName | string | No description. |
ListRequired
- Type: string[]|IResolvable|double[]|bool|IResolvable[]
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
Token.asString.
See https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-for-list-attributes
AttributesRequired
- Type: System.Collections.Generic.IDictionary< string, object >
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: string|IResolvable
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: string|IResolvable
ValueExpressionRequired
- Type: string|IResolvable
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
the list to iterate over.
MapKeyAttributeNameRequired
- Type: string
FromDataSources
for_each argument.
ResourceRequired
- Type: ITerraformResource
FromList
ListRequired
- Type: string[]|IResolvable|double[]|bool|IResolvable[]
FromMap
MapRequired
- Type: ComplexMap|System.Collections.Generic.IDictionary< string, object >|System.Collections.Generic.IDictionary< string, string >|System.Collections.Generic.IDictionary< string, double >|System.Collections.Generic.IDictionary< string, bool >
FromResources
for_each argument.
ResourceRequired
- Type: ITerraformResource
Properties
KeyRequired
- Type: string
ValueRequired
- Type: object