Terraform
Python: Classes
Annotations
Includes API for attaching annotations such as warning messages to constructs.
Methods
Name | Description |
---|---|
add_error | Adds an { "error": < message > } metadata entry to this construct. |
add_info | Adds an info metadata entry to this construct. |
add_warning | Adds a warning metadata entry to this construct. |
add_error
def add_error(
message: str
) - > None
Adds an { "error": < message > } metadata entry to this construct.
The toolkit will fail synthesis when errors are reported.
message
Required
- Type: str
The error message.
add_info
def add_info(
message: str
) - > None
Adds an info metadata entry to this construct.
The CLI will display the info message when apps are synthesized.
message
Required
- Type: str
The info message.
add_warning
def add_warning(
message: str
) - > None
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.
message
Required
- Type: str
The warning message.
Static Functions
Name | Description |
---|---|
of | Returns the annotations API for a construct scope. |
of
import cdktf
cdktf.Annotations.of(
scope: IConstruct
)
Returns the annotations API for a construct scope.
scope
Required
- Type: constructs.IConstruct
The scope.
AnyListList
Initializers
import cdktf
cdktf.AnyListList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > IResolvable
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
AnyListMap
Initializers
import cdktf
cdktf.AnyListMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
key: str
) - > IResolvable
key
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
AnyMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.AnyMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
def compute_fqn() - > str
lookup
def lookup(
key: str
) - > typing.Any
key
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
AnyMapList
Initializers
import cdktf
cdktf.AnyMapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > AnyMap
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
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
def add(
aspect: IAspect
) - > None
Adds an aspect to apply this scope before synthesis.
aspect
Required
- Type: IAspect
The aspect to add.
Static Functions
Name | Description |
---|---|
of | Returns the Aspects object associated with a construct scope. |
of
import cdktf
cdktf.Aspects.of(
scope: IConstruct
)
Returns the Aspects
object associated with a construct scope.
scope
Required
- Type: constructs.IConstruct
The scope for which these aspects will apply.
Properties
Name | Type | Description |
---|---|---|
all | typing.List[IAspect] | The list of aspects which were directly applied on this scope. |
all
Required
all: typing.List[IAspect]
- Type: typing.List[IAspect]
The list of aspects which were directly applied on this scope.
AssertionReturn
Class representing the contents of a return by an assertion.
Initializers
from cdktf import testing_matchers
testingMatchers.AssertionReturn(
message: str,
pass: bool
)
Name | Type | Description |
---|---|---|
message | str | - String message containing information about the result of the assertion. |
pass | bool | - Boolean pass denoting the success of the assertion. |
message
Required
- Type: str
String message containing information about the result of the assertion.
pass
Required
- Type: bool
Boolean pass denoting the success of the assertion.
Properties
Name | Type | Description |
---|---|---|
message | str | - String message containing information about the result of the assertion. |
pass | bool | - Boolean pass denoting the success of the assertion. |
message
Required
message: str
- Type: str
String message containing information about the result of the assertion.
pass
Required
pass: bool
- Type: bool
Boolean pass denoting the success of the assertion.
BooleanList
Initializers
import cdktf
cdktf.BooleanList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > IResolvable
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
BooleanListList
Initializers
import cdktf
cdktf.BooleanListList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > IResolvable
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
BooleanListMap
Initializers
import cdktf
cdktf.BooleanListMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
key: str
) - > IResolvable
key
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
BooleanMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.BooleanMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
def compute_fqn() - > str
lookup
def lookup(
key: str
) - > IResolvable
key
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
BooleanMapList
Initializers
import cdktf
cdktf.BooleanMapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > BooleanMap
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
CloudWorkspace
A cloud workspace can either be a single named workspace, or a list of tagged workspaces.
Initializers
import cdktf
cdktf.CloudWorkspace()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
to_terraform | No description. |
to_terraform
def to_terraform() - > typing.Any
ComplexComputedList
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import cdktf
cdktf.ComplexComputedList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
complex_computed_list_index: str,
wraps_set: bool = None
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
complex_computed_list_index | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
complex_computed_list_index
Required
- Type: str
wraps_set
Optional
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
get_any_map_attribute | No description. |
get_boolean_attribute | No description. |
get_boolean_map_attribute | No description. |
get_list_attribute | No description. |
get_number_attribute | No description. |
get_number_list_attribute | No description. |
get_number_map_attribute | No description. |
get_string_attribute | No description. |
get_string_map_attribute | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
compute_fqn
def compute_fqn() - > str
get_any_map_attribute
get_any_map_attribute
def get_any_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Any]
terraform_attribute
Required
- Type: str
get_boolean_attribute
get_boolean_attribute
def get_boolean_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
get_boolean_map_attribute
def get_boolean_map_attribute(
terraform_attribute: str
) - > typing.Mapping[bool]
terraform_attribute
Required
- Type: str
get_list_attribute
get_list_attribute
def get_list_attribute(
terraform_attribute: str
) - > typing.List[str]
terraform_attribute
Required
- Type: str
get_number_attribute
get_number_attribute
def get_number_attribute(
terraform_attribute: str
) - > typing.Union[int, float]
terraform_attribute
Required
- Type: str
get_number_list_attribute
get_number_list_attribute
def get_number_list_attribute(
terraform_attribute: str
) - > typing.List[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_number_map_attribute
get_number_map_attribute
def get_number_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_string_attribute
get_string_attribute
def get_string_attribute(
terraform_attribute: str
) - > str
terraform_attribute
Required
- Type: str
get_string_map_attribute
get_string_map_attribute
def get_string_map_attribute(
terraform_attribute: str
) - > typing.Mapping[str]
terraform_attribute
Required
- Type: str
interpolation_for_attribute
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack
- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn
- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
fqn: str
- Type: str
ComplexList
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.ComplexList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
all_with_map_key
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
ComplexMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.ComplexMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
ComplexObject
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import cdktf
cdktf.ComplexObject(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
complex_object_is_from_set: bool,
complex_object_index: typing.Union[str, typing.Union[int, float]] = None
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
complex_object_is_from_set | 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. |
complex_object_index | typing.Union[str, typing.Union[int, float]] | the index of the complex object in a list. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
complex_object_is_from_set
Required
- 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.
complex_object_index
Optional
- Type: typing.Union[str, typing.Union[int, float]]
the index of the complex object in a list.
Methods
Name | Description |
---|---|
compute_fqn | No description. |
get_any_map_attribute | No description. |
get_boolean_attribute | No description. |
get_boolean_map_attribute | No description. |
get_list_attribute | No description. |
get_number_attribute | No description. |
get_number_list_attribute | No description. |
get_number_map_attribute | No description. |
get_string_attribute | No description. |
get_string_map_attribute | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
def compute_fqn() - > str
get_any_map_attribute
def get_any_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Any]
terraform_attribute
Required
- Type: str
get_boolean_attribute
def get_boolean_attribute(
terraform_attribute: str
) - > IResolvable
terraform_attribute
Required
- Type: str
get_boolean_map_attribute
def get_boolean_map_attribute(
terraform_attribute: str
) - > typing.Mapping[bool]
terraform_attribute
Required
- Type: str
get_list_attribute
def get_list_attribute(
terraform_attribute: str
) - > typing.List[str]
terraform_attribute
Required
- Type: str
get_number_attribute
def get_number_attribute(
terraform_attribute: str
) - > typing.Union[int, float]
terraform_attribute
Required
- Type: str
get_number_list_attribute
def get_number_list_attribute(
terraform_attribute: str
) - > typing.List[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_number_map_attribute
def get_number_map_attribute(
terraform_attribute: str
) - > typing.Mapping[typing.Union[int, float]]
terraform_attribute
Required
- Type: str
get_string_attribute
def get_string_attribute(
terraform_attribute: str
) - > str
terraform_attribute
Required
- Type: str
get_string_map_attribute
def get_string_map_attribute(
terraform_attribute: str
) - > typing.Mapping[str]
terraform_attribute
Required
- Type: str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
DefaultTokenResolver
- Implements: ITokenResolver
Default resolver implementation.
Initializers
import cdktf
cdktf.DefaultTokenResolver(
concat: IFragmentConcatenator
)
Name | Type | Description |
---|---|---|
concat | IFragmentConcatenator | No description. |
concat
Required
- Type: IFragmentConcatenator
Methods
Name | Description |
---|---|
resolve_list | Resolves a list of string. |
resolve_map | Resolves a map token. |
resolve_number_list | Resolves a list of numbers. |
resolve_string | Resolve string fragments to Tokens. |
resolve_token | Default Token resolution. |
resolve_list
def resolve_list(
xs: typing.List[str],
context: IResolveContext
) - > typing.Any
Resolves a list of string.
xs
Required
- Type: typing.List[str]
context
Required
- Type: IResolveContext
resolve_map
def resolve_map(
xs: typing.Mapping[typing.Any],
context: IResolveContext
) - > typing.Any
Resolves a map token.
xs
Required
- Type: typing.Mapping[typing.Any]
context
Required
- Type: IResolveContext
resolve_number_list
def resolve_number_list(
xs: typing.List[typing.Union[int, float]],
context: IResolveContext
) - > typing.Any
Resolves a list of numbers.
xs
Required
- Type: typing.List[typing.Union[int, float]]
context
Required
- Type: IResolveContext
resolve_string
def resolve_string(
fragments: TokenizedStringFragments,
context: IResolveContext
) - > typing.Any
Resolve string fragments to Tokens.
fragments
Required
- Type: TokenizedStringFragments
context
Required
- Type: IResolveContext
resolve_token
def resolve_token(
t: IResolvable,
context: IResolveContext,
post_processor: IPostProcessor
) - > typing.Any
Default Token resolution.
Resolve the Token, recurse into whatever it returns, then finally post-process it.
t
Required
- Type: IResolvable
context
Required
- Type: IResolveContext
post_processor
Required
- Type: IPostProcessor
DynamicListTerraformIterator
Initializers
import cdktf
cdktf.DynamicListTerraformIterator(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]],
map_key_attribute_name: str
)
Name | Type | Description |
---|---|---|
list | typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]] | No description. |
map_key_attribute_name | str | No description. |
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
map_key_attribute_name
Required
- Type: str
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | 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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > 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
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > 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
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > 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
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def 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
.
pluck_property
def pluck_property(
property: str
) - > 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
.
property
Required
- Type: str
The property of the iterators values to map to.
values
def 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 |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
import cdktf
cdktf.DynamicListTerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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 = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
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.
from_data_sources
import cdktf
cdktf.DynamicListTerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.DynamicListTerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
import cdktf
cdktf.DynamicListTerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
import cdktf
cdktf.DynamicListTerraformIterator.from_resources(
resource: ITerraformResource
)
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
Properties
Name | Type | Description |
---|---|---|
key | str | Returns the key of the current entry in the map that is being iterated over. |
value | typing.Any | Returns the value of the current item iterated over. |
key
Required
key: str
- Type: str
Returns the key of the current entry in the map that is being iterated over.
value
Required
value: typing.Any
- Type: typing.Any
Returns the value of the current item iterated over.
Fn
Initializers
import cdktf
cdktf.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. |
length_of | {@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. |
lookup_nested | 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. |
raw_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). |
abs
import cdktf
cdktf.Fn.abs(
num: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
abspath
import cdktf
cdktf.Fn.abspath(
path: str
)
{@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.
path
Required
- Type: str
alltrue
import cdktf
cdktf.Fn.alltrue(
list: typing.List[typing.Any]
)
{@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.
list
Required
- Type: typing.List[typing.Any]
anytrue
import cdktf
cdktf.Fn.anytrue(
list: typing.List[typing.Any]
)
{@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.
list
Required
- Type: typing.List[typing.Any]
base64decode
import cdktf
cdktf.Fn.base64decode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string.
str
Required
- Type: str
base64encode
import cdktf
cdktf.Fn.base64encode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
str
Required
- Type: str
base64gzip
import cdktf
cdktf.Fn.base64gzip(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding.
str
Required
- Type: str
base64sha256
import cdktf
cdktf.Fn.base64sha256(
str: str
)
{@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.
str
Required
- Type: str
base64sha512
import cdktf
cdktf.Fn.base64sha512(
str: str
)
{@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.
str
Required
- Type: str
basename
import cdktf
cdktf.Fn.basename(
path: str
)
{@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.
path
Required
- Type: str
can
import cdktf
cdktf.Fn.can(
expression: typing.Any
)
{@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.
expression
Required
- Type: typing.Any
ceil
import cdktf
cdktf.Fn.ceil(
num: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
chomp
import cdktf
cdktf.Fn.chomp(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
str
Required
- Type: str
chunklist
import cdktf
cdktf.Fn.chunklist(
list: typing.List[typing.Any],
size: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists.
list
Required
- Type: typing.List[typing.Any]
size
Required
- Type: typing.Union[int, float]
cidrhost
import cdktf
cdktf.Fn.cidrhost(
prefix: str,
hostnum: typing.Union[int, float]
)
{@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.
prefix
Required
- Type: str
hostnum
Required
- Type: typing.Union[int, float]
cidrnetmask
import cdktf
cdktf.Fn.cidrnetmask(
prefix: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
prefix
Required
- Type: str
cidrsubnet
import cdktf
cdktf.Fn.cidrsubnet(
prefix: str,
newbits: typing.Union[int, float],
netnum: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
prefix
Required
- Type: str
newbits
Required
- Type: typing.Union[int, float]
netnum
Required
- Type: typing.Union[int, float]
cidrsubnets
import cdktf
cdktf.Fn.cidrsubnets(
prefix: str,
newbits: typing.List[typing.Union[int, float]]
)
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix.
prefix
Required
- Type: str
newbits
Required
- Type: typing.List[typing.Union[int, float]]
coalesce
import cdktf
cdktf.Fn.coalesce(
vals: typing.List[typing.Any]
)
{@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.
vals
Required
- Type: typing.List[typing.Any]
coalescelist
import cdktf
cdktf.Fn.coalescelist(
vals: typing.List[typing.Any]
)
{@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.
vals
Required
- Type: typing.List[typing.Any]
compact
import cdktf
cdktf.Fn.compact(
list: typing.List[str]
)
{@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.
list
Required
- Type: typing.List[str]
concat
import cdktf
cdktf.Fn.concat(
seqs: typing.List[typing.Any]
)
{@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list.
seqs
Required
- Type: typing.List[typing.Any]
contains
import cdktf
cdktf.Fn.contains(
list: typing.Any,
value: typing.Any
)
{@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.
list
Required
- Type: typing.Any
value
Required
- Type: typing.Any
csvdecode
import cdktf
cdktf.Fn.csvdecode(
str: str
)
{@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.
str
Required
- Type: str
dirname
import cdktf
cdktf.Fn.dirname(
path: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it.
path
Required
- Type: str
distinct
import cdktf
cdktf.Fn.distinct(
list: typing.List[typing.Any]
)
{@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed.
list
Required
- Type: typing.List[typing.Any]
element
import cdktf
cdktf.Fn.element(
list: typing.Any,
index: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
list
Required
- Type: typing.Any
index
Required
- Type: typing.Union[int, float]
endswith
import cdktf
cdktf.Fn.endswith(
str: str,
suffix: str
)
{@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.
str
Required
- Type: str
suffix
Required
- Type: str
file
import cdktf
cdktf.Fn.file(
path: str
)
{@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.
path
Required
- Type: str
filebase64
import cdktf
cdktf.Fn.filebase64(
path: str
)
{@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.
path
Required
- Type: str
filebase64sha256
import cdktf
cdktf.Fn.filebase64sha256(
path: str
)
{@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.
path
Required
- Type: str
filebase64sha512
import cdktf
cdktf.Fn.filebase64sha512(
path: str
)
{@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.
path
Required
- Type: str
fileexists
import cdktf
cdktf.Fn.fileexists(
path: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
path
Required
- Type: str
filemd5
import cdktf
cdktf.Fn.filemd5(
path: str
)
{@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.
path
Required
- Type: str
fileset
import cdktf
cdktf.Fn.fileset(
path: str,
pattern: str
)
{@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.
path
Required
- Type: str
pattern
Required
- Type: str
filesha1
import cdktf
cdktf.Fn.filesha1(
path: str
)
{@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.
path
Required
- Type: str
filesha256
import cdktf
cdktf.Fn.filesha256(
path: str
)
{@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.
path
Required
- Type: str
filesha512
import cdktf
cdktf.Fn.filesha512(
path: str
)
{@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.
path
Required
- Type: str
flatten
import cdktf
cdktf.Fn.flatten(
list: typing.Any
)
{@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.
list
Required
- Type: typing.Any
floor
import cdktf
cdktf.Fn.floor(
num: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
format
import cdktf
cdktf.Fn.format(
format: str,
args: typing.List[typing.Any]
)
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.
format
Required
- Type: str
args
Required
- Type: typing.List[typing.Any]
formatdate
import cdktf
cdktf.Fn.formatdate(
format: str,
time: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
format
Required
- Type: str
time
Required
- Type: str
formatlist
import cdktf
cdktf.Fn.formatlist(
format: str,
args: typing.List[typing.Any]
)
{@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.
format
Required
- Type: str
args
Required
- Type: typing.List[typing.Any]
indent
import cdktf
cdktf.Fn.indent(
spaces: typing.Union[int, float],
str: str
)
{@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.
spaces
Required
- Type: typing.Union[int, float]
str
Required
- Type: str
index
import cdktf
cdktf.Fn.index(
list: typing.Any,
value: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list.
list
Required
- Type: typing.Any
value
Required
- Type: typing.Any
jsondecode
import cdktf
cdktf.Fn.jsondecode(
str: str
)
{@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.
str
Required
- Type: str
jsonencode
import cdktf
cdktf.Fn.jsonencode(
val: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax.
val
Required
- Type: typing.Any
keys
import cdktf
cdktf.Fn.keys(
input_map: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map.
input_map
Required
- Type: typing.Any
length_of
import cdktf
cdktf.Fn.length_of(
value: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string.
value
Required
- Type: typing.Any
log
import cdktf
cdktf.Fn.log(
num: typing.Union[int, float],
base: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base.
num
Required
- Type: typing.Union[int, float]
base
Required
- Type: typing.Union[int, float]
lower
import cdktf
cdktf.Fn.lower(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase.
str
Required
- Type: str
matchkeys
import cdktf
cdktf.Fn.matchkeys(
values: typing.List[typing.Any],
keys: typing.List[typing.Any],
searchset: typing.List[typing.Any]
)
{@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.
values
Required
- Type: typing.List[typing.Any]
keys
Required
- Type: typing.List[typing.Any]
searchset
Required
- Type: typing.List[typing.Any]
max
import cdktf
cdktf.Fn.max(
numbers: typing.List[typing.Union[int, float]]
)
{@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set.
numbers
Required
- Type: typing.List[typing.Union[int, float]]
md5
import cdktf
cdktf.Fn.md5(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
merge
import cdktf
cdktf.Fn.merge(
maps: typing.List[typing.Any]
)
{@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.
maps
Required
- Type: typing.List[typing.Any]
min
import cdktf
cdktf.Fn.min(
numbers: typing.List[typing.Union[int, float]]
)
{@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set.
numbers
Required
- Type: typing.List[typing.Union[int, float]]
nonsensitive
import cdktf
cdktf.Fn.nonsensitive(
value: typing.Any
)
{@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.
value
Required
- Type: typing.Any
one
import cdktf
cdktf.Fn.one(
list: typing.Any
)
{@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.
list
Required
- Type: typing.Any
parseint
import cdktf
cdktf.Fn.parseint(
number: typing.Any,
base: typing.Union[int, float]
)
{@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.
number
Required
- Type: typing.Any
base
Required
- Type: typing.Union[int, float]
pathexpand
import cdktf
cdktf.Fn.pathexpand(
path: str
)
{@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.
path
Required
- Type: str
plantimestamp
import cdktf
cdktf.Fn.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
import cdktf
cdktf.Fn.pow(
num: typing.Union[int, float],
power: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
power
Required
- Type: typing.Union[int, float]
regex
import cdktf
cdktf.Fn.regex(
pattern: str,
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings.
pattern
Required
- Type: str
str
Required
- Type: str
regexall
import cdktf
cdktf.Fn.regexall(
pattern: str,
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches.
pattern
Required
- Type: str
str
Required
- Type: str
replace
import cdktf
cdktf.Fn.replace(
str: str,
substr: str,
replace: str
)
{@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.
str
Required
- Type: str
substr
Required
- Type: str
replace
Required
- Type: str
reverse
import cdktf
cdktf.Fn.reverse(
list: typing.Any
)
{@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.
list
Required
- Type: typing.Any
rsadecrypt
import cdktf
cdktf.Fn.rsadecrypt(
ciphertext: str,
privatekey: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertext
Required
- Type: str
privatekey
Required
- Type: str
sensitive
import cdktf
cdktf.Fn.sensitive(
value: typing.Any
)
{@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.
value
Required
- Type: typing.Any
setintersection
import cdktf
cdktf.Fn.setintersection(
first_set: typing.List[typing.Any],
other_sets: typing.List[typing.List[typing.Any]]
)
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_set
Required
- Type: typing.List[typing.Any]
other_sets
Required
- Type: typing.List[typing.List[typing.Any]]
setproduct
import cdktf
cdktf.Fn.setproduct(
sets: typing.List[typing.Any]
)
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.
sets
Required
- Type: typing.List[typing.Any]
setsubtract
import cdktf
cdktf.Fn.setsubtract(
a: typing.List[typing.Any],
b: typing.List[typing.Any]
)
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.
a
Required
- Type: typing.List[typing.Any]
b
Required
- Type: typing.List[typing.Any]
setunion
import cdktf
cdktf.Fn.setunion(
first_set: typing.List[typing.Any],
other_sets: typing.List[typing.List[typing.Any]]
)
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_set
Required
- Type: typing.List[typing.Any]
other_sets
Required
- Type: typing.List[typing.List[typing.Any]]
sha1
import cdktf
cdktf.Fn.sha1(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
sha256
import cdktf
cdktf.Fn.sha256(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
sha512
import cdktf
cdktf.Fn.sha512(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
signum
import cdktf
cdktf.Fn.signum(
num: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
slice
import cdktf
cdktf.Fn.slice(
list: typing.Any,
start_index: typing.Union[int, float],
end_index: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
list
Required
- Type: typing.Any
start_index
Required
- Type: typing.Union[int, float]
end_index
Required
- Type: typing.Union[int, float]
sort
import cdktf
cdktf.Fn.sort(
list: typing.List[str]
)
{@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.
list
Required
- Type: typing.List[str]
split
import cdktf
cdktf.Fn.split(
separator: str,
str: str
)
{@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.
separator
Required
- Type: str
str
Required
- Type: str
startswith
import cdktf
cdktf.Fn.startswith(
str: str,
prefix: str
)
{@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.
str
Required
- Type: str
prefix
Required
- Type: str
strcontains
import cdktf
cdktf.Fn.strcontains(
str: str,
substr: str
)
{@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.
str
Required
- Type: str
substr
Required
- Type: str
strrev
import cdktf
cdktf.Fn.strrev(
str: str
)
{@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).
str
Required
- Type: str
substr
import cdktf
cdktf.Fn.substr(
str: str,
offset: typing.Union[int, float],
length: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length.
str
Required
- Type: str
offset
Required
- Type: typing.Union[int, float]
length
Required
- Type: typing.Union[int, float]
sum
import cdktf
cdktf.Fn.sum(
list: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers.
list
Required
- Type: typing.Any
templatefile
import cdktf
cdktf.Fn.templatefile(
path: str,
vars: typing.Any
)
{@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.
path
Required
- Type: str
vars
Required
- Type: typing.Any
textdecodebase64
import cdktf
cdktf.Fn.textdecodebase64(
source: str,
encoding: str
)
{@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.
source
Required
- Type: str
encoding
Required
- Type: str
textencodebase64
import cdktf
cdktf.Fn.textencodebase64(
str: str,
encoding: str
)
{@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.
str
Required
- Type: str
encoding
Required
- Type: str
timeadd
import cdktf
cdktf.Fn.timeadd(
timestamp: str,
duration: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp.
timestamp
Required
- Type: str
duration
Required
- Type: str
timecmp
import cdktf
cdktf.Fn.timecmp(
timestamp_a: str,
timestamp_b: str
)
{@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_a
Required
- Type: str
timestamp_b
Required
- Type: str
timestamp
import cdktf
cdktf.Fn.timestamp()
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
title
import cdktf
cdktf.Fn.title(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase.
str
Required
- Type: str
tobool
import cdktf
cdktf.Fn.tobool(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
v
Required
- Type: typing.Any
tolist
import cdktf
cdktf.Fn.tolist(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
v
Required
- Type: typing.Any
tomap
import cdktf
cdktf.Fn.tomap(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
v
Required
- Type: typing.Any
tonumber
import cdktf
cdktf.Fn.tonumber(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
v
Required
- Type: typing.Any
toset
import cdktf
cdktf.Fn.toset(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
v
Required
- Type: typing.Any
tostring
import cdktf
cdktf.Fn.tostring(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
v
Required
- Type: typing.Any
transpose
import cdktf
cdktf.Fn.transpose(
values: typing.Any
)
{@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.
values
Required
- Type: typing.Any
trim
import cdktf
cdktf.Fn.trim(
str: str,
cutset: str
)
{@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.
str
Required
- Type: str
cutset
Required
- Type: str
trimprefix
import cdktf
cdktf.Fn.trimprefix(
str: str,
prefix: str
)
{@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.
str
Required
- Type: str
prefix
Required
- Type: str
trimspace
import cdktf
cdktf.Fn.trimspace(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string.
str
Required
- Type: str
trimsuffix
import cdktf
cdktf.Fn.trimsuffix(
str: str,
suffix: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string.
str
Required
- Type: str
suffix
Required
- Type: str
try
import cdktf
cdktf.Fn.try(
expressions: typing.List[typing.Any]
)
{@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.
expressions
Required
- Type: typing.List[typing.Any]
upper
import cdktf
cdktf.Fn.upper(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase.
str
Required
- Type: str
urlencode
import cdktf
cdktf.Fn.urlencode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
str
Required
- Type: str
uuid
import cdktf
cdktf.Fn.uuid()
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
uuidv5
import cdktf
cdktf.Fn.uuidv5(
namespace: str,
name: str
)
{@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.
namespace
Required
- Type: str
name
Required
- Type: str
values
import cdktf
cdktf.Fn.values(
mapping: typing.Any
)
{@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.
mapping
Required
- Type: typing.Any
yamldecode
import cdktf
cdktf.Fn.yamldecode(
src: str
)
{@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.
src
Required
- Type: str
yamlencode
import cdktf
cdktf.Fn.yamlencode(
value: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax.
value
Required
- Type: typing.Any
zipmap
import cdktf
cdktf.Fn.zipmap(
keys: typing.List[str],
values: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values.
keys
Required
- Type: typing.List[str]
values
Required
- Type: typing.Any
bcrypt
import cdktf
cdktf.Fn.bcrypt(
str: str,
cost: typing.Union[int, float] = None
)
{@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.
str
Required
- Type: str
cost
Optional
- Type: typing.Union[int, float]
conditional
import cdktf
cdktf.Fn.conditional(
condition: typing.Any,
true_value: typing.Any,
false_value: typing.Any
)
{@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.
condition
Required
- Type: typing.Any
true_value
Required
- Type: typing.Any
false_value
Required
- Type: typing.Any
join
import cdktf
cdktf.Fn.join(
separator: str,
list: typing.List[str]
)
{@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.
separator
Required
- Type: str
list
Required
- Type: typing.List[str]
lookup
import cdktf
cdktf.Fn.lookup(
input_map: typing.Any,
key: str,
default_value: typing.Any = None
)
{@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.
input_map
Required
- Type: typing.Any
key
Required
- Type: str
default_value
Optional
- Type: typing.Any
lookup_nested
import cdktf
cdktf.Fn.lookup_nested(
input_map: typing.Any,
path: typing.List[typing.Any]
)
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"]
input_map
Required
- Type: typing.Any
path
Required
- Type: typing.List[typing.Any]
range
import cdktf
cdktf.Fn.range(
start: typing.Union[int, float],
limit: typing.Union[int, float],
step: typing.Union[int, float] = None
)
{@link /terraform/docs/language/functions/range.html range} generates a list of numbers using a start value, a limit value, and a step value.
start
Required
- Type: typing.Union[int, float]
limit
Required
- Type: typing.Union[int, float]
step
Optional
- Type: typing.Union[int, float]
raw_string
import cdktf
cdktf.Fn.raw_string(
str: str
)
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).
str
Required
- Type: str
FnGenerated
Initializers
import cdktf
cdktf.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. |
length_of | {@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 cdktf
cdktf.FnGenerated.abs(
num: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
abspath
import cdktf
cdktf.FnGenerated.abspath(
path: str
)
{@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.
path
Required
- Type: str
alltrue
import cdktf
cdktf.FnGenerated.alltrue(
list: typing.List[typing.Any]
)
{@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.
list
Required
- Type: typing.List[typing.Any]
anytrue
import cdktf
cdktf.FnGenerated.anytrue(
list: typing.List[typing.Any]
)
{@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.
list
Required
- Type: typing.List[typing.Any]
base64decode
import cdktf
cdktf.FnGenerated.base64decode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string.
str
Required
- Type: str
base64encode
import cdktf
cdktf.FnGenerated.base64encode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
str
Required
- Type: str
base64gzip
import cdktf
cdktf.FnGenerated.base64gzip(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding.
str
Required
- Type: str
base64sha256
import cdktf
cdktf.FnGenerated.base64sha256(
str: str
)
{@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.
str
Required
- Type: str
base64sha512
import cdktf
cdktf.FnGenerated.base64sha512(
str: str
)
{@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.
str
Required
- Type: str
basename
import cdktf
cdktf.FnGenerated.basename(
path: str
)
{@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.
path
Required
- Type: str
can
import cdktf
cdktf.FnGenerated.can(
expression: typing.Any
)
{@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.
expression
Required
- Type: typing.Any
ceil
import cdktf
cdktf.FnGenerated.ceil(
num: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
chomp
import cdktf
cdktf.FnGenerated.chomp(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
str
Required
- Type: str
chunklist
import cdktf
cdktf.FnGenerated.chunklist(
list: typing.List[typing.Any],
size: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists.
list
Required
- Type: typing.List[typing.Any]
size
Required
- Type: typing.Union[int, float]
cidrhost
import cdktf
cdktf.FnGenerated.cidrhost(
prefix: str,
hostnum: typing.Union[int, float]
)
{@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.
prefix
Required
- Type: str
hostnum
Required
- Type: typing.Union[int, float]
cidrnetmask
import cdktf
cdktf.FnGenerated.cidrnetmask(
prefix: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
prefix
Required
- Type: str
cidrsubnet
import cdktf
cdktf.FnGenerated.cidrsubnet(
prefix: str,
newbits: typing.Union[int, float],
netnum: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
prefix
Required
- Type: str
newbits
Required
- Type: typing.Union[int, float]
netnum
Required
- Type: typing.Union[int, float]
cidrsubnets
import cdktf
cdktf.FnGenerated.cidrsubnets(
prefix: str,
newbits: typing.List[typing.Union[int, float]]
)
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix.
prefix
Required
- Type: str
newbits
Required
- Type: typing.List[typing.Union[int, float]]
coalesce
import cdktf
cdktf.FnGenerated.coalesce(
vals: typing.List[typing.Any]
)
{@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.
vals
Required
- Type: typing.List[typing.Any]
coalescelist
import cdktf
cdktf.FnGenerated.coalescelist(
vals: typing.List[typing.Any]
)
{@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.
vals
Required
- Type: typing.List[typing.Any]
compact
import cdktf
cdktf.FnGenerated.compact(
list: typing.List[str]
)
{@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.
list
Required
- Type: typing.List[str]
concat
import cdktf
cdktf.FnGenerated.concat(
seqs: typing.List[typing.Any]
)
{@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list.
seqs
Required
- Type: typing.List[typing.Any]
contains
import cdktf
cdktf.FnGenerated.contains(
list: typing.Any,
value: typing.Any
)
{@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.
list
Required
- Type: typing.Any
value
Required
- Type: typing.Any
csvdecode
import cdktf
cdktf.FnGenerated.csvdecode(
str: str
)
{@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.
str
Required
- Type: str
dirname
import cdktf
cdktf.FnGenerated.dirname(
path: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it.
path
Required
- Type: str
distinct
import cdktf
cdktf.FnGenerated.distinct(
list: typing.List[typing.Any]
)
{@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed.
list
Required
- Type: typing.List[typing.Any]
element
import cdktf
cdktf.FnGenerated.element(
list: typing.Any,
index: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
list
Required
- Type: typing.Any
index
Required
- Type: typing.Union[int, float]
endswith
import cdktf
cdktf.FnGenerated.endswith(
str: str,
suffix: str
)
{@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.
str
Required
- Type: str
suffix
Required
- Type: str
file
import cdktf
cdktf.FnGenerated.file(
path: str
)
{@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.
path
Required
- Type: str
filebase64
import cdktf
cdktf.FnGenerated.filebase64(
path: str
)
{@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.
path
Required
- Type: str
filebase64sha256
import cdktf
cdktf.FnGenerated.filebase64sha256(
path: str
)
{@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.
path
Required
- Type: str
filebase64sha512
import cdktf
cdktf.FnGenerated.filebase64sha512(
path: str
)
{@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.
path
Required
- Type: str
fileexists
import cdktf
cdktf.FnGenerated.fileexists(
path: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
path
Required
- Type: str
filemd5
import cdktf
cdktf.FnGenerated.filemd5(
path: str
)
{@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.
path
Required
- Type: str
fileset
import cdktf
cdktf.FnGenerated.fileset(
path: str,
pattern: str
)
{@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.
path
Required
- Type: str
pattern
Required
- Type: str
filesha1
import cdktf
cdktf.FnGenerated.filesha1(
path: str
)
{@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.
path
Required
- Type: str
filesha256
import cdktf
cdktf.FnGenerated.filesha256(
path: str
)
{@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.
path
Required
- Type: str
filesha512
import cdktf
cdktf.FnGenerated.filesha512(
path: str
)
{@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.
path
Required
- Type: str
flatten
import cdktf
cdktf.FnGenerated.flatten(
list: typing.Any
)
{@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.
list
Required
- Type: typing.Any
floor
import cdktf
cdktf.FnGenerated.floor(
num: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
format
import cdktf
cdktf.FnGenerated.format(
format: str,
args: typing.List[typing.Any]
)
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.
format
Required
- Type: str
args
Required
- Type: typing.List[typing.Any]
formatdate
import cdktf
cdktf.FnGenerated.formatdate(
format: str,
time: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
format
Required
- Type: str
time
Required
- Type: str
formatlist
import cdktf
cdktf.FnGenerated.formatlist(
format: str,
args: typing.List[typing.Any]
)
{@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.
format
Required
- Type: str
args
Required
- Type: typing.List[typing.Any]
indent
import cdktf
cdktf.FnGenerated.indent(
spaces: typing.Union[int, float],
str: str
)
{@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.
spaces
Required
- Type: typing.Union[int, float]
str
Required
- Type: str
index
import cdktf
cdktf.FnGenerated.index(
list: typing.Any,
value: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list.
list
Required
- Type: typing.Any
value
Required
- Type: typing.Any
jsondecode
import cdktf
cdktf.FnGenerated.jsondecode(
str: str
)
{@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.
str
Required
- Type: str
jsonencode
import cdktf
cdktf.FnGenerated.jsonencode(
val: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax.
val
Required
- Type: typing.Any
keys
import cdktf
cdktf.FnGenerated.keys(
input_map: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map.
input_map
Required
- Type: typing.Any
length_of
import cdktf
cdktf.FnGenerated.length_of(
value: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string.
value
Required
- Type: typing.Any
log
import cdktf
cdktf.FnGenerated.log(
num: typing.Union[int, float],
base: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base.
num
Required
- Type: typing.Union[int, float]
base
Required
- Type: typing.Union[int, float]
lower
import cdktf
cdktf.FnGenerated.lower(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase.
str
Required
- Type: str
matchkeys
import cdktf
cdktf.FnGenerated.matchkeys(
values: typing.List[typing.Any],
keys: typing.List[typing.Any],
searchset: typing.List[typing.Any]
)
{@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.
values
Required
- Type: typing.List[typing.Any]
keys
Required
- Type: typing.List[typing.Any]
searchset
Required
- Type: typing.List[typing.Any]
max
import cdktf
cdktf.FnGenerated.max(
numbers: typing.List[typing.Union[int, float]]
)
{@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set.
numbers
Required
- Type: typing.List[typing.Union[int, float]]
md5
import cdktf
cdktf.FnGenerated.md5(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
merge
import cdktf
cdktf.FnGenerated.merge(
maps: typing.List[typing.Any]
)
{@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.
maps
Required
- Type: typing.List[typing.Any]
min
import cdktf
cdktf.FnGenerated.min(
numbers: typing.List[typing.Union[int, float]]
)
{@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set.
numbers
Required
- Type: typing.List[typing.Union[int, float]]
nonsensitive
import cdktf
cdktf.FnGenerated.nonsensitive(
value: typing.Any
)
{@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.
value
Required
- Type: typing.Any
one
import cdktf
cdktf.FnGenerated.one(
list: typing.Any
)
{@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.
list
Required
- Type: typing.Any
parseint
import cdktf
cdktf.FnGenerated.parseint(
number: typing.Any,
base: typing.Union[int, float]
)
{@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.
number
Required
- Type: typing.Any
base
Required
- Type: typing.Union[int, float]
pathexpand
import cdktf
cdktf.FnGenerated.pathexpand(
path: str
)
{@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.
path
Required
- Type: str
plantimestamp
import cdktf
cdktf.FnGenerated.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
import cdktf
cdktf.FnGenerated.pow(
num: typing.Union[int, float],
power: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
power
Required
- Type: typing.Union[int, float]
regex
import cdktf
cdktf.FnGenerated.regex(
pattern: str,
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings.
pattern
Required
- Type: str
str
Required
- Type: str
regexall
import cdktf
cdktf.FnGenerated.regexall(
pattern: str,
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches.
pattern
Required
- Type: str
str
Required
- Type: str
replace
import cdktf
cdktf.FnGenerated.replace(
str: str,
substr: str,
replace: str
)
{@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.
str
Required
- Type: str
substr
Required
- Type: str
replace
Required
- Type: str
reverse
import cdktf
cdktf.FnGenerated.reverse(
list: typing.Any
)
{@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.
list
Required
- Type: typing.Any
rsadecrypt
import cdktf
cdktf.FnGenerated.rsadecrypt(
ciphertext: str,
privatekey: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertext
Required
- Type: str
privatekey
Required
- Type: str
sensitive
import cdktf
cdktf.FnGenerated.sensitive(
value: typing.Any
)
{@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.
value
Required
- Type: typing.Any
setintersection
import cdktf
cdktf.FnGenerated.setintersection(
first_set: typing.List[typing.Any],
other_sets: typing.List[typing.List[typing.Any]]
)
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_set
Required
- Type: typing.List[typing.Any]
other_sets
Required
- Type: typing.List[typing.List[typing.Any]]
setproduct
import cdktf
cdktf.FnGenerated.setproduct(
sets: typing.List[typing.Any]
)
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.
sets
Required
- Type: typing.List[typing.Any]
setsubtract
import cdktf
cdktf.FnGenerated.setsubtract(
a: typing.List[typing.Any],
b: typing.List[typing.Any]
)
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.
a
Required
- Type: typing.List[typing.Any]
b
Required
- Type: typing.List[typing.Any]
setunion
import cdktf
cdktf.FnGenerated.setunion(
first_set: typing.List[typing.Any],
other_sets: typing.List[typing.List[typing.Any]]
)
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_set
Required
- Type: typing.List[typing.Any]
other_sets
Required
- Type: typing.List[typing.List[typing.Any]]
sha1
import cdktf
cdktf.FnGenerated.sha1(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
sha256
import cdktf
cdktf.FnGenerated.sha256(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
sha512
import cdktf
cdktf.FnGenerated.sha512(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
str
Required
- Type: str
signum
import cdktf
cdktf.FnGenerated.signum(
num: typing.Union[int, float]
)
{@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.
num
Required
- Type: typing.Union[int, float]
slice
import cdktf
cdktf.FnGenerated.slice(
list: typing.Any,
start_index: typing.Union[int, float],
end_index: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
list
Required
- Type: typing.Any
start_index
Required
- Type: typing.Union[int, float]
end_index
Required
- Type: typing.Union[int, float]
sort
import cdktf
cdktf.FnGenerated.sort(
list: typing.List[str]
)
{@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.
list
Required
- Type: typing.List[str]
split
import cdktf
cdktf.FnGenerated.split(
separator: str,
str: str
)
{@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.
separator
Required
- Type: str
str
Required
- Type: str
startswith
import cdktf
cdktf.FnGenerated.startswith(
str: str,
prefix: str
)
{@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.
str
Required
- Type: str
prefix
Required
- Type: str
strcontains
import cdktf
cdktf.FnGenerated.strcontains(
str: str,
substr: str
)
{@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.
str
Required
- Type: str
substr
Required
- Type: str
strrev
import cdktf
cdktf.FnGenerated.strrev(
str: str
)
{@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).
str
Required
- Type: str
substr
import cdktf
cdktf.FnGenerated.substr(
str: str,
offset: typing.Union[int, float],
length: typing.Union[int, float]
)
{@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length.
str
Required
- Type: str
offset
Required
- Type: typing.Union[int, float]
length
Required
- Type: typing.Union[int, float]
sum
import cdktf
cdktf.FnGenerated.sum(
list: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers.
list
Required
- Type: typing.Any
templatefile
import cdktf
cdktf.FnGenerated.templatefile(
path: str,
vars: typing.Any
)
{@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.
path
Required
- Type: str
vars
Required
- Type: typing.Any
textdecodebase64
import cdktf
cdktf.FnGenerated.textdecodebase64(
source: str,
encoding: str
)
{@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.
source
Required
- Type: str
encoding
Required
- Type: str
textencodebase64
import cdktf
cdktf.FnGenerated.textencodebase64(
str: str,
encoding: str
)
{@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.
str
Required
- Type: str
encoding
Required
- Type: str
timeadd
import cdktf
cdktf.FnGenerated.timeadd(
timestamp: str,
duration: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp.
timestamp
Required
- Type: str
duration
Required
- Type: str
timecmp
import cdktf
cdktf.FnGenerated.timecmp(
timestamp_a: str,
timestamp_b: str
)
{@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_a
Required
- Type: str
timestamp_b
Required
- Type: str
timestamp
import cdktf
cdktf.FnGenerated.timestamp()
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
title
import cdktf
cdktf.FnGenerated.title(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase.
str
Required
- Type: str
tobool
import cdktf
cdktf.FnGenerated.tobool(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
v
Required
- Type: typing.Any
tolist
import cdktf
cdktf.FnGenerated.tolist(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
v
Required
- Type: typing.Any
tomap
import cdktf
cdktf.FnGenerated.tomap(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
v
Required
- Type: typing.Any
tonumber
import cdktf
cdktf.FnGenerated.tonumber(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
v
Required
- Type: typing.Any
toset
import cdktf
cdktf.FnGenerated.toset(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
v
Required
- Type: typing.Any
tostring
import cdktf
cdktf.FnGenerated.tostring(
v: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
v
Required
- Type: typing.Any
transpose
import cdktf
cdktf.FnGenerated.transpose(
values: typing.Any
)
{@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.
values
Required
- Type: typing.Any
trim
import cdktf
cdktf.FnGenerated.trim(
str: str,
cutset: str
)
{@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.
str
Required
- Type: str
cutset
Required
- Type: str
trimprefix
import cdktf
cdktf.FnGenerated.trimprefix(
str: str,
prefix: str
)
{@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.
str
Required
- Type: str
prefix
Required
- Type: str
trimspace
import cdktf
cdktf.FnGenerated.trimspace(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string.
str
Required
- Type: str
trimsuffix
import cdktf
cdktf.FnGenerated.trimsuffix(
str: str,
suffix: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string.
str
Required
- Type: str
suffix
Required
- Type: str
try
import cdktf
cdktf.FnGenerated.try(
expressions: typing.List[typing.Any]
)
{@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.
expressions
Required
- Type: typing.List[typing.Any]
upper
import cdktf
cdktf.FnGenerated.upper(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase.
str
Required
- Type: str
urlencode
import cdktf
cdktf.FnGenerated.urlencode(
str: str
)
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
str
Required
- Type: str
uuid
import cdktf
cdktf.FnGenerated.uuid()
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
uuidv5
import cdktf
cdktf.FnGenerated.uuidv5(
namespace: str,
name: str
)
{@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.
namespace
Required
- Type: str
name
Required
- Type: str
values
import cdktf
cdktf.FnGenerated.values(
mapping: typing.Any
)
{@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.
mapping
Required
- Type: typing.Any
yamldecode
import cdktf
cdktf.FnGenerated.yamldecode(
src: str
)
{@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.
src
Required
- Type: str
yamlencode
import cdktf
cdktf.FnGenerated.yamlencode(
value: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax.
value
Required
- Type: typing.Any
zipmap
import cdktf
cdktf.FnGenerated.zipmap(
keys: typing.List[str],
values: typing.Any
)
{@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values.
keys
Required
- Type: typing.List[str]
values
Required
- Type: typing.Any
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 cdktf
cdktf.Lazy()
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
any_value | Produces a lazy token from an untyped value. |
list_value | Returns a list-ified token for a lazy value. |
number_value | Returns a numberified token for a lazy value. |
string_value | Returns a stringified token for a lazy value. |
any_value
import cdktf
cdktf.Lazy.any_value(
producer: IAnyProducer,
display_hint: str = None,
omit_empty_array: bool = None
)
Produces a lazy token from an untyped value.
producer
Required
- Type: IAnyProducer
The lazy producer.
display_hint
Optional
- Type: str
- Default: No hint
Use the given name as a display hint.
omit_empty_array
Optional
- Type: bool
- Default: false
If the produced value is an array and it is empty, return 'undefined' instead.
list_value
import cdktf
cdktf.Lazy.list_value(
producer: IListProducer,
display_hint: str = None,
omit_empty: bool = None
)
Returns a list-ified token for a lazy value.
producer
Required
- Type: IListProducer
The producer.
display_hint
Optional
- Type: str
- Default: No hint
Use the given name as a display hint.
omit_empty
Optional
- Type: bool
- Default: false
If the produced list is empty, return 'undefined' instead.
number_value
import cdktf
cdktf.Lazy.number_value(
producer: INumberProducer
)
Returns a numberified token for a lazy value.
producer
Required
- Type: INumberProducer
The producer.
string_value
import cdktf
cdktf.Lazy.string_value(
producer: IStringProducer,
display_hint: str = None
)
Returns a stringified token for a lazy value.
producer
Required
- Type: IStringProducer
The producer.
display_hint
Optional
- Type: str
- Default: No hint
Use the given name as a display hint.
LazyBase
- Implements: IResolvable
Initializers
import cdktf
cdktf.LazyBase()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
add_post_processor | No description. |
resolve | Produce the Token's value at resolution time. |
to_jso_n | Turn this Token into JSON. |
to_string | Return a string representation of this resolvable object. |
add_post_processor
def add_post_processor(
post_processor: IPostProcessor
) - > None
post_processor
Required
- Type: IPostProcessor
resolve
def resolve(
context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
context
Required
- Type: IResolveContext
to_jso_n
def to_jso_n() - > typing.Any
Turn this Token into JSON.
Called automatically when JSON.stringify() is called on a Token.
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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 cdktf
cdktf.ListTerraformIterator(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
Name | Type | Description |
---|---|---|
list | typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]] | No description. |
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | 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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > 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
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > 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
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > 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
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def 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
.
pluck_property
def pluck_property(
property: str
) - > 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
.
property
Required
- Type: str
The property of the iterators values to map to.
values
def 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 |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
import cdktf
cdktf.ListTerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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 = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
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.
from_data_sources
import cdktf
cdktf.ListTerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.ListTerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
import cdktf
cdktf.ListTerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
import cdktf
cdktf.ListTerraformIterator.from_resources(
resource: ITerraformResource
)
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
Properties
Name | Type | Description |
---|---|---|
key | typing.Any | Returns the currently entry in the list or set that is being iterated over. |
value | typing.Any | Returns the value of the current item iterated over. |
key
Required
key: typing.Any
- Type: typing.Any
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
value
Required
value: typing.Any
- Type: typing.Any
Returns the value of the current item iterated over.
Manifest
- Implements: IManifest
Initializers
import cdktf
cdktf.Manifest(
version: str,
outdir: str,
hcl_output: bool
)
Name | Type | Description |
---|---|---|
version | str | No description. |
outdir | str | No description. |
hcl_output | bool | No description. |
version
Required
- Type: str
outdir
Required
- Type: str
hcl_output
Required
- Type: bool
Methods
Name | Description |
---|---|
build_manifest | No description. |
for_stack | No description. |
write_to_file | No description. |
build_manifest
def build_manifest() - > IManifest
for_stack
def for_stack(
stack: TerraformStack
) - > StackManifest
stack
Required
- Type: TerraformStack
write_to_file
def write_to_file() - > None
Properties
Name | Type | Description |
---|---|---|
hcl_output | bool | No description. |
outdir | str | No description. |
stack_file_name | str | No description. |
stacks | typing.Mapping[StackManifest] | No description. |
version | str | No description. |
hcl_output
Required
hcl_output: bool
- Type: bool
outdir
Required
outdir: str
- Type: str
stack_file_name
Required
stack_file_name: str
- Type: str
stacks
Required
stacks: typing.Mapping[StackManifest]
- Type: typing.Mapping[StackManifest]
version
Required
version: str
- Type: str
Constants
Name | Type | Description |
---|---|---|
fileName | str | No description. |
stackMetadataPath | str | No description. |
stacksFolder | str | No description. |
fileName
Required
fileName: str
- Type: str
stackMetadataPath
Required
stackMetadataPath: str
- Type: str
stacksFolder
Required
stacksFolder: str
- Type: str
MapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
import cdktf
cdktf.MapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
MapTerraformIterator
Initializers
import cdktf
cdktf.MapTerraformIterator(
map: typing.Union[AnyMap, StringMap, NumberMap, BooleanMap, ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]]]
)
Name | Type | Description |
---|---|---|
map | typing.Union[AnyMap, StringMap, NumberMap, BooleanMap, ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]]] | No description. |
map
Required
- Type: typing.Union[AnyMap, StringMap, NumberMap, BooleanMap, ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]]]
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | 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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > 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
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > 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
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > 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
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def 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
.
pluck_property
def pluck_property(
property: str
) - > 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
.
property
Required
- Type: str
The property of the iterators values to map to.
values
def 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 |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
import cdktf
cdktf.MapTerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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 = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
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.
from_data_sources
import cdktf
cdktf.MapTerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.MapTerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
import cdktf
cdktf.MapTerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
import cdktf
cdktf.MapTerraformIterator.from_resources(
resource: ITerraformResource
)
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
Properties
Name | Type | Description |
---|---|---|
key | str | Returns the key of the current entry in the map that is being iterated over. |
value | typing.Any | Returns the value of the current item iterated over. |
key
Required
key: str
- Type: str
Returns the key of the current entry in the map that is being iterated over.
value
Required
value: typing.Any
- Type: typing.Any
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 cdktf
cdktf.MigrateIds()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
visit | All aspects can visit an IConstruct. |
visit
def visit(
node: IConstruct
) - > None
All aspects can visit an IConstruct.
node
Required
- Type: constructs.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 cdktf
cdktf.NamedCloudWorkspace(
name: str,
project: str = None
)
name
Required
- Type: str
project
Optional
- Type: str
Methods
Name | Description |
---|---|
to_terraform | No description. |
to_hcl_terraform | No description. |
to_terraform
def to_terraform() - > typing.Any
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Properties
name
Required
name: str
- Type: str
project
Optional
project: str
- Type: str
NamedRemoteWorkspace
- Implements: IRemoteWorkspace
Initializers
import cdktf
cdktf.NamedRemoteWorkspace(
name: str
)
Name | Type | Description |
---|---|---|
name | str | No description. |
name
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
name | str | No description. |
name
Required
name: str
- Type: str
NumberListList
Initializers
import cdktf
cdktf.NumberListList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > typing.List[typing.Union[int, float]]
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
NumberListMap
Initializers
import cdktf
cdktf.NumberListMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
key: str
) - > typing.List[typing.Union[int, float]]
key
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
NumberMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.NumberMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
def compute_fqn() - > str
lookup
def lookup(
key: str
) - > typing.Union[int, float]
key
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
NumberMapList
Initializers
import cdktf
cdktf.NumberMapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > NumberMap
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
Op
This class contains static functions for all arithmetical and logical operators in the Terraform configuration language.
Initializers
import cdktf
cdktf.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 cdktf
cdktf.Op.add(
left: typing.Any,
right: typing.Any
)
Renders left + right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
and
import cdktf
cdktf.Op.and(
left: typing.Any,
right: typing.Any
)
Renders left && right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
div
import cdktf
cdktf.Op.div(
left: typing.Any,
right: typing.Any
)
Renders left / right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
eq
import cdktf
cdktf.Op.eq(
left: typing.Any,
right: typing.Any
)
Renders left == right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
gt
import cdktf
cdktf.Op.gt(
left: typing.Any,
right: typing.Any
)
Renders left > right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
gte
import cdktf
cdktf.Op.gte(
left: typing.Any,
right: typing.Any
)
Renders left >= right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
lt
import cdktf
cdktf.Op.lt(
left: typing.Any,
right: typing.Any
)
Renders left < right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
lte
import cdktf
cdktf.Op.lte(
left: typing.Any,
right: typing.Any
)
Renders left < = right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
mod
import cdktf
cdktf.Op.mod(
left: typing.Any,
right: typing.Any
)
Renders left % right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
mul
import cdktf
cdktf.Op.mul(
left: typing.Any,
right: typing.Any
)
Renders left * right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
negate
import cdktf
cdktf.Op.negate(
expression: typing.Any
)
Renders -expression.
expression
Required
- Type: typing.Any
neq
import cdktf
cdktf.Op.neq(
left: typing.Any,
right: typing.Any
)
Renders left != right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
not
import cdktf
cdktf.Op.not(
expression: typing.Any
)
Renders !expression.
expression
Required
- Type: typing.Any
or
import cdktf
cdktf.Op.or(
left: typing.Any,
right: typing.Any
)
Renders left || right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
sub
import cdktf
cdktf.Op.sub(
left: typing.Any,
right: typing.Any
)
Renders left - right.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
PrefixedRemoteWorkspaces
- Implements: IRemoteWorkspace
Initializers
import cdktf
cdktf.PrefixedRemoteWorkspaces(
prefix: str
)
Name | Type | Description |
---|---|---|
prefix | str | No description. |
prefix
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
prefix | str | No description. |
prefix
Required
prefix: str
- Type: str
ResourceTerraformIterator
Initializers
import cdktf
cdktf.ResourceTerraformIterator(
element: ITerraformResource
)
Name | Type | Description |
---|---|---|
element | ITerraformResource | No description. |
element
Required
- Type: ITerraformResource
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | 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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > 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
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > 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
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > 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
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def 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
.
pluck_property
def pluck_property(
property: str
) - > 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
.
property
Required
- Type: str
The property of the iterators values to map to.
values
def 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 |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
import cdktf
cdktf.ResourceTerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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 = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
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.
from_data_sources
import cdktf
cdktf.ResourceTerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.ResourceTerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
import cdktf
cdktf.ResourceTerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
import cdktf
cdktf.ResourceTerraformIterator.from_resources(
resource: ITerraformResource
)
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
Properties
Name | Type | Description |
---|---|---|
key | typing.Any | Returns the current entry in the list or set that is being iterated over. |
value | typing.Any | Returns the value of the current item iterated over. |
key
Required
key: typing.Any
- Type: typing.Any
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
value
Required
value: typing.Any
- Type: typing.Any
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 cdktf
cdktf.StringConcat()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
join | Concatenates string fragments. |
join
def join(
left: typing.Any,
right: typing.Any
) - > typing.Any
Concatenates string fragments.
left
Required
- Type: typing.Any
right
Required
- Type: typing.Any
StringListList
Initializers
import cdktf
cdktf.StringListList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
all_with_map_key | Creating an iterator for this complex list. |
compute_fqn | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
all_with_map_key
def all_with_map_key(
map_key_attribute_name: str
) - > DynamicListTerraformIterator
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
map_key_attribute_name
Required
- Type: str
compute_fqn
def compute_fqn() - > str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > typing.List[str]
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
StringListMap
Initializers
import cdktf
cdktf.StringListMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
key: str
) - > typing.List[str]
key
Required
- Type: str
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
StringMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import cdktf
cdktf.StringMap(
terraform_resource: IInterpolatingParent,
terraform_attribute: str
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
Methods
Name | Description |
---|---|
compute_fqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
compute_fqn
def compute_fqn() - > str
lookup
def lookup(
key: str
) - > str
key
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
StringMapList
Initializers
import cdktf
cdktf.StringMapList(
terraform_resource: IInterpolatingParent,
terraform_attribute: str,
wraps_set: bool
)
Name | Type | Description |
---|---|---|
terraform_resource | IInterpolatingParent | No description. |
terraform_attribute | str | No description. |
wraps_set | bool | No description. |
terraform_resource
Required
- Type: IInterpolatingParent
terraform_attribute
Required
- Type: str
wraps_set
Required
- Type: bool
Methods
Name | Description |
---|---|
compute_fqn | No description. |
interpolation_for_attribute | No description. |
resolve | Produce the Token's value at resolution time. |
to_string | Return a string representation of this resolvable object. |
get | No description. |
compute_fqn
def compute_fqn() - > str
interpolation_for_attribute
def interpolation_for_attribute(
property: str
) - > IResolvable
property
Required
- Type: str
resolve
def resolve(
_context: IResolveContext
) - > typing.Any
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
to_string
def to_string() - > str
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
def get(
index: typing.Union[int, float]
) - > StringMap
index
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
creation_stack | typing.List[str] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | str | No description. |
creation_stack
Required
creation_stack: typing.List[str]
- Type: typing.List[str]
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.
fqn
Required
fqn: str
- Type: str
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 cdktf
cdktf.TaggedCloudWorkspaces(
tags: typing.List[str],
project: str = None
)
tags
Required
- Type: typing.List[str]
project
Optional
- Type: str
Methods
Name | Description |
---|---|
to_terraform | No description. |
to_hcl_terraform | No description. |
to_terraform
def to_terraform() - > typing.Any
to_hcl_terraform
def to_hcl_terraform() - > typing.Any
Properties
tags
Required
tags: typing.List[str]
- Type: typing.List[str]
project
Optional
project: str
- Type: str
TerraformCount
Iterator for the Terraform count property.
Methods
Name | Description |
---|---|
to_string | No description. |
to_terraform | No description. |
to_string
def to_string() - > str
to_terraform
def to_terraform() - > typing.Union[int, float]
Static Functions
Name | Description |
---|---|
is_terraform_count | No description. |
of | No description. |
is_terraform_count
import cdktf
cdktf.TerraformCount.is_terraform_count(
x: typing.Any
)
x
Required
- Type: typing.Any
of
import cdktf
cdktf.TerraformCount.of(
count: typing.Union[int, float]
)
count
Required
- Type: typing.Union[int, float]
Properties
Name | Type | Description |
---|---|---|
index | typing.Union[int, float] | No description. |
index
Required
index: typing.Union[int, float]
- Type: typing.Union[int, float]
TerraformIterator
- Implements: ITerraformIterator
Initializers
import cdktf
cdktf.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. |
for_expression_for_list | Creates a for expression that results in a list. |
for_expression_for_map | Creates a for expression that results in a map. |
get_any | No description. |
get_any_map | No description. |
get_boolean | No description. |
get_boolean_map | No description. |
get_list | No description. |
get_map | No description. |
get_number | No description. |
get_number_list | No description. |
get_number_map | No description. |
get_string | No description. |
get_string_map | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluck_property | 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
def dynamic(
attributes: typing.Mapping[typing.Any]
) - > 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
attributes
Required
- Type: typing.Mapping[typing.Any]
for_expression_for_list
def for_expression_for_list(
expression: typing.Union[str, IResolvable]
) - > 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
.
expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use in the for mapping.
for_expression_for_map
def for_expression_for_map(
key_expression: typing.Union[str, IResolvable],
value_expression: typing.Union[str, IResolvable]
) - > 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
.
key_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as key in the for mapping.
value_expression
Required
- Type: typing.Union[str, IResolvable]
The expression to use as value in the for mapping.
get_any
def get_any(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_any_map
def get_any_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean
def get_boolean(
attribute: str
) - > IResolvable
attribute
Required
- Type: str
name of the property to retrieve.
get_boolean_map
def get_boolean_map(
attribute: str
) - > typing.Mapping[bool]
attribute
Required
- Type: str
name of the property to retrieve.
get_list
def get_list(
attribute: str
) - > typing.List[str]
attribute
Required
- Type: str
name of the property to retrieve.
get_map
def get_map(
attribute: str
) - > typing.Mapping[typing.Any]
attribute
Required
- Type: str
name of the property to retrieve.
get_number
def get_number(
attribute: str
) - > typing.Union[int, float]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_list
def get_number_list(
attribute: str
) - > typing.List[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_number_map
def get_number_map(
attribute: str
) - > typing.Mapping[typing.Union[int, float]]
attribute
Required
- Type: str
name of the property to retrieve.
get_string
def get_string(
attribute: str
) - > str
attribute
Required
- Type: str
name of the property to retrieve.
get_string_map
def get_string_map(
attribute: str
) - > typing.Mapping[str]
attribute
Required
- Type: str
name of the property to retrieve.
keys
def 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
.
pluck_property
def pluck_property(
property: str
) - > 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
.
property
Required
- Type: str
The property of the iterators values to map to.
values
def 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 |
---|---|
from_complex_list | Creates a new iterator from a complex list. |
from_data_sources | Creates a new iterator from a data source that has been created with the for_each argument. |
from_list | Creates a new iterator from a list. |
from_map | Creates a new iterator from a map. |
from_resources | Creates a new iterator from a resource that has been created with the for_each argument. |
from_complex_list
import cdktf
cdktf.TerraformIterator.from_complex_list(
list: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList],
map_key_attribute_name: str
)
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 = AcmCertificate(self, "cert",
domain_name="example.com",
validation_method="DNS"
)
dvo_iterator = TerraformIterator.from_complex_list(cert.domain_validation_options, "domain_name")
Route53Record(self, "record",
allow_overwrite=True,
name=dvo_iterator.get_string("name"),
records=[dvo_iterator.get_string("record")],
ttl=60,
type=dvo_iterator.get_string("type"),
zone_id=Token.as_string(data_aws_route53_zone_example.zone_id),
for_each=dvo_iterator
)
list
Required
- Type: typing.Union[IResolvable, ComplexList, StringMapList, NumberMapList, BooleanMapList, AnyMapList]
the list to iterate over.
map_key_attribute_name
Required
- Type: str
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.
from_data_sources
import cdktf
cdktf.TerraformIterator.from_data_sources(
resource: ITerraformResource
)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
from_list
import cdktf
cdktf.TerraformIterator.from_list(
list: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
)
Creates a new iterator from a list.
list
Required
- Type: typing.Union[typing.List[str], IResolvable, typing.List[typing.Union[int, float]], typing.List[typing.Union[bool, IResolvable]]]
from_map
import cdktf
cdktf.TerraformIterator.from_map(
map: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
)
Creates a new iterator from a map.
map
Required
- Type: typing.Union[ComplexMap, typing.Mapping[typing.Any], typing.Mapping[str], typing.Mapping[typing.Union[int, float]], typing.Mapping[bool]]
from_resources
import cdktf
cdktf.TerraformIterator.from_resources(
resource: ITerraformResource
)
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
TerraformResourceTargets
Initializers
import cdktf
cdktf.TerraformResourceTargets()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
add_resource_target | No description. |
get_resource_by_target | No description. |
add_resource_target
def add_resource_target(
resource: TerraformResource,
target: str
) - > None
resource
Required
- Type: TerraformResource
target
Required
- Type: str
get_resource_by_target
def get_resource_by_target(
target: str
) - > TerraformResource
target
Required
- Type: str
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 cdktf
cdktf.TerraformSelf()
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
get_any | Only usable within a connection block to reference the connections parent resource. |
get_number | Only usable within a connection block to reference the connections parent resource. |
get_string | Only usable within a connection block to reference the connections parent resource. |
get_any
import cdktf
cdktf.TerraformSelf.get_any(
key: str
)
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getAny("hostPort")
key
Required
- Type: str
get_number
import cdktf
cdktf.TerraformSelf.get_number(
key: str
)
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getNumber("hostPort")
key
Required
- Type: str
get_string
import cdktf
cdktf.TerraformSelf.get_string(
key: str
)
Only usable within a connection block to reference the connections parent resource.
Access a property on the resource like this: getString("publicIp")
key
Required
- Type: str
Testing
Testing utilities for cdktf applications.
Initializers
import cdktf
cdktf.Testing()
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
app | Returns an app for testing with the following properties: - Output directory is a temp dir. |
enable_future_flags | No description. |
fake_cdktf_json_path | No description. |
full_synth | No description. |
render_construct_tree | No description. |
setup_jest | No description. |
stub_version | No description. |
synth | Returns the Terraform synthesized JSON. |
synth_hcl | Returns the Terraform synthesized JSON. |
synth_scope | No description. |
to_be_valid_terraform | No description. |
to_have_data_source | No description. |
to_have_data_source_with_properties | No description. |
to_have_provider | No description. |
to_have_provider_with_properties | No description. |
to_have_resource | No description. |
to_have_resource_with_properties | No description. |
app
import cdktf
cdktf.Testing.app(
context: typing.Mapping[typing.Any] = None,
enable_future_flags: bool = None,
fake_cdktf_json_path: bool = None,
outdir: str = None,
stack_traces: bool = None,
stub_version: bool = None
)
Returns an app for testing with the following properties: - Output directory is a temp dir.
context
Optional
- Type: typing.Mapping[typing.Any]
enable_future_flags
Optional
- Type: bool
fake_cdktf_json_path
Optional
- Type: bool
outdir
Optional
- Type: str
stack_traces
Optional
- Type: bool
stub_version
Optional
- Type: bool
enable_future_flags
import cdktf
cdktf.Testing.enable_future_flags(
app: App
)
app
Required
- Type: App
fake_cdktf_json_path
import cdktf
cdktf.Testing.fake_cdktf_json_path(
app: App
)
app
Required
- Type: App
full_synth
import cdktf
cdktf.Testing.full_synth(
stack: TerraformStack
)
stack
Required
- Type: TerraformStack
render_construct_tree
import cdktf
cdktf.Testing.render_construct_tree(
construct: IConstruct
)
construct
Required
- Type: constructs.IConstruct
setup_jest
import cdktf
cdktf.Testing.setup_jest()
stub_version
import cdktf
cdktf.Testing.stub_version(
app: App
)
app
Required
- Type: App
synth
import cdktf
cdktf.Testing.synth(
stack: TerraformStack,
run_validations: bool = None
)
Returns the Terraform synthesized JSON.
stack
Required
- Type: TerraformStack
run_validations
Optional
- Type: bool
synth_hcl
import cdktf
cdktf.Testing.synth_hcl(
stack: TerraformStack,
run_validations: bool = None,
return_metadata: bool = None
)
Returns the Terraform synthesized JSON.
stack
Required
- Type: TerraformStack
run_validations
Optional
- Type: bool
return_metadata
Optional
- Type: bool
synth_scope
import cdktf
cdktf.Testing.synth_scope(
fn: IScopeCallback
)
fn
Required
- Type: IScopeCallback
to_be_valid_terraform
import cdktf
cdktf.Testing.to_be_valid_terraform(
received: str
)
received
Required
- Type: str
to_have_data_source
import cdktf
cdktf.Testing.to_have_data_source(
received: str,
resource_type: str
)
received
Required
- Type: str
resource_type
Required
- Type: str
to_have_data_source_with_properties
import cdktf
cdktf.Testing.to_have_data_source_with_properties(
received: str,
resource_type: str,
properties: typing.Mapping[typing.Any] = None
)
received
Required
- Type: str
resource_type
Required
- Type: str
properties
Optional
- Type: typing.Mapping[typing.Any]
to_have_provider
import cdktf
cdktf.Testing.to_have_provider(
received: str,
resource_type: str
)
received
Required
- Type: str
resource_type
Required
- Type: str
to_have_provider_with_properties
import cdktf
cdktf.Testing.to_have_provider_with_properties(
received: str,
resource_type: str,
properties: typing.Mapping[typing.Any] = None
)
received
Required
- Type: str
resource_type
Required
- Type: str
properties
Optional
- Type: typing.Mapping[typing.Any]
to_have_resource
import cdktf
cdktf.Testing.to_have_resource(
received: str,
resource_type: str
)
received
Required
- Type: str
resource_type
Required
- Type: str
to_have_resource_with_properties
import cdktf
cdktf.Testing.to_have_resource_with_properties(
received: str,
resource_type: str,
properties: typing.Mapping[typing.Any] = None
)
received
Required
- Type: str
resource_type
Required
- Type: str
properties
Optional
- Type: typing.Mapping[typing.Any]
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 cdktf
cdktf.Token()
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
as_any | Return a resolvable representation of the given value. |
as_any_map | Return a reversible map representation of this token. |
as_boolean_map | Return a reversible map representation of this token. |
as_list | Return a reversible list representation of this token. |
as_map | Return a reversible map representation of this token. |
as_number | Return a reversible number representation of this token. |
as_number_list | Return a reversible list representation of this token. |
as_number_map | Return a reversible map representation of this token. |
as_string | Return a reversible string representation of this token. |
as_string_map | Return a reversible map representation of this token. |
is_unresolved | Returns true if obj represents an unresolved value. |
null_value | Return a Token containing a null value. |
as_any
import cdktf
cdktf.Token.as_any(
value: typing.Any
)
Return a resolvable representation of the given value.
value
Required
- Type: typing.Any
as_any_map
import cdktf
cdktf.Token.as_any_map(
value: typing.Any,
display_hint: str = None
)
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_boolean_map
import cdktf
cdktf.Token.as_boolean_map(
value: typing.Any,
display_hint: str = None
)
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_list
import cdktf
cdktf.Token.as_list(
value: typing.Any,
display_hint: str = None
)
Return a reversible list representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_map
import cdktf
cdktf.Token.as_map(
value: typing.Any,
map_value: typing.Any,
display_hint: str = None
)
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
map_value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_number
import cdktf
cdktf.Token.as_number(
value: typing.Any
)
Return a reversible number representation of this token.
value
Required
- Type: typing.Any
as_number_list
import cdktf
cdktf.Token.as_number_list(
value: typing.Any
)
Return a reversible list representation of this token.
value
Required
- Type: typing.Any
as_number_map
import cdktf
cdktf.Token.as_number_map(
value: typing.Any,
display_hint: str = None
)
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_string
import cdktf
cdktf.Token.as_string(
value: typing.Any,
display_hint: str = None
)
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.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
as_string_map
import cdktf
cdktf.Token.as_string_map(
value: typing.Any,
display_hint: str = None
)
Return a reversible map representation of this token.
value
Required
- Type: typing.Any
display_hint
Optional
- Type: str
- Default: no display hint
A hint for the Token's purpose when stringifying it.
is_unresolved
import cdktf
cdktf.Token.is_unresolved(
obj: typing.Any
)
Returns true if obj represents an unresolved value.
One of these must be true:
obj
is an IResolvableobj
is a string containing at least one encodedIResolvable
obj
is either an encoded number or list
This does NOT recurse into lists or objects to see if they containing resolvables.
obj
Required
- Type: typing.Any
The object to test.
null_value
import cdktf
cdktf.Token.null_value()
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 |
---|---|---|
ANY_MAP_TOKEN_VALUE | str | Any map token representation. |
NUMBER_MAP_TOKEN_VALUE | typing.Union[int, float] | Number Map token value representation. |
STRING_MAP_TOKEN_VALUE | str | String Map token value representation. |
ANY_MAP_TOKEN_VALUE
Required
ANY_MAP_TOKEN_VALUE: str
- Type: str
Any map token representation.
NUMBER_MAP_TOKEN_VALUE
Required
NUMBER_MAP_TOKEN_VALUE: typing.Union[int, float]
- Type: typing.Union[int, float]
Number Map token value representation.
STRING_MAP_TOKEN_VALUE
Required
STRING_MAP_TOKEN_VALUE: str
- Type: str
String Map token value representation.
Tokenization
Less oft-needed functions to manipulate Tokens.
Initializers
import cdktf
cdktf.Tokenization()
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
is_resolvable | 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. |
reverse_list | Un-encode a Tokenized value from a list. |
reverse_map | Un-encode a Tokenized value from a map. |
reverse_number | Un-encode a Tokenized value from a number. |
reverse_number_list | Un-encode a Tokenized value from a list. |
reverse_string | Un-encode a string potentially containing encoded tokens. |
stringify_number | Stringify a number directly or lazily if it's a Token. |
is_resolvable
import cdktf
cdktf.Tokenization.is_resolvable(
obj: typing.Any
)
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.
obj
Required
- Type: typing.Any
resolve
import cdktf
cdktf.Tokenization.resolve(
obj: typing.Any,
resolver: ITokenResolver,
scope: IConstruct,
preparing: bool = None
)
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.
obj
Required
- Type: typing.Any
The object to resolve.
resolver
Required
- Type: ITokenResolver
The resolver to apply to any resolvable tokens found.
scope
Required
- Type: constructs.IConstruct
The scope from which resolution is performed.
preparing
Optional
- Type: bool
- Default: false
Whether the resolution is being executed during the prepare phase or not.
reverse
import cdktf
cdktf.Tokenization.reverse(
x: typing.Any
)
Reverse any value into Resolvables, if possible.
x
Required
- Type: typing.Any
reverse_list
import cdktf
cdktf.Tokenization.reverse_list(
l: typing.List[str]
)
Un-encode a Tokenized value from a list.
l
Required
- Type: typing.List[str]
reverse_map
import cdktf
cdktf.Tokenization.reverse_map(
m: typing.Mapping[typing.Any]
)
Un-encode a Tokenized value from a map.
m
Required
- Type: typing.Mapping[typing.Any]
reverse_number
import cdktf
cdktf.Tokenization.reverse_number(
n: typing.Union[int, float]
)
Un-encode a Tokenized value from a number.
n
Required
- Type: typing.Union[int, float]
reverse_number_list
import cdktf
cdktf.Tokenization.reverse_number_list(
l: typing.List[typing.Union[int, float]]
)
Un-encode a Tokenized value from a list.
l
Required
- Type: typing.List[typing.Union[int, float]]
reverse_string
import cdktf
cdktf.Tokenization.reverse_string(
s: str
)
Un-encode a string potentially containing encoded tokens.
s
Required
- Type: str
stringify_number
import cdktf
cdktf.Tokenization.stringify_number(
x: typing.Union[int, float]
)
Stringify a number directly or lazily if it's a Token.
If it is an object (i.e., { Ref: 'SomeLogicalId' }), return it as-is.
x
Required
- Type: typing.Union[int, float]
TokenizedStringFragments
Fragments of a concatenated string containing stringified Tokens.
Initializers
import cdktf
cdktf.TokenizedStringFragments()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
add_escape | No description. |
add_intrinsic | Adds an intrinsic fragment. |
add_literal | Adds a literal fragment. |
add_token | Adds a token fragment. |
concat | No description. |
join | Combine the string fragments using the given joiner. |
map_tokens | Apply a transformation function to all tokens in the string. |
add_escape
def add_escape(
kind: str
) - > None
kind
Required
- Type: str
add_intrinsic
def add_intrinsic(
value: typing.Any
) - > None
Adds an intrinsic fragment.
value
Required
- Type: typing.Any
the intrinsic value to add.
add_literal
def add_literal(
lit: typing.Any
) - > None
Adds a literal fragment.
lit
Required
- Type: typing.Any
the literal to add.
add_token
def add_token(
token: IResolvable
) - > None
Adds a token fragment.
token
Required
- Type: IResolvable
the token to add.
concat
def concat(
other: TokenizedStringFragments
) - > None
other
Required
- Type: TokenizedStringFragments
join
def join(
concat: IFragmentConcatenator
) - > typing.Any
Combine the string fragments using the given joiner.
If there are any
concat
Required
- Type: IFragmentConcatenator
map_tokens
def map_tokens(
context: IResolveContext
) - > TokenizedStringFragments
Apply a transformation function to all tokens in the string.
context
Required
- Type: IResolveContext
Properties
Name | Type | Description |
---|---|---|
escapes | typing.List[IResolvable] | Return all escape fragments from this string. |
first_value | typing.Any | Returns the first value. |
intrinsic | typing.List[IResolvable] | Return all intrinsic fragments from this string. |
length | typing.Union[int, float] | Returns the number of fragments. |
literals | typing.List[IResolvable] | Return all literals from this string. |
tokens | typing.List[IResolvable] | Return all Tokens from this string. |
first_token | IResolvable | Returns the first token. |
escapes
Required
escapes: typing.List[IResolvable]
- Type: typing.List[IResolvable]
Return all escape fragments from this string.
first_value
Required
first_value: typing.Any
- Type: typing.Any
Returns the first value.
intrinsic
Required
intrinsic: typing.List[IResolvable]
- Type: typing.List[IResolvable]
Return all intrinsic fragments from this string.
length
Required
length: typing.Union[int, float]
- Type: typing.Union[int, float]
Returns the number of fragments.
literals
Required
literals: typing.List[IResolvable]
- Type: typing.List[IResolvable]
Return all literals from this string.
tokens
Required
tokens: typing.List[IResolvable]
- Type: typing.List[IResolvable]
Return all Tokens from this string.
first_token
Optional
first_token: IResolvable
- Type: IResolvable
Returns the first token.
VariableType
Initializers
import cdktf
cdktf.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 cdktf
cdktf.VariableType.list(
type: str
)
type
Required
- Type: str
map
import cdktf
cdktf.VariableType.map(
type: str
)
type
Required
- Type: str
object
import cdktf
cdktf.VariableType.object(
attributes: typing.Mapping[str]
)
attributes
Required
- Type: typing.Mapping[str]
set
import cdktf
cdktf.VariableType.set(
type: str
)
type
Required
- Type: str
tuple
import cdktf
cdktf.VariableType.tuple(
elements: *str
)
elements
Required
- Type: *str
Constants
Name | Type | Description |
---|---|---|
ANY | str | No description. |
BOOL | str | No description. |
LIST | str | No description. |
LIST_BOOL | str | No description. |
LIST_NUMBER | str | No description. |
LIST_STRING | str | No description. |
MAP | str | No description. |
MAP_BOOL | str | No description. |
MAP_NUMBER | str | No description. |
MAP_STRING | str | No description. |
NUMBER | str | No description. |
SET | str | No description. |
SET_BOOL | str | No description. |
SET_NUMBER | str | No description. |
SET_STRING | str | No description. |
STRING | str | No description. |
ANY
Required
ANY: str
- Type: str
BOOL
Required
BOOL: str
- Type: str
LIST
Required
LIST: str
- Type: str
LIST_BOOL
Required
LIST_BOOL: str
- Type: str
LIST_NUMBER
Required
LIST_NUMBER: str
- Type: str
LIST_STRING
Required
LIST_STRING: str
- Type: str
MAP
Required
MAP: str
- Type: str
MAP_BOOL
Required
MAP_BOOL: str
- Type: str
MAP_NUMBER
Required
MAP_NUMBER: str
- Type: str
MAP_STRING
Required
MAP_STRING: str
- Type: str
NUMBER
Required
NUMBER: str
- Type: str
SET
Required
SET: str
- Type: str
SET_BOOL
Required
SET_BOOL: str
- Type: str
SET_NUMBER
Required
SET_NUMBER: str
- Type: str
SET_STRING
Required
SET_STRING: str
- Type: str
STRING
Required
STRING: str
- Type: str