Terraform
Java: Classes
Annotations
Includes API for attaching annotations such as warning messages to constructs.
Methods
Name | Description |
---|---|
addError | Adds an { "error": < message > } metadata entry to this construct. |
addInfo | Adds an info metadata entry to this construct. |
addWarning | Adds a warning metadata entry to this construct. |
addError
public void addError(java.lang.String message)
Adds an { "error": < message > } metadata entry to this construct.
The toolkit will fail synthesis when errors are reported.
message
Required
- Type: java.lang.String
The error message.
addInfo
public void addInfo(java.lang.String message)
Adds an info metadata entry to this construct.
The CLI will display the info message when apps are synthesized.
message
Required
- Type: java.lang.String
The info message.
addWarning
public void addWarning(java.lang.String message)
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: java.lang.String
The warning message.
Static Functions
Name | Description |
---|---|
of | Returns the annotations API for a construct scope. |
of
import com.hashicorp.cdktf.Annotations;
Annotations.of(IConstruct scope)
Returns the annotations API for a construct scope.
scope
Required
- Type: software.constructs.IConstruct
The scope.
AnyListList
Initializers
import com.hashicorp.cdktf.AnyListList;
new AnyListList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
allWithMapKey | Creating an iterator for this complex list. |
computeFqn | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
allWithMapKey
public DynamicListTerraformIterator allWithMapKey(java.lang.String mapKeyAttributeName)
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeName
Required
- Type: java.lang.String
computeFqn
public java.lang.String computeFqn()
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public IResolvable get(java.lang.Number index)
index
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
AnyListMap
Initializers
import com.hashicorp.cdktf.AnyListMap;
new AnyListMap(IInterpolatingParent terraformResource, java.lang.String terraformAttribute);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public IResolvable get(java.lang.String key)
key
Required
- Type: java.lang.String
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
AnyMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import com.hashicorp.cdktf.AnyMap;
new AnyMap(IInterpolatingParent terraformResource, java.lang.String terraformAttribute);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
computeFqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public java.lang.String computeFqn()
lookup
public java.lang.Object lookup(java.lang.String key)
key
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
AnyMapList
Initializers
import com.hashicorp.cdktf.AnyMapList;
new AnyMapList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public AnyMap get(java.lang.Number index)
index
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
Aspects
Aspects can be applied to CDK tree scopes and can operate on the tree before synthesis.
Methods
Name | Description |
---|---|
add | Adds an aspect to apply this scope before synthesis. |
add
public void add(IAspect aspect)
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 com.hashicorp.cdktf.Aspects;
Aspects.of(IConstruct scope)
Returns the Aspects
object associated with a construct scope.
scope
Required
- Type: software.constructs.IConstruct
The scope for which these aspects will apply.
Properties
Name | Type | Description |
---|---|---|
all | java.util.List< IAspect> | The list of aspects which were directly applied on this scope. |
all
Required
public java.util.List< IAspect > getAll();
- Type: java.util.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
import com.hashicorp.cdktf.testing_matchers.AssertionReturn;
new AssertionReturn(java.lang.String message, java.lang.Boolean pass);
Name | Type | Description |
---|---|---|
message | java.lang.String | - String message containing information about the result of the assertion. |
pass | java.lang.Boolean | - Boolean pass denoting the success of the assertion. |
message
Required
- Type: java.lang.String
String message containing information about the result of the assertion.
pass
Required
- Type: java.lang.Boolean
Boolean pass denoting the success of the assertion.
Properties
Name | Type | Description |
---|---|---|
message | java.lang.String | - String message containing information about the result of the assertion. |
pass | java.lang.Boolean | - Boolean pass denoting the success of the assertion. |
message
Required
public java.lang.String getMessage();
- Type: java.lang.String
String message containing information about the result of the assertion.
pass
Required
public java.lang.Boolean getPass();
- Type: java.lang.Boolean
Boolean pass denoting the success of the assertion.
BooleanList
Initializers
import com.hashicorp.cdktf.BooleanList;
new BooleanList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
allWithMapKey | Creating an iterator for this complex list. |
computeFqn | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
allWithMapKey
public DynamicListTerraformIterator allWithMapKey(java.lang.String mapKeyAttributeName)
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeName
Required
- Type: java.lang.String
computeFqn
public java.lang.String computeFqn()
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public IResolvable get(java.lang.Number index)
index
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
BooleanListList
Initializers
import com.hashicorp.cdktf.BooleanListList;
new BooleanListList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
allWithMapKey | Creating an iterator for this complex list. |
computeFqn | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
allWithMapKey
public DynamicListTerraformIterator allWithMapKey(java.lang.String mapKeyAttributeName)
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeName
Required
- Type: java.lang.String
computeFqn
public java.lang.String computeFqn()
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public IResolvable get(java.lang.Number index)
index
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
BooleanListMap
Initializers
import com.hashicorp.cdktf.BooleanListMap;
new BooleanListMap(IInterpolatingParent terraformResource, java.lang.String terraformAttribute);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public IResolvable get(java.lang.String key)
key
Required
- Type: java.lang.String
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
BooleanMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import com.hashicorp.cdktf.BooleanMap;
new BooleanMap(IInterpolatingParent terraformResource, java.lang.String terraformAttribute);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
computeFqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public java.lang.String computeFqn()
lookup
public IResolvable lookup(java.lang.String key)
key
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
BooleanMapList
Initializers
import com.hashicorp.cdktf.BooleanMapList;
new BooleanMapList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public BooleanMap get(java.lang.Number index)
index
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
CloudWorkspace
A cloud workspace can either be a single named workspace, or a list of tagged workspaces.
Initializers
import com.hashicorp.cdktf.CloudWorkspace;
new CloudWorkspace();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
toTerraform | No description. |
toTerraform
public java.lang.Object toTerraform()
ComplexComputedList
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import com.hashicorp.cdktf.ComplexComputedList;
new ComplexComputedList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.String complexComputedListIndex);,new ComplexComputedList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.String complexComputedListIndex, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
complexComputedListIndex | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
complexComputedListIndex
Required
- Type: java.lang.String
wrapsSet
Optional
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
computeFqn | No description. |
getAnyMapAttribute | No description. |
getBooleanAttribute | No description. |
getBooleanMapAttribute | No description. |
getListAttribute | No description. |
getNumberAttribute | No description. |
getNumberListAttribute | No description. |
getNumberMapAttribute | No description. |
getStringAttribute | No description. |
getStringMapAttribute | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
computeFqn
public java.lang.String computeFqn()
getAnyMapAttribute
getAnyMapAttribute
public java.util.Map< java.lang.String, java.lang.Object > getAnyMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanAttribute
getBooleanAttribute
public IResolvable getBooleanAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanMapAttribute
getBooleanMapAttribute
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getListAttribute
getListAttribute
public java.util.List< java.lang.String > getListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberAttribute
getNumberAttribute
public java.lang.Number getNumberAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberListAttribute
getNumberListAttribute
public java.util.List< java.lang.Number > getNumberListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberMapAttribute
getNumberMapAttribute
public java.util.Map< java.lang.String, java.lang.Number > getNumberMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringAttribute
getStringAttribute
public java.lang.String getStringAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringMapAttribute
getStringMapAttribute
public java.util.Map< java.lang.String, java.lang.String > getStringMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
interpolationForAttribute
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
creationStack
- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
fqn
- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
public java.lang.String getFqn();
- Type: java.lang.String
ComplexList
- Implements: ITerraformAddressable, IResolvable
Initializers
import com.hashicorp.cdktf.ComplexList;
new ComplexList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
allWithMapKey | Creating an iterator for this complex list. |
computeFqn | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
allWithMapKey
public DynamicListTerraformIterator allWithMapKey(java.lang.String mapKeyAttributeName)
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeName
Required
- Type: java.lang.String
computeFqn
public java.lang.String computeFqn()
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
ComplexMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import com.hashicorp.cdktf.ComplexMap;
new ComplexMap(IInterpolatingParent terraformResource, java.lang.String terraformAttribute);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
ComplexObject
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
import com.hashicorp.cdktf.ComplexObject;
new ComplexObject(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean complexObjectIsFromSet);,new ComplexObject(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean complexObjectIsFromSet, java.lang.String OR java.lang.Number complexObjectIndex);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
complexObjectIsFromSet | java.lang.Boolean | set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items. |
complexObjectIndex | java.lang.String OR java.lang.Number | the index of the complex object in a list. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
complexObjectIsFromSet
Required
- Type: java.lang.Boolean
set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items.
complexObjectIndex
Optional
- Type: java.lang.String OR java.lang.Number
the index of the complex object in a list.
Methods
Name | Description |
---|---|
computeFqn | No description. |
getAnyMapAttribute | No description. |
getBooleanAttribute | No description. |
getBooleanMapAttribute | No description. |
getListAttribute | No description. |
getNumberAttribute | No description. |
getNumberListAttribute | No description. |
getNumberMapAttribute | No description. |
getStringAttribute | No description. |
getStringMapAttribute | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public java.lang.String computeFqn()
getAnyMapAttribute
public java.util.Map< java.lang.String, java.lang.Object > getAnyMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanAttribute
public IResolvable getBooleanAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getBooleanMapAttribute
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getListAttribute
public java.util.List< java.lang.String > getListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberAttribute
public java.lang.Number getNumberAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberListAttribute
public java.util.List< java.lang.Number > getNumberListAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getNumberMapAttribute
public java.util.Map< java.lang.String, java.lang.Number > getNumberMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringAttribute
public java.lang.String getStringAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
getStringMapAttribute
public java.util.Map< java.lang.String, java.lang.String > getStringMapAttribute(java.lang.String terraformAttribute)
terraformAttribute
Required
- Type: java.lang.String
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
DefaultTokenResolver
- Implements: ITokenResolver
Default resolver implementation.
Initializers
import com.hashicorp.cdktf.DefaultTokenResolver;
new DefaultTokenResolver(IFragmentConcatenator concat);
Name | Type | Description |
---|---|---|
concat | IFragmentConcatenator | No description. |
concat
Required
- Type: IFragmentConcatenator
Methods
Name | Description |
---|---|
resolveList | Resolves a list of string. |
resolveMap | Resolves a map token. |
resolveNumberList | Resolves a list of numbers. |
resolveString | Resolve string fragments to Tokens. |
resolveToken | Default Token resolution. |
resolveList
public java.lang.Object resolveList(java.util.List< java.lang.String > xs, IResolveContext context)
Resolves a list of string.
xs
Required
- Type: java.util.List< java.lang.String >
context
Required
- Type: IResolveContext
resolveMap
public java.lang.Object resolveMap(java.util.Map< java.lang.String, java.lang.Object > xs, IResolveContext context)
Resolves a map token.
xs
Required
- Type: java.util.Map< java.lang.String, java.lang.Object >
context
Required
- Type: IResolveContext
resolveNumberList
public java.lang.Object resolveNumberList(java.util.List< java.lang.Number > xs, IResolveContext context)
Resolves a list of numbers.
xs
Required
- Type: java.util.List< java.lang.Number >
context
Required
- Type: IResolveContext
resolveString
public java.lang.Object resolveString(TokenizedStringFragments fragments, IResolveContext context)
Resolve string fragments to Tokens.
fragments
Required
- Type: TokenizedStringFragments
context
Required
- Type: IResolveContext
resolveToken
public java.lang.Object resolveToken(IResolvable t, IResolveContext context, IPostProcessor postProcessor)
Default Token resolution.
Resolve the Token, recurse into whatever it returns, then finally post-process it.
t
Required
- Type: IResolvable
context
Required
- Type: IResolveContext
postProcessor
Required
- Type: IPostProcessor
DynamicListTerraformIterator
Initializers
import com.hashicorp.cdktf.DynamicListTerraformIterator;
new DynamicListTerraformIterator(java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable > list, java.lang.String mapKeyAttributeName);
Name | Type | Description |
---|---|---|
list | java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable> | No description. |
mapKeyAttributeName | java.lang.String | No description. |
list
Required
- Type: java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable>
mapKeyAttributeName
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
forExpressionForList | Creates a for expression that results in a list. |
forExpressionForMap | Creates a for expression that results in a map. |
getAny | No description. |
getAnyMap | No description. |
getBoolean | No description. |
getBooleanMap | No description. |
getList | No description. |
getMap | No description. |
getNumber | No description. |
getNumberList | No description. |
getNumberMap | No description. |
getString | No description. |
getStringMap | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
public IResolvable dynamic(java.util.Map< java.lang.String, java.lang.Object > attributes)
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: java.util.Map< java.lang.String, java.lang.Object >
forExpressionForList
public IResolvable forExpressionForList(java.lang.String OR IResolvable expression)
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: java.lang.String OR IResolvable
The expression to use in the for mapping.
forExpressionForMap
public IResolvable forExpressionForMap(java.lang.String OR IResolvable keyExpression, java.lang.String OR IResolvable valueExpression)
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
.
keyExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as key in the for mapping.
valueExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as value in the for mapping.
getAny
public IResolvable getAny(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getAnyMap
public java.util.Map< java.lang.String, java.lang.Object > getAnyMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBoolean
public IResolvable getBoolean(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBooleanMap
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getList
public java.util.List< java.lang.String > getList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getMap
public java.util.Map< java.lang.String, java.lang.Object > getMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumber
public java.lang.Number getNumber(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberList
public java.util.List< java.lang.Number > getNumberList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberMap
public java.util.Map< java.lang.String, java.lang.Number > getNumberMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getString
public java.lang.String getString(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getStringMap
public java.util.Map< java.lang.String, java.lang.String > getStringMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
keys
public IResolvable keys()
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluckProperty
public IResolvable pluckProperty(java.lang.String property)
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: java.lang.String
The property of the iterators values to map to.
values
public IResolvable values()
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
fromComplexList | Creates a new iterator from a complex list. |
fromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
fromList | Creates a new iterator from a list. |
fromMap | Creates a new iterator from a map. |
fromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
fromComplexList
import com.hashicorp.cdktf.DynamicListTerraformIterator;
DynamicListTerraformIterator.fromComplexList(IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList list, java.lang.String mapKeyAttributeName)
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.
Object cert = AcmCertificate.Builder.create(this, "cert")
.domainName("example.com")
.validationMethod("DNS")
.build();
Object dvoIterator = TerraformIterator.fromComplexList(cert.getDomainValidationOptions(), "domain_name");
Route53Record.Builder.create(this, "record")
.allowOverwrite(true)
.name(dvoIterator.getString("name"))
.records(List.of(dvoIterator.getString("record")))
.ttl(60)
.type(dvoIterator.getString("type"))
.zoneId(Token.asString(dataAwsRoute53ZoneExample.getZoneId()))
.forEach(dvoIterator)
.build();
list
Required
- Type: IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList
the list to iterate over.
mapKeyAttributeName
Required
- Type: java.lang.String
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
fromDataSources
import com.hashicorp.cdktf.DynamicListTerraformIterator;
DynamicListTerraformIterator.fromDataSources(ITerraformResource resource)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
fromList
import com.hashicorp.cdktf.DynamicListTerraformIterator;
DynamicListTerraformIterator.fromList(java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable > list)
Creates a new iterator from a list.
list
Required
- Type: java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable>
fromMap
import com.hashicorp.cdktf.DynamicListTerraformIterator;
DynamicListTerraformIterator.fromMap(ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean > map)
Creates a new iterator from a map.
map
Required
- Type: ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean >
fromResources
import com.hashicorp.cdktf.DynamicListTerraformIterator;
DynamicListTerraformIterator.fromResources(ITerraformResource resource)
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 | java.lang.String | Returns the key of the current entry in the map that is being iterated over. |
value | java.lang.Object | Returns the value of the current item iterated over. |
key
Required
public java.lang.String getKey();
- Type: java.lang.String
Returns the key of the current entry in the map that is being iterated over.
value
Required
public java.lang.Object getValue();
- Type: java.lang.Object
Returns the value of the current item iterated over.
Fn
Initializers
import com.hashicorp.cdktf.Fn;
new Fn();
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
abs | {@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it. |
abspath | {@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory. |
alltrue | {@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true if all elements in a given collection are true or "true" . It also returns true if the collection is empty. |
anytrue | {@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true if any element in a given collection is true or "true" . It also returns false if the collection is empty. |
base64decode | {@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string. |
base64encode | {@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string. |
base64gzip | {@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding. |
base64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test")) since sha256() returns hexadecimal representation. |
base64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test")) since sha512() returns hexadecimal representation. |
basename | {@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it. |
can | {@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors. |
ceil | {@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction. |
chomp | {@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string. |
chunklist | {@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists. |
cidrhost | {@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix. |
cidrnetmask | {@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address. |
cidrsubnet | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix. |
cidrsubnets | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix. |
coalesce | {@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string. |
coalescelist | {@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty. |
compact | {@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed. |
concat | {@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list. |
contains | {@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements. |
csvdecode | {@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data. |
dirname | {@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it. |
distinct | {@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed. |
element | {@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list. |
endswith | {@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix. |
file | {@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string. |
filebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string. |
filebase64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string. |
filebase64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string. |
fileexists | {@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path. |
filemd5 | {@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string. |
fileset | {@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/ ) as the path separator for cross-system compatibility. |
filesha1 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string. |
filesha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string. |
filesha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string. |
flatten | {@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents. |
floor | {@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction. |
format | The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf function in C, and other similar functions in other programming languages. |
formatdate | {@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format. |
formatlist | {@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string. |
indent | {@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string. |
index | {@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list. |
jsondecode | {@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string. |
jsonencode | {@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax. |
keys | {@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map. |
lengthOf | {@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string. |
log | {@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base. |
lower | {@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase. |
matchkeys | {@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list. |
max | {@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set. |
md5 | {@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits. |
merge | {@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments. |
min | {@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set. |
nonsensitive | {@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value. |
one | {@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one returns null . Otherwise, one returns the first element. If there are two or more elements then one will return an error. |
parseint | {@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive. |
pathexpand | {@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~ segment, and if so it replaces that segment with the current user's home directory path. |
plantimestamp | {@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan. |
pow | {@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument. |
regex | {@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings. |
regexall | {@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches. |
replace | {@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string. |
reverse | {@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order. |
rsadecrypt | {@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext. |
sensitive | {@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables. |
setintersection | The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets. |
setproduct | The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product. |
setsubtract | The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set. |
setunion | The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets. |
sha1 | {@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits. |
sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits. |
sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits. |
signum | {@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign. |
slice | {@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list. |
sort | {@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically. |
split | {@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator. |
startswith | {@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix. |
strcontains | {@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it. |
strrev | {@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected). |
substr | {@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length. |
sum | {@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers. |
templatefile | {@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables. |
textdecodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. |
textencodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters. |
timeadd | {@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp. |
timecmp | {@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent. |
timestamp | {@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format. |
title | {@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase. |
tobool | {@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value. |
tolist | {@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value. |
tomap | {@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value. |
tonumber | {@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value. |
toset | {@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value. |
tostring | {@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value. |
transpose | {@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings. |
trim | {@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string. |
trimprefix | {@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged. |
trimspace | {@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string. |
trimsuffix | {@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string. |
try | {@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors. |
upper | {@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase. |
urlencode | {@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string. |
uuid | {@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string. |
uuidv5 | {@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID. |
values | {@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map. |
yamldecode | {@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value. |
yamlencode | {@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax. |
zipmap | {@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values. |
bcrypt | {@link /terraform/docs/language/functions/bcrypt.html bcrypt} computes a hash of the given string using the Blowfish cipher, returning a string in the Modular Crypt Format usually expected in the shadow password file on many Unix systems. |
conditional | {@link https://developer.hashicorp.com/terraform/language/expressions/conditionals} A conditional expression uses the value of a boolean expression to select one of two values. |
join | {@link /terraform/docs/language/functions/join.html join} produces a string by concatenating together all elements of a given list of strings with the given delimiter. |
lookup | {@link /terraform/docs/language/functions/lookup.html lookup} retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead. |
lookupNested | returns a property access expression that accesses the property at the given path in the given inputMap. |
range | {@link /terraform/docs/language/functions/range.html range} generates a list of numbers using a start value, a limit value, and a step value. |
rawString | Use this function to wrap a string and escape it properly for the use in Terraform This is only needed in certain scenarios (e.g., if you have unescaped double quotes in the string). |
abs
import com.hashicorp.cdktf.Fn;
Fn.abs(java.lang.Number num)
{@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: java.lang.Number
abspath
import com.hashicorp.cdktf.Fn;
Fn.abspath(java.lang.String path)
{@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: java.lang.String
alltrue
import com.hashicorp.cdktf.Fn;
Fn.alltrue(java.util.List< java.lang.Object > list)
{@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: java.util.List< java.lang.Object >
anytrue
import com.hashicorp.cdktf.Fn;
Fn.anytrue(java.util.List< java.lang.Object > list)
{@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: java.util.List< java.lang.Object >
base64decode
import com.hashicorp.cdktf.Fn;
Fn.base64decode(java.lang.String 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: java.lang.String
base64encode
import com.hashicorp.cdktf.Fn;
Fn.base64encode(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
str
Required
- Type: java.lang.String
base64gzip
import com.hashicorp.cdktf.Fn;
Fn.base64gzip(java.lang.String 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: java.lang.String
base64sha256
import com.hashicorp.cdktf.Fn;
Fn.base64sha256(java.lang.String 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: java.lang.String
base64sha512
import com.hashicorp.cdktf.Fn;
Fn.base64sha512(java.lang.String 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: java.lang.String
basename
import com.hashicorp.cdktf.Fn;
Fn.basename(java.lang.String path)
{@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: java.lang.String
can
import com.hashicorp.cdktf.Fn;
Fn.can(java.lang.Object expression)
{@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: java.lang.Object
ceil
import com.hashicorp.cdktf.Fn;
Fn.ceil(java.lang.Number num)
{@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: java.lang.Number
chomp
import com.hashicorp.cdktf.Fn;
Fn.chomp(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
str
Required
- Type: java.lang.String
chunklist
import com.hashicorp.cdktf.Fn;
Fn.chunklist(java.util.List< java.lang.Object > list, java.lang.Number size)
{@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: java.util.List< java.lang.Object >
size
Required
- Type: java.lang.Number
cidrhost
import com.hashicorp.cdktf.Fn;
Fn.cidrhost(java.lang.String prefix, java.lang.Number hostnum)
{@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: java.lang.String
hostnum
Required
- Type: java.lang.Number
cidrnetmask
import com.hashicorp.cdktf.Fn;
Fn.cidrnetmask(java.lang.String prefix)
{@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: java.lang.String
cidrsubnet
import com.hashicorp.cdktf.Fn;
Fn.cidrsubnet(java.lang.String prefix, java.lang.Number newbits, java.lang.Number netnum)
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
prefix
Required
- Type: java.lang.String
newbits
Required
- Type: java.lang.Number
netnum
Required
- Type: java.lang.Number
cidrsubnets
import com.hashicorp.cdktf.Fn;
Fn.cidrsubnets(java.lang.String prefix, java.util.List< java.lang.Number > newbits)
{@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: java.lang.String
newbits
Required
- Type: java.util.List< java.lang.Number >
coalesce
import com.hashicorp.cdktf.Fn;
Fn.coalesce(java.util.List< java.lang.Object > vals)
{@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: java.util.List< java.lang.Object >
coalescelist
import com.hashicorp.cdktf.Fn;
Fn.coalescelist(java.util.List< java.lang.Object > vals)
{@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: java.util.List< java.lang.Object >
compact
import com.hashicorp.cdktf.Fn;
Fn.compact(java.util.List< java.lang.String > list)
{@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: java.util.List< java.lang.String >
concat
import com.hashicorp.cdktf.Fn;
Fn.concat(java.util.List< java.lang.Object > seqs)
{@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: java.util.List< java.lang.Object >
contains
import com.hashicorp.cdktf.Fn;
Fn.contains(java.lang.Object list, java.lang.Object value)
{@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: java.lang.Object
value
Required
- Type: java.lang.Object
csvdecode
import com.hashicorp.cdktf.Fn;
Fn.csvdecode(java.lang.String 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: java.lang.String
dirname
import com.hashicorp.cdktf.Fn;
Fn.dirname(java.lang.String path)
{@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: java.lang.String
distinct
import com.hashicorp.cdktf.Fn;
Fn.distinct(java.util.List< java.lang.Object > list)
{@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: java.util.List< java.lang.Object >
element
import com.hashicorp.cdktf.Fn;
Fn.element(java.lang.Object list, java.lang.Number index)
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
list
Required
- Type: java.lang.Object
index
Required
- Type: java.lang.Number
endswith
import com.hashicorp.cdktf.Fn;
Fn.endswith(java.lang.String str, java.lang.String suffix)
{@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: java.lang.String
suffix
Required
- Type: java.lang.String
file
import com.hashicorp.cdktf.Fn;
Fn.file(java.lang.String path)
{@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: java.lang.String
filebase64
import com.hashicorp.cdktf.Fn;
Fn.filebase64(java.lang.String path)
{@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: java.lang.String
filebase64sha256
import com.hashicorp.cdktf.Fn;
Fn.filebase64sha256(java.lang.String path)
{@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: java.lang.String
filebase64sha512
import com.hashicorp.cdktf.Fn;
Fn.filebase64sha512(java.lang.String path)
{@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: java.lang.String
fileexists
import com.hashicorp.cdktf.Fn;
Fn.fileexists(java.lang.String path)
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
path
Required
- Type: java.lang.String
filemd5
import com.hashicorp.cdktf.Fn;
Fn.filemd5(java.lang.String path)
{@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: java.lang.String
fileset
import com.hashicorp.cdktf.Fn;
Fn.fileset(java.lang.String path, java.lang.String pattern)
{@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: java.lang.String
pattern
Required
- Type: java.lang.String
filesha1
import com.hashicorp.cdktf.Fn;
Fn.filesha1(java.lang.String path)
{@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: java.lang.String
filesha256
import com.hashicorp.cdktf.Fn;
Fn.filesha256(java.lang.String path)
{@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: java.lang.String
filesha512
import com.hashicorp.cdktf.Fn;
Fn.filesha512(java.lang.String path)
{@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: java.lang.String
flatten
import com.hashicorp.cdktf.Fn;
Fn.flatten(java.lang.Object list)
{@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: java.lang.Object
floor
import com.hashicorp.cdktf.Fn;
Fn.floor(java.lang.Number num)
{@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: java.lang.Number
format
import com.hashicorp.cdktf.Fn;
Fn.format(java.lang.String format, java.util.List< java.lang.Object > args)
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: java.lang.String
args
Required
- Type: java.util.List< java.lang.Object >
formatdate
import com.hashicorp.cdktf.Fn;
Fn.formatdate(java.lang.String format, java.lang.String time)
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
format
Required
- Type: java.lang.String
time
Required
- Type: java.lang.String
formatlist
import com.hashicorp.cdktf.Fn;
Fn.formatlist(java.lang.String format, java.util.List< java.lang.Object > args)
{@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: java.lang.String
args
Required
- Type: java.util.List< java.lang.Object >
indent
import com.hashicorp.cdktf.Fn;
Fn.indent(java.lang.Number spaces, java.lang.String 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: java.lang.Number
str
Required
- Type: java.lang.String
index
import com.hashicorp.cdktf.Fn;
Fn.index(java.lang.Object list, java.lang.Object value)
{@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list.
list
Required
- Type: java.lang.Object
value
Required
- Type: java.lang.Object
jsondecode
import com.hashicorp.cdktf.Fn;
Fn.jsondecode(java.lang.String 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: java.lang.String
jsonencode
import com.hashicorp.cdktf.Fn;
Fn.jsonencode(java.lang.Object val)
{@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax.
val
Required
- Type: java.lang.Object
keys
import com.hashicorp.cdktf.Fn;
Fn.keys(java.lang.Object inputMap)
{@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map.
inputMap
Required
- Type: java.lang.Object
lengthOf
import com.hashicorp.cdktf.Fn;
Fn.lengthOf(java.lang.Object value)
{@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string.
value
Required
- Type: java.lang.Object
log
import com.hashicorp.cdktf.Fn;
Fn.log(java.lang.Number num, java.lang.Number base)
{@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base.
num
Required
- Type: java.lang.Number
base
Required
- Type: java.lang.Number
lower
import com.hashicorp.cdktf.Fn;
Fn.lower(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase.
str
Required
- Type: java.lang.String
matchkeys
import com.hashicorp.cdktf.Fn;
Fn.matchkeys(java.util.List< java.lang.Object > values, java.util.List< java.lang.Object > keys, java.util.List< java.lang.Object > searchset)
{@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: java.util.List< java.lang.Object >
keys
Required
- Type: java.util.List< java.lang.Object >
searchset
Required
- Type: java.util.List< java.lang.Object >
max
import com.hashicorp.cdktf.Fn;
Fn.max(java.util.List< java.lang.Number > numbers)
{@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: java.util.List< java.lang.Number >
md5
import com.hashicorp.cdktf.Fn;
Fn.md5(java.lang.String 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: java.lang.String
merge
import com.hashicorp.cdktf.Fn;
Fn.merge(java.util.List< java.lang.Object > maps)
{@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: java.util.List< java.lang.Object >
min
import com.hashicorp.cdktf.Fn;
Fn.min(java.util.List< java.lang.Number > numbers)
{@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: java.util.List< java.lang.Number >
nonsensitive
import com.hashicorp.cdktf.Fn;
Fn.nonsensitive(java.lang.Object value)
{@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: java.lang.Object
one
import com.hashicorp.cdktf.Fn;
Fn.one(java.lang.Object list)
{@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: java.lang.Object
parseint
import com.hashicorp.cdktf.Fn;
Fn.parseint(java.lang.Object number, java.lang.Number base)
{@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: java.lang.Object
base
Required
- Type: java.lang.Number
pathexpand
import com.hashicorp.cdktf.Fn;
Fn.pathexpand(java.lang.String path)
{@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: java.lang.String
plantimestamp
import com.hashicorp.cdktf.Fn;
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 com.hashicorp.cdktf.Fn;
Fn.pow(java.lang.Number num, java.lang.Number power)
{@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: java.lang.Number
power
Required
- Type: java.lang.Number
regex
import com.hashicorp.cdktf.Fn;
Fn.regex(java.lang.String pattern, java.lang.String 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: java.lang.String
str
Required
- Type: java.lang.String
regexall
import com.hashicorp.cdktf.Fn;
Fn.regexall(java.lang.String pattern, java.lang.String 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: java.lang.String
str
Required
- Type: java.lang.String
replace
import com.hashicorp.cdktf.Fn;
Fn.replace(java.lang.String str, java.lang.String substr, java.lang.String 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.
str
Required
- Type: java.lang.String
substr
Required
- Type: java.lang.String
replace
Required
- Type: java.lang.String
reverse
import com.hashicorp.cdktf.Fn;
Fn.reverse(java.lang.Object list)
{@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: java.lang.Object
rsadecrypt
import com.hashicorp.cdktf.Fn;
Fn.rsadecrypt(java.lang.String ciphertext, java.lang.String privatekey)
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertext
Required
- Type: java.lang.String
privatekey
Required
- Type: java.lang.String
sensitive
import com.hashicorp.cdktf.Fn;
Fn.sensitive(java.lang.Object value)
{@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: java.lang.Object
setintersection
import com.hashicorp.cdktf.Fn;
Fn.setintersection(java.util.List< java.lang.Object > first_set, java.util.List< java.util.List< java.lang.Object >> other_sets)
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: java.util.List< java.lang.Object >
other_sets
Required
- Type: java.util.List< java.util.List< java.lang.Object >>
setproduct
import com.hashicorp.cdktf.Fn;
Fn.setproduct(java.util.List< java.lang.Object > sets)
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: java.util.List< java.lang.Object >
setsubtract
import com.hashicorp.cdktf.Fn;
Fn.setsubtract(java.util.List< java.lang.Object > a, java.util.List< java.lang.Object > b)
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: java.util.List< java.lang.Object >
b
Required
- Type: java.util.List< java.lang.Object >
setunion
import com.hashicorp.cdktf.Fn;
Fn.setunion(java.util.List< java.lang.Object > first_set, java.util.List< java.util.List< java.lang.Object >> other_sets)
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: java.util.List< java.lang.Object >
other_sets
Required
- Type: java.util.List< java.util.List< java.lang.Object >>
sha1
import com.hashicorp.cdktf.Fn;
Fn.sha1(java.lang.String 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: java.lang.String
sha256
import com.hashicorp.cdktf.Fn;
Fn.sha256(java.lang.String 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: java.lang.String
sha512
import com.hashicorp.cdktf.Fn;
Fn.sha512(java.lang.String 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: java.lang.String
signum
import com.hashicorp.cdktf.Fn;
Fn.signum(java.lang.Number num)
{@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: java.lang.Number
slice
import com.hashicorp.cdktf.Fn;
Fn.slice(java.lang.Object list, java.lang.Number start_index, java.lang.Number end_index)
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
list
Required
- Type: java.lang.Object
start_index
Required
- Type: java.lang.Number
end_index
Required
- Type: java.lang.Number
sort
import com.hashicorp.cdktf.Fn;
Fn.sort(java.util.List< java.lang.String > list)
{@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: java.util.List< java.lang.String >
split
import com.hashicorp.cdktf.Fn;
Fn.split(java.lang.String separator, java.lang.String 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: java.lang.String
str
Required
- Type: java.lang.String
startswith
import com.hashicorp.cdktf.Fn;
Fn.startswith(java.lang.String str, java.lang.String prefix)
{@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: java.lang.String
prefix
Required
- Type: java.lang.String
strcontains
import com.hashicorp.cdktf.Fn;
Fn.strcontains(java.lang.String str, java.lang.String substr)
{@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: java.lang.String
substr
Required
- Type: java.lang.String
strrev
import com.hashicorp.cdktf.Fn;
Fn.strrev(java.lang.String 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: java.lang.String
substr
import com.hashicorp.cdktf.Fn;
Fn.substr(java.lang.String str, java.lang.Number offset, java.lang.Number length)
{@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: java.lang.String
offset
Required
- Type: java.lang.Number
length
Required
- Type: java.lang.Number
sum
import com.hashicorp.cdktf.Fn;
Fn.sum(java.lang.Object list)
{@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: java.lang.Object
templatefile
import com.hashicorp.cdktf.Fn;
Fn.templatefile(java.lang.String path, java.lang.Object vars)
{@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: java.lang.String
vars
Required
- Type: java.lang.Object
textdecodebase64
import com.hashicorp.cdktf.Fn;
Fn.textdecodebase64(java.lang.String source, java.lang.String encoding)
{@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: java.lang.String
encoding
Required
- Type: java.lang.String
textencodebase64
import com.hashicorp.cdktf.Fn;
Fn.textencodebase64(java.lang.String str, java.lang.String encoding)
{@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: java.lang.String
encoding
Required
- Type: java.lang.String
timeadd
import com.hashicorp.cdktf.Fn;
Fn.timeadd(java.lang.String timestamp, java.lang.String duration)
{@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp.
timestamp
Required
- Type: java.lang.String
duration
Required
- Type: java.lang.String
timecmp
import com.hashicorp.cdktf.Fn;
Fn.timecmp(java.lang.String timestamp_a, java.lang.String timestamp_b)
{@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: java.lang.String
timestamp_b
Required
- Type: java.lang.String
timestamp
import com.hashicorp.cdktf.Fn;
Fn.timestamp()
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
title
import com.hashicorp.cdktf.Fn;
Fn.title(java.lang.String 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: java.lang.String
tobool
import com.hashicorp.cdktf.Fn;
Fn.tobool(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
v
Required
- Type: java.lang.Object
tolist
import com.hashicorp.cdktf.Fn;
Fn.tolist(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
v
Required
- Type: java.lang.Object
tomap
import com.hashicorp.cdktf.Fn;
Fn.tomap(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
v
Required
- Type: java.lang.Object
tonumber
import com.hashicorp.cdktf.Fn;
Fn.tonumber(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
v
Required
- Type: java.lang.Object
toset
import com.hashicorp.cdktf.Fn;
Fn.toset(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
v
Required
- Type: java.lang.Object
tostring
import com.hashicorp.cdktf.Fn;
Fn.tostring(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
v
Required
- Type: java.lang.Object
transpose
import com.hashicorp.cdktf.Fn;
Fn.transpose(java.lang.Object values)
{@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: java.lang.Object
trim
import com.hashicorp.cdktf.Fn;
Fn.trim(java.lang.String str, java.lang.String cutset)
{@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: java.lang.String
cutset
Required
- Type: java.lang.String
trimprefix
import com.hashicorp.cdktf.Fn;
Fn.trimprefix(java.lang.String str, java.lang.String prefix)
{@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: java.lang.String
prefix
Required
- Type: java.lang.String
trimspace
import com.hashicorp.cdktf.Fn;
Fn.trimspace(java.lang.String 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: java.lang.String
trimsuffix
import com.hashicorp.cdktf.Fn;
Fn.trimsuffix(java.lang.String str, java.lang.String suffix)
{@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string.
str
Required
- Type: java.lang.String
suffix
Required
- Type: java.lang.String
try
import com.hashicorp.cdktf.Fn;
Fn.try(java.util.List< java.lang.Object > expressions)
{@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: java.util.List< java.lang.Object >
upper
import com.hashicorp.cdktf.Fn;
Fn.upper(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase.
str
Required
- Type: java.lang.String
urlencode
import com.hashicorp.cdktf.Fn;
Fn.urlencode(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
str
Required
- Type: java.lang.String
uuid
import com.hashicorp.cdktf.Fn;
Fn.uuid()
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
uuidv5
import com.hashicorp.cdktf.Fn;
Fn.uuidv5(java.lang.String namespace, java.lang.String name)
{@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: java.lang.String
name
Required
- Type: java.lang.String
values
import com.hashicorp.cdktf.Fn;
Fn.values(java.lang.Object mapping)
{@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: java.lang.Object
yamldecode
import com.hashicorp.cdktf.Fn;
Fn.yamldecode(java.lang.String src)
{@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: java.lang.String
yamlencode
import com.hashicorp.cdktf.Fn;
Fn.yamlencode(java.lang.Object value)
{@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: java.lang.Object
zipmap
import com.hashicorp.cdktf.Fn;
Fn.zipmap(java.util.List< java.lang.String > keys, java.lang.Object values)
{@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: java.util.List< java.lang.String >
values
Required
- Type: java.lang.Object
bcrypt
import com.hashicorp.cdktf.Fn;
Fn.bcrypt(java.lang.String str),Fn.bcrypt(java.lang.String str, java.lang.Number cost)
{@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: java.lang.String
cost
Optional
- Type: java.lang.Number
conditional
import com.hashicorp.cdktf.Fn;
Fn.conditional(java.lang.Object condition, java.lang.Object trueValue, java.lang.Object falseValue)
{@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: java.lang.Object
trueValue
Required
- Type: java.lang.Object
falseValue
Required
- Type: java.lang.Object
join
import com.hashicorp.cdktf.Fn;
Fn.join(java.lang.String separator, java.util.List< java.lang.String > list)
{@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: java.lang.String
list
Required
- Type: java.util.List< java.lang.String >
lookup
import com.hashicorp.cdktf.Fn;
Fn.lookup(java.lang.Object inputMap, java.lang.String key),Fn.lookup(java.lang.Object inputMap, java.lang.String key, java.lang.Object defaultValue)
{@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.
inputMap
Required
- Type: java.lang.Object
key
Required
- Type: java.lang.String
defaultValue
Optional
- Type: java.lang.Object
lookupNested
import com.hashicorp.cdktf.Fn;
Fn.lookupNested(java.lang.Object inputMap, java.util.List< java.lang.Object > path)
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"]
inputMap
Required
- Type: java.lang.Object
path
Required
- Type: java.util.List< java.lang.Object >
range
import com.hashicorp.cdktf.Fn;
Fn.range(java.lang.Number start, java.lang.Number limit),Fn.range(java.lang.Number start, java.lang.Number limit, java.lang.Number step)
{@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: java.lang.Number
limit
Required
- Type: java.lang.Number
step
Optional
- Type: java.lang.Number
rawString
import com.hashicorp.cdktf.Fn;
Fn.rawString(java.lang.String 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: java.lang.String
FnGenerated
Initializers
import com.hashicorp.cdktf.FnGenerated;
new FnGenerated();
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
abs | {@link https://developer.hashicorp.com/terraform/language/functions/abs abs} returns the absolute value of the given number. In other words, if the number is zero or positive then it is returned as-is, but if it is negative then it is multiplied by -1 to make it positive before returning it. |
abspath | {@link https://developer.hashicorp.com/terraform/language/functions/abspath abspath} takes a string containing a filesystem path and converts it to an absolute path. That is, if the path is not absolute, it will be joined with the current working directory. |
alltrue | {@link https://developer.hashicorp.com/terraform/language/functions/alltrue alltrue} returns true if all elements in a given collection are true or "true" . It also returns true if the collection is empty. |
anytrue | {@link https://developer.hashicorp.com/terraform/language/functions/anytrue anytrue} returns true if any element in a given collection is true or "true" . It also returns false if the collection is empty. |
base64decode | {@link https://developer.hashicorp.com/terraform/language/functions/base64decode base64decode} takes a string containing a Base64 character sequence and returns the original string. |
base64encode | {@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string. |
base64gzip | {@link https://developer.hashicorp.com/terraform/language/functions/base64gzip base64gzip} compresses a string with gzip and then encodes the result in Base64 encoding. |
base64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha256 base64sha256} computes the SHA256 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha256("test")) since sha256() returns hexadecimal representation. |
base64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/base64sha512 base64sha512} computes the SHA512 hash of a given string and encodes it with Base64. This is not equivalent to base64encode(sha512("test")) since sha512() returns hexadecimal representation. |
basename | {@link https://developer.hashicorp.com/terraform/language/functions/basename basename} takes a string containing a filesystem path and removes all except the last portion from it. |
can | {@link https://developer.hashicorp.com/terraform/language/functions/can can} evaluates the given expression and returns a boolean value indicating whether the expression produced a result without any errors. |
ceil | {@link https://developer.hashicorp.com/terraform/language/functions/ceil ceil} returns the closest whole number that is greater than or equal to the given value, which may be a fraction. |
chomp | {@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string. |
chunklist | {@link https://developer.hashicorp.com/terraform/language/functions/chunklist chunklist} splits a single list into fixed-size chunks, returning a list of lists. |
cidrhost | {@link https://developer.hashicorp.com/terraform/language/functions/cidrhost cidrhost} calculates a full host IP address for a given host number within a given IP network address prefix. |
cidrnetmask | {@link https://developer.hashicorp.com/terraform/language/functions/cidrnetmask cidrnetmask} converts an IPv4 address prefix given in CIDR notation into a subnet mask address. |
cidrsubnet | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix. |
cidrsubnets | {@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnets cidrsubnets} calculates a sequence of consecutive IP address ranges within a particular CIDR prefix. |
coalesce | {@link https://developer.hashicorp.com/terraform/language/functions/coalesce coalesce} takes any number of arguments and returns the first one that isn't null or an empty string. |
coalescelist | {@link https://developer.hashicorp.com/terraform/language/functions/coalescelist coalescelist} takes any number of list arguments and returns the first one that isn't empty. |
compact | {@link https://developer.hashicorp.com/terraform/language/functions/compact compact} takes a list of strings and returns a new list with any empty string elements removed. |
concat | {@link https://developer.hashicorp.com/terraform/language/functions/concat concat} takes two or more lists and combines them into a single list. |
contains | {@link https://developer.hashicorp.com/terraform/language/functions/contains contains} determines whether a given list or set contains a given single value as one of its elements. |
csvdecode | {@link https://developer.hashicorp.com/terraform/language/functions/csvdecode csvdecode} decodes a string containing CSV-formatted data and produces a list of maps representing that data. |
dirname | {@link https://developer.hashicorp.com/terraform/language/functions/dirname dirname} takes a string containing a filesystem path and removes the last portion from it. |
distinct | {@link https://developer.hashicorp.com/terraform/language/functions/distinct distinct} takes a list and returns a new list with any duplicate elements removed. |
element | {@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list. |
endswith | {@link https://developer.hashicorp.com/terraform/language/functions/endswith endswith} takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix. |
file | {@link https://developer.hashicorp.com/terraform/language/functions/file file} reads the contents of a file at the given path and returns them as a string. |
filebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64 filebase64} reads the contents of a file at the given path and returns them as a base64-encoded string. |
filebase64sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha256 filebase64sha256} is a variant of base64sha256 that hashes the contents of a given file rather than a literal string. |
filebase64sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filebase64sha512 filebase64sha512} is a variant of base64sha512 that hashes the contents of a given file rather than a literal string. |
fileexists | {@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path. |
filemd5 | {@link https://developer.hashicorp.com/terraform/language/functions/filemd5 filemd5} is a variant of md5 that hashes the contents of a given file rather than a literal string. |
fileset | {@link https://developer.hashicorp.com/terraform/language/functions/fileset fileset} enumerates a set of regular file names given a path and pattern. The path is automatically removed from the resulting set of file names and any result still containing path separators always returns forward slash (/ ) as the path separator for cross-system compatibility. |
filesha1 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha1 filesha1} is a variant of sha1 that hashes the contents of a given file rather than a literal string. |
filesha256 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha256 filesha256} is a variant of sha256 that hashes the contents of a given file rather than a literal string. |
filesha512 | {@link https://developer.hashicorp.com/terraform/language/functions/filesha512 filesha512} is a variant of sha512 that hashes the contents of a given file rather than a literal string. |
flatten | {@link https://developer.hashicorp.com/terraform/language/functions/flatten flatten} takes a list and replaces any elements that are lists with a flattened sequence of the list contents. |
floor | {@link https://developer.hashicorp.com/terraform/language/functions/floor floor} returns the closest whole number that is less than or equal to the given value, which may be a fraction. |
format | The {@link https://developer.hashicorp.com/terraform/language/functions/format format} function produces a string by formatting a number of other values according to a specification string. It is similar to the printf function in C, and other similar functions in other programming languages. |
formatdate | {@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format. |
formatlist | {@link https://developer.hashicorp.com/terraform/language/functions/formatlist formatlist} produces a list of strings by formatting a number of other values according to a specification string. |
indent | {@link https://developer.hashicorp.com/terraform/language/functions/indent indent} adds a given number of spaces to the beginnings of all but the first line in a given multi-line string. |
index | {@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list. |
jsondecode | {@link https://developer.hashicorp.com/terraform/language/functions/jsondecode jsondecode} interprets a given string as JSON, returning a representation of the result of decoding that string. |
jsonencode | {@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax. |
keys | {@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map. |
lengthOf | {@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string. |
log | {@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base. |
lower | {@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase. |
matchkeys | {@link https://developer.hashicorp.com/terraform/language/functions/matchkeys matchkeys} constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list. |
max | {@link https://developer.hashicorp.com/terraform/language/functions/max max} takes one or more numbers and returns the greatest number from the set. |
md5 | {@link https://developer.hashicorp.com/terraform/language/functions/md5 md5} computes the MD5 hash of a given string and encodes it with hexadecimal digits. |
merge | {@link https://developer.hashicorp.com/terraform/language/functions/merge merge} takes an arbitrary number of maps or objects, and returns a single map or object that contains a merged set of elements from all arguments. |
min | {@link https://developer.hashicorp.com/terraform/language/functions/min min} takes one or more numbers and returns the smallest number from the set. |
nonsensitive | {@link https://developer.hashicorp.com/terraform/language/functions/nonsensitive nonsensitive} takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value. |
one | {@link https://developer.hashicorp.com/terraform/language/functions/one one} takes a list, set, or tuple value with either zero or one elements. If the collection is empty, one returns null . Otherwise, one returns the first element. If there are two or more elements then one will return an error. |
parseint | {@link https://developer.hashicorp.com/terraform/language/functions/parseint parseint} parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive. |
pathexpand | {@link https://developer.hashicorp.com/terraform/language/functions/pathexpand pathexpand} takes a filesystem path that might begin with a ~ segment, and if so it replaces that segment with the current user's home directory path. |
plantimestamp | {@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan. |
pow | {@link https://developer.hashicorp.com/terraform/language/functions/pow pow} calculates an exponent, by raising its first argument to the power of the second argument. |
regex | {@link https://developer.hashicorp.com/terraform/language/functions/regex regex} applies a regular expression to a string and returns the matching substrings. |
regexall | {@link https://developer.hashicorp.com/terraform/language/functions/regexall regexall} applies a regular expression to a string and returns a list of all matches. |
replace | {@link https://developer.hashicorp.com/terraform/language/functions/replace replace} searches a given string for another given substring, and replaces each occurrence with a given replacement string. |
reverse | {@link https://developer.hashicorp.com/terraform/language/functions/reverse reverse} takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order. |
rsadecrypt | {@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext. |
sensitive | {@link https://developer.hashicorp.com/terraform/language/functions/sensitive sensitive} takes any value and returns a copy of it marked so that Terraform will treat it as sensitive, with the same meaning and behavior as for sensitive input variables. |
setintersection | The {@link https://developer.hashicorp.com/terraform/language/functions/setintersection setintersection} function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. In other words, it computes the intersection of the sets. |
setproduct | The {@link https://developer.hashicorp.com/terraform/language/functions/setproduct setproduct} function finds all of the possible combinations of elements from all of the given sets by computing the Cartesian product. |
setsubtract | The {@link https://developer.hashicorp.com/terraform/language/functions/setsubtract setsubtract} function returns a new set containing the elements from the first set that are not present in the second set. In other words, it computes the relative complement of the second set. |
setunion | The {@link https://developer.hashicorp.com/terraform/language/functions/setunion setunion} function takes multiple sets and produces a single set containing the elements from all of the given sets. In other words, it computes the union of the sets. |
sha1 | {@link https://developer.hashicorp.com/terraform/language/functions/sha1 sha1} computes the SHA1 hash of a given string and encodes it with hexadecimal digits. |
sha256 | {@link https://developer.hashicorp.com/terraform/language/functions/sha256 sha256} computes the SHA256 hash of a given string and encodes it with hexadecimal digits. |
sha512 | {@link https://developer.hashicorp.com/terraform/language/functions/sha512 sha512} computes the SHA512 hash of a given string and encodes it with hexadecimal digits. |
signum | {@link https://developer.hashicorp.com/terraform/language/functions/signum signum} determines the sign of a number, returning a number between -1 and 1 to represent the sign. |
slice | {@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list. |
sort | {@link https://developer.hashicorp.com/terraform/language/functions/sort sort} takes a list of strings and returns a new list with those strings sorted lexicographically. |
split | {@link https://developer.hashicorp.com/terraform/language/functions/split split} produces a list by dividing a given string at all occurrences of a given separator. |
startswith | {@link https://developer.hashicorp.com/terraform/language/functions/startswith startswith} takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix. |
strcontains | {@link https://developer.hashicorp.com/terraform/language/functions/strcontains strcontains} takes two values: a string to check and an expected substring. The function returns true if the string has the substring contained within it. |
strrev | {@link https://developer.hashicorp.com/terraform/language/functions/strrev strrev} reverses the characters in a string. Note that the characters are treated as Unicode characters (in technical terms, Unicode grapheme cluster boundaries are respected). |
substr | {@link https://developer.hashicorp.com/terraform/language/functions/substr substr} extracts a substring from a given string by offset and (maximum) length. |
sum | {@link https://developer.hashicorp.com/terraform/language/functions/sum sum} takes a list or set of numbers and returns the sum of those numbers. |
templatefile | {@link https://developer.hashicorp.com/terraform/language/functions/templatefile templatefile} reads the file at the given path and renders its content as a template using a supplied set of template variables. |
textdecodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textdecodebase64 textdecodebase64} function decodes a string that was previously Base64-encoded, and then interprets the result as characters in a specified character encoding. |
textencodebase64 | {@link https://developer.hashicorp.com/terraform/language/functions/textencodebase64 textencodebase64} encodes the unicode characters in a given string using a specified character encoding, returning the result base64 encoded because Terraform language strings are always sequences of unicode characters. |
timeadd | {@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp. |
timecmp | {@link https://developer.hashicorp.com/terraform/language/functions/timecmp timecmp} compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent. |
timestamp | {@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format. |
title | {@link https://developer.hashicorp.com/terraform/language/functions/title title} converts the first letter of each word in the given string to uppercase. |
tobool | {@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value. |
tolist | {@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value. |
tomap | {@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value. |
tonumber | {@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value. |
toset | {@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value. |
tostring | {@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value. |
transpose | {@link https://developer.hashicorp.com/terraform/language/functions/transpose transpose} takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings. |
trim | {@link https://developer.hashicorp.com/terraform/language/functions/trim trim} removes the specified set of characters from the start and end of the given string. |
trimprefix | {@link https://developer.hashicorp.com/terraform/language/functions/trimprefix trimprefix} removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged. |
trimspace | {@link https://developer.hashicorp.com/terraform/language/functions/trimspace trimspace} removes any space characters from the start and end of the given string. |
trimsuffix | {@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string. |
try | {@link https://developer.hashicorp.com/terraform/language/functions/try try} evaluates all of its argument expressions in turn and returns the result of the first one that does not produce any errors. |
upper | {@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase. |
urlencode | {@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string. |
uuid | {@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string. |
uuidv5 | {@link https://developer.hashicorp.com/terraform/language/functions/uuidv5 uuidv5} generates a name-based UUID, as described in RFC 4122 section 4.3, also known as a "version 5" UUID. |
values | {@link https://developer.hashicorp.com/terraform/language/functions/values values} takes a map and returns a list containing the values of the elements in that map. |
yamldecode | {@link https://developer.hashicorp.com/terraform/language/functions/yamldecode yamldecode} parses a string as a subset of YAML, and produces a representation of its value. |
yamlencode | {@link https://developer.hashicorp.com/terraform/language/functions/yamlencode yamlencode} encodes a given value to a string using YAML 1.2 block syntax. |
zipmap | {@link https://developer.hashicorp.com/terraform/language/functions/zipmap zipmap} constructs a map from a list of keys and a corresponding list of values. |
abs
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.abs(java.lang.Number num)
{@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: java.lang.Number
abspath
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.abspath(java.lang.String path)
{@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: java.lang.String
alltrue
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.alltrue(java.util.List< java.lang.Object > list)
{@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: java.util.List< java.lang.Object >
anytrue
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.anytrue(java.util.List< java.lang.Object > list)
{@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: java.util.List< java.lang.Object >
base64decode
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.base64decode(java.lang.String 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: java.lang.String
base64encode
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.base64encode(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
str
Required
- Type: java.lang.String
base64gzip
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.base64gzip(java.lang.String 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: java.lang.String
base64sha256
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.base64sha256(java.lang.String 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: java.lang.String
base64sha512
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.base64sha512(java.lang.String 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: java.lang.String
basename
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.basename(java.lang.String path)
{@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: java.lang.String
can
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.can(java.lang.Object expression)
{@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: java.lang.Object
ceil
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.ceil(java.lang.Number num)
{@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: java.lang.Number
chomp
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.chomp(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
str
Required
- Type: java.lang.String
chunklist
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.chunklist(java.util.List< java.lang.Object > list, java.lang.Number size)
{@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: java.util.List< java.lang.Object >
size
Required
- Type: java.lang.Number
cidrhost
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.cidrhost(java.lang.String prefix, java.lang.Number hostnum)
{@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: java.lang.String
hostnum
Required
- Type: java.lang.Number
cidrnetmask
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.cidrnetmask(java.lang.String prefix)
{@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: java.lang.String
cidrsubnet
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.cidrsubnet(java.lang.String prefix, java.lang.Number newbits, java.lang.Number netnum)
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
prefix
Required
- Type: java.lang.String
newbits
Required
- Type: java.lang.Number
netnum
Required
- Type: java.lang.Number
cidrsubnets
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.cidrsubnets(java.lang.String prefix, java.util.List< java.lang.Number > newbits)
{@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: java.lang.String
newbits
Required
- Type: java.util.List< java.lang.Number >
coalesce
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.coalesce(java.util.List< java.lang.Object > vals)
{@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: java.util.List< java.lang.Object >
coalescelist
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.coalescelist(java.util.List< java.lang.Object > vals)
{@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: java.util.List< java.lang.Object >
compact
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.compact(java.util.List< java.lang.String > list)
{@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: java.util.List< java.lang.String >
concat
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.concat(java.util.List< java.lang.Object > seqs)
{@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: java.util.List< java.lang.Object >
contains
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.contains(java.lang.Object list, java.lang.Object value)
{@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: java.lang.Object
value
Required
- Type: java.lang.Object
csvdecode
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.csvdecode(java.lang.String 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: java.lang.String
dirname
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.dirname(java.lang.String path)
{@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: java.lang.String
distinct
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.distinct(java.util.List< java.lang.Object > list)
{@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: java.util.List< java.lang.Object >
element
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.element(java.lang.Object list, java.lang.Number index)
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
list
Required
- Type: java.lang.Object
index
Required
- Type: java.lang.Number
endswith
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.endswith(java.lang.String str, java.lang.String suffix)
{@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: java.lang.String
suffix
Required
- Type: java.lang.String
file
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.file(java.lang.String path)
{@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: java.lang.String
filebase64
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.filebase64(java.lang.String path)
{@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: java.lang.String
filebase64sha256
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.filebase64sha256(java.lang.String path)
{@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: java.lang.String
filebase64sha512
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.filebase64sha512(java.lang.String path)
{@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: java.lang.String
fileexists
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.fileexists(java.lang.String path)
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
path
Required
- Type: java.lang.String
filemd5
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.filemd5(java.lang.String path)
{@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: java.lang.String
fileset
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.fileset(java.lang.String path, java.lang.String pattern)
{@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: java.lang.String
pattern
Required
- Type: java.lang.String
filesha1
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.filesha1(java.lang.String path)
{@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: java.lang.String
filesha256
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.filesha256(java.lang.String path)
{@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: java.lang.String
filesha512
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.filesha512(java.lang.String path)
{@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: java.lang.String
flatten
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.flatten(java.lang.Object list)
{@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: java.lang.Object
floor
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.floor(java.lang.Number num)
{@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: java.lang.Number
format
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.format(java.lang.String format, java.util.List< java.lang.Object > args)
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: java.lang.String
args
Required
- Type: java.util.List< java.lang.Object >
formatdate
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.formatdate(java.lang.String format, java.lang.String time)
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
format
Required
- Type: java.lang.String
time
Required
- Type: java.lang.String
formatlist
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.formatlist(java.lang.String format, java.util.List< java.lang.Object > args)
{@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: java.lang.String
args
Required
- Type: java.util.List< java.lang.Object >
indent
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.indent(java.lang.Number spaces, java.lang.String 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: java.lang.Number
str
Required
- Type: java.lang.String
index
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.index(java.lang.Object list, java.lang.Object value)
{@link https://developer.hashicorp.com/terraform/language/functions/index index} finds the element index for a given value in a list.
list
Required
- Type: java.lang.Object
value
Required
- Type: java.lang.Object
jsondecode
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.jsondecode(java.lang.String 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: java.lang.String
jsonencode
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.jsonencode(java.lang.Object val)
{@link https://developer.hashicorp.com/terraform/language/functions/jsonencode jsonencode} encodes a given value to a string using JSON syntax.
val
Required
- Type: java.lang.Object
keys
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.keys(java.lang.Object inputMap)
{@link https://developer.hashicorp.com/terraform/language/functions/keys keys} takes a map and returns a list containing the keys from that map.
inputMap
Required
- Type: java.lang.Object
lengthOf
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.lengthOf(java.lang.Object value)
{@link https://developer.hashicorp.com/terraform/language/functions/length length} determines the length of a given list, map, or string.
value
Required
- Type: java.lang.Object
log
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.log(java.lang.Number num, java.lang.Number base)
{@link https://developer.hashicorp.com/terraform/language/functions/log log} returns the logarithm of a given number in a given base.
num
Required
- Type: java.lang.Number
base
Required
- Type: java.lang.Number
lower
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.lower(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/lower lower} converts all cased letters in the given string to lowercase.
str
Required
- Type: java.lang.String
matchkeys
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.matchkeys(java.util.List< java.lang.Object > values, java.util.List< java.lang.Object > keys, java.util.List< java.lang.Object > searchset)
{@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: java.util.List< java.lang.Object >
keys
Required
- Type: java.util.List< java.lang.Object >
searchset
Required
- Type: java.util.List< java.lang.Object >
max
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.max(java.util.List< java.lang.Number > numbers)
{@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: java.util.List< java.lang.Number >
md5
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.md5(java.lang.String 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: java.lang.String
merge
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.merge(java.util.List< java.lang.Object > maps)
{@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: java.util.List< java.lang.Object >
min
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.min(java.util.List< java.lang.Number > numbers)
{@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: java.util.List< java.lang.Number >
nonsensitive
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.nonsensitive(java.lang.Object value)
{@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: java.lang.Object
one
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.one(java.lang.Object list)
{@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: java.lang.Object
parseint
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.parseint(java.lang.Object number, java.lang.Number base)
{@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: java.lang.Object
base
Required
- Type: java.lang.Number
pathexpand
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.pathexpand(java.lang.String path)
{@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: java.lang.String
plantimestamp
import com.hashicorp.cdktf.FnGenerated;
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 com.hashicorp.cdktf.FnGenerated;
FnGenerated.pow(java.lang.Number num, java.lang.Number power)
{@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: java.lang.Number
power
Required
- Type: java.lang.Number
regex
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.regex(java.lang.String pattern, java.lang.String 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: java.lang.String
str
Required
- Type: java.lang.String
regexall
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.regexall(java.lang.String pattern, java.lang.String 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: java.lang.String
str
Required
- Type: java.lang.String
replace
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.replace(java.lang.String str, java.lang.String substr, java.lang.String 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.
str
Required
- Type: java.lang.String
substr
Required
- Type: java.lang.String
replace
Required
- Type: java.lang.String
reverse
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.reverse(java.lang.Object list)
{@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: java.lang.Object
rsadecrypt
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.rsadecrypt(java.lang.String ciphertext, java.lang.String privatekey)
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
ciphertext
Required
- Type: java.lang.String
privatekey
Required
- Type: java.lang.String
sensitive
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.sensitive(java.lang.Object value)
{@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: java.lang.Object
setintersection
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.setintersection(java.util.List< java.lang.Object > first_set, java.util.List< java.util.List< java.lang.Object >> other_sets)
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: java.util.List< java.lang.Object >
other_sets
Required
- Type: java.util.List< java.util.List< java.lang.Object >>
setproduct
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.setproduct(java.util.List< java.lang.Object > sets)
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: java.util.List< java.lang.Object >
setsubtract
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.setsubtract(java.util.List< java.lang.Object > a, java.util.List< java.lang.Object > b)
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: java.util.List< java.lang.Object >
b
Required
- Type: java.util.List< java.lang.Object >
setunion
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.setunion(java.util.List< java.lang.Object > first_set, java.util.List< java.util.List< java.lang.Object >> other_sets)
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: java.util.List< java.lang.Object >
other_sets
Required
- Type: java.util.List< java.util.List< java.lang.Object >>
sha1
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.sha1(java.lang.String 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: java.lang.String
sha256
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.sha256(java.lang.String 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: java.lang.String
sha512
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.sha512(java.lang.String 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: java.lang.String
signum
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.signum(java.lang.Number num)
{@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: java.lang.Number
slice
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.slice(java.lang.Object list, java.lang.Number start_index, java.lang.Number end_index)
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
list
Required
- Type: java.lang.Object
start_index
Required
- Type: java.lang.Number
end_index
Required
- Type: java.lang.Number
sort
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.sort(java.util.List< java.lang.String > list)
{@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: java.util.List< java.lang.String >
split
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.split(java.lang.String separator, java.lang.String 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: java.lang.String
str
Required
- Type: java.lang.String
startswith
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.startswith(java.lang.String str, java.lang.String prefix)
{@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: java.lang.String
prefix
Required
- Type: java.lang.String
strcontains
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.strcontains(java.lang.String str, java.lang.String substr)
{@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: java.lang.String
substr
Required
- Type: java.lang.String
strrev
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.strrev(java.lang.String 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: java.lang.String
substr
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.substr(java.lang.String str, java.lang.Number offset, java.lang.Number length)
{@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: java.lang.String
offset
Required
- Type: java.lang.Number
length
Required
- Type: java.lang.Number
sum
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.sum(java.lang.Object list)
{@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: java.lang.Object
templatefile
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.templatefile(java.lang.String path, java.lang.Object vars)
{@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: java.lang.String
vars
Required
- Type: java.lang.Object
textdecodebase64
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.textdecodebase64(java.lang.String source, java.lang.String encoding)
{@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: java.lang.String
encoding
Required
- Type: java.lang.String
textencodebase64
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.textencodebase64(java.lang.String str, java.lang.String encoding)
{@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: java.lang.String
encoding
Required
- Type: java.lang.String
timeadd
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.timeadd(java.lang.String timestamp, java.lang.String duration)
{@link https://developer.hashicorp.com/terraform/language/functions/timeadd timeadd} adds a duration to a timestamp, returning a new timestamp.
timestamp
Required
- Type: java.lang.String
duration
Required
- Type: java.lang.String
timecmp
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.timecmp(java.lang.String timestamp_a, java.lang.String timestamp_b)
{@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: java.lang.String
timestamp_b
Required
- Type: java.lang.String
timestamp
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.timestamp()
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
title
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.title(java.lang.String 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: java.lang.String
tobool
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.tobool(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
v
Required
- Type: java.lang.Object
tolist
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.tolist(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
v
Required
- Type: java.lang.Object
tomap
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.tomap(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
v
Required
- Type: java.lang.Object
tonumber
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.tonumber(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
v
Required
- Type: java.lang.Object
toset
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.toset(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
v
Required
- Type: java.lang.Object
tostring
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.tostring(java.lang.Object v)
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
v
Required
- Type: java.lang.Object
transpose
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.transpose(java.lang.Object values)
{@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: java.lang.Object
trim
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.trim(java.lang.String str, java.lang.String cutset)
{@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: java.lang.String
cutset
Required
- Type: java.lang.String
trimprefix
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.trimprefix(java.lang.String str, java.lang.String prefix)
{@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: java.lang.String
prefix
Required
- Type: java.lang.String
trimspace
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.trimspace(java.lang.String 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: java.lang.String
trimsuffix
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.trimsuffix(java.lang.String str, java.lang.String suffix)
{@link https://developer.hashicorp.com/terraform/language/functions/trimsuffix trimsuffix} removes the specified suffix from the end of the given string.
str
Required
- Type: java.lang.String
suffix
Required
- Type: java.lang.String
try
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.try(java.util.List< java.lang.Object > expressions)
{@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: java.util.List< java.lang.Object >
upper
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.upper(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/upper upper} converts all cased letters in the given string to uppercase.
str
Required
- Type: java.lang.String
urlencode
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.urlencode(java.lang.String str)
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
str
Required
- Type: java.lang.String
uuid
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.uuid()
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
uuidv5
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.uuidv5(java.lang.String namespace, java.lang.String name)
{@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: java.lang.String
name
Required
- Type: java.lang.String
values
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.values(java.lang.Object mapping)
{@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: java.lang.Object
yamldecode
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.yamldecode(java.lang.String src)
{@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: java.lang.String
yamlencode
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.yamlencode(java.lang.Object value)
{@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: java.lang.Object
zipmap
import com.hashicorp.cdktf.FnGenerated;
FnGenerated.zipmap(java.util.List< java.lang.String > keys, java.lang.Object values)
{@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: java.util.List< java.lang.String >
values
Required
- Type: java.lang.Object
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 com.hashicorp.cdktf.Lazy;
new Lazy();
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
anyValue | Produces a lazy token from an untyped value. |
listValue | Returns a list-ified token for a lazy value. |
numberValue | Returns a numberified token for a lazy value. |
stringValue | Returns a stringified token for a lazy value. |
anyValue
import com.hashicorp.cdktf.Lazy;
Lazy.anyValue(IAnyProducer producer),Lazy.anyValue(IAnyProducer producer, LazyAnyValueOptions options)
Produces a lazy token from an untyped value.
producer
Required
- Type: IAnyProducer
The lazy producer.
options
Optional
- Type: LazyAnyValueOptions
Options.
listValue
import com.hashicorp.cdktf.Lazy;
Lazy.listValue(IListProducer producer),Lazy.listValue(IListProducer producer, LazyListValueOptions options)
Returns a list-ified token for a lazy value.
producer
Required
- Type: IListProducer
The producer.
options
Optional
- Type: LazyListValueOptions
Options.
numberValue
import com.hashicorp.cdktf.Lazy;
Lazy.numberValue(INumberProducer producer)
Returns a numberified token for a lazy value.
producer
Required
- Type: INumberProducer
The producer.
stringValue
import com.hashicorp.cdktf.Lazy;
Lazy.stringValue(IStringProducer producer),Lazy.stringValue(IStringProducer producer, LazyStringValueOptions options)
Returns a stringified token for a lazy value.
producer
Required
- Type: IStringProducer
The producer.
options
Optional
- Type: LazyStringValueOptions
Options.
LazyBase
- Implements: IResolvable
Initializers
import com.hashicorp.cdktf.LazyBase;
new LazyBase();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
addPostProcessor | No description. |
resolve | Produce the Token's value at resolution time. |
toJSON | Turn this Token into JSON. |
toString | Return a string representation of this resolvable object. |
addPostProcessor
public void addPostProcessor(IPostProcessor postProcessor)
postProcessor
Required
- Type: IPostProcessor
resolve
public java.lang.Object resolve(IResolveContext context)
Produce the Token's value at resolution time.
context
Required
- Type: IResolveContext
toJSON
public java.lang.Object toJSON()
Turn this Token into JSON.
Called automatically when JSON.stringify() is called on a Token.
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
ListTerraformIterator
Initializers
import com.hashicorp.cdktf.ListTerraformIterator;
new ListTerraformIterator(java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable > list);
Name | Type | Description |
---|---|---|
list | java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable> | No description. |
list
Required
- Type: java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable>
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
forExpressionForList | Creates a for expression that results in a list. |
forExpressionForMap | Creates a for expression that results in a map. |
getAny | No description. |
getAnyMap | No description. |
getBoolean | No description. |
getBooleanMap | No description. |
getList | No description. |
getMap | No description. |
getNumber | No description. |
getNumberList | No description. |
getNumberMap | No description. |
getString | No description. |
getStringMap | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
public IResolvable dynamic(java.util.Map< java.lang.String, java.lang.Object > attributes)
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: java.util.Map< java.lang.String, java.lang.Object >
forExpressionForList
public IResolvable forExpressionForList(java.lang.String OR IResolvable expression)
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: java.lang.String OR IResolvable
The expression to use in the for mapping.
forExpressionForMap
public IResolvable forExpressionForMap(java.lang.String OR IResolvable keyExpression, java.lang.String OR IResolvable valueExpression)
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
.
keyExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as key in the for mapping.
valueExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as value in the for mapping.
getAny
public IResolvable getAny(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getAnyMap
public java.util.Map< java.lang.String, java.lang.Object > getAnyMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBoolean
public IResolvable getBoolean(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBooleanMap
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getList
public java.util.List< java.lang.String > getList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getMap
public java.util.Map< java.lang.String, java.lang.Object > getMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumber
public java.lang.Number getNumber(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberList
public java.util.List< java.lang.Number > getNumberList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberMap
public java.util.Map< java.lang.String, java.lang.Number > getNumberMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getString
public java.lang.String getString(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getStringMap
public java.util.Map< java.lang.String, java.lang.String > getStringMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
keys
public IResolvable keys()
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluckProperty
public IResolvable pluckProperty(java.lang.String property)
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: java.lang.String
The property of the iterators values to map to.
values
public IResolvable values()
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
fromComplexList | Creates a new iterator from a complex list. |
fromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
fromList | Creates a new iterator from a list. |
fromMap | Creates a new iterator from a map. |
fromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
fromComplexList
import com.hashicorp.cdktf.ListTerraformIterator;
ListTerraformIterator.fromComplexList(IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList list, java.lang.String mapKeyAttributeName)
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.
Object cert = AcmCertificate.Builder.create(this, "cert")
.domainName("example.com")
.validationMethod("DNS")
.build();
Object dvoIterator = TerraformIterator.fromComplexList(cert.getDomainValidationOptions(), "domain_name");
Route53Record.Builder.create(this, "record")
.allowOverwrite(true)
.name(dvoIterator.getString("name"))
.records(List.of(dvoIterator.getString("record")))
.ttl(60)
.type(dvoIterator.getString("type"))
.zoneId(Token.asString(dataAwsRoute53ZoneExample.getZoneId()))
.forEach(dvoIterator)
.build();
list
Required
- Type: IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList
the list to iterate over.
mapKeyAttributeName
Required
- Type: java.lang.String
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
fromDataSources
import com.hashicorp.cdktf.ListTerraformIterator;
ListTerraformIterator.fromDataSources(ITerraformResource resource)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
fromList
import com.hashicorp.cdktf.ListTerraformIterator;
ListTerraformIterator.fromList(java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable > list)
Creates a new iterator from a list.
list
Required
- Type: java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable>
fromMap
import com.hashicorp.cdktf.ListTerraformIterator;
ListTerraformIterator.fromMap(ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean > map)
Creates a new iterator from a map.
map
Required
- Type: ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean >
fromResources
import com.hashicorp.cdktf.ListTerraformIterator;
ListTerraformIterator.fromResources(ITerraformResource resource)
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 | java.lang.Object | Returns the currently entry in the list or set that is being iterated over. |
value | java.lang.Object | Returns the value of the current item iterated over. |
key
Required
public java.lang.Object getKey();
- Type: java.lang.Object
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
public java.lang.Object getValue();
- Type: java.lang.Object
Returns the value of the current item iterated over.
Manifest
- Implements: IManifest
Initializers
import com.hashicorp.cdktf.Manifest;
new Manifest(java.lang.String version, java.lang.String outdir, java.lang.Boolean hclOutput);
Name | Type | Description |
---|---|---|
version | java.lang.String | No description. |
outdir | java.lang.String | No description. |
hclOutput | java.lang.Boolean | No description. |
version
Required
- Type: java.lang.String
outdir
Required
- Type: java.lang.String
hclOutput
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
buildManifest | No description. |
forStack | No description. |
writeToFile | No description. |
buildManifest
public IManifest buildManifest()
forStack
public StackManifest forStack(TerraformStack stack)
stack
Required
- Type: TerraformStack
writeToFile
public void writeToFile()
Properties
Name | Type | Description |
---|---|---|
hclOutput | java.lang.Boolean | No description. |
outdir | java.lang.String | No description. |
stackFileName | java.lang.String | No description. |
stacks | java.util.Map< java.lang.String, StackManifest> | No description. |
version | java.lang.String | No description. |
hclOutput
Required
public java.lang.Boolean getHclOutput();
- Type: java.lang.Boolean
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
stackFileName
Required
public java.lang.String getStackFileName();
- Type: java.lang.String
stacks
Required
public java.util.Map< java.lang.String, StackManifest > getStacks();
- Type: java.util.Map< java.lang.String, StackManifest>
version
Required
public java.lang.String getVersion();
- Type: java.lang.String
Constants
Name | Type | Description |
---|---|---|
fileName | java.lang.String | No description. |
stackMetadataPath | java.lang.String | No description. |
stacksFolder | java.lang.String | No description. |
fileName
Required
public java.lang.String getFileName();
- Type: java.lang.String
stackMetadataPath
Required
public java.lang.String getStackMetadataPath();
- Type: java.lang.String
stacksFolder
Required
public java.lang.String getStacksFolder();
- Type: java.lang.String
MapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
import com.hashicorp.cdktf.MapList;
new MapList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
MapTerraformIterator
Initializers
import com.hashicorp.cdktf.MapTerraformIterator;
new MapTerraformIterator(AnyMap OR StringMap OR NumberMap OR BooleanMap OR ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > map);
Name | Type | Description |
---|---|---|
map | AnyMap OR StringMap OR NumberMap OR BooleanMap OR ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > | No description. |
map
Required
- Type: AnyMap OR StringMap OR NumberMap OR BooleanMap OR ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number >
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
forExpressionForList | Creates a for expression that results in a list. |
forExpressionForMap | Creates a for expression that results in a map. |
getAny | No description. |
getAnyMap | No description. |
getBoolean | No description. |
getBooleanMap | No description. |
getList | No description. |
getMap | No description. |
getNumber | No description. |
getNumberList | No description. |
getNumberMap | No description. |
getString | No description. |
getStringMap | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
public IResolvable dynamic(java.util.Map< java.lang.String, java.lang.Object > attributes)
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: java.util.Map< java.lang.String, java.lang.Object >
forExpressionForList
public IResolvable forExpressionForList(java.lang.String OR IResolvable expression)
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: java.lang.String OR IResolvable
The expression to use in the for mapping.
forExpressionForMap
public IResolvable forExpressionForMap(java.lang.String OR IResolvable keyExpression, java.lang.String OR IResolvable valueExpression)
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
.
keyExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as key in the for mapping.
valueExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as value in the for mapping.
getAny
public IResolvable getAny(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getAnyMap
public java.util.Map< java.lang.String, java.lang.Object > getAnyMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBoolean
public IResolvable getBoolean(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBooleanMap
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getList
public java.util.List< java.lang.String > getList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getMap
public java.util.Map< java.lang.String, java.lang.Object > getMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumber
public java.lang.Number getNumber(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberList
public java.util.List< java.lang.Number > getNumberList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberMap
public java.util.Map< java.lang.String, java.lang.Number > getNumberMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getString
public java.lang.String getString(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getStringMap
public java.util.Map< java.lang.String, java.lang.String > getStringMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
keys
public IResolvable keys()
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluckProperty
public IResolvable pluckProperty(java.lang.String property)
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: java.lang.String
The property of the iterators values to map to.
values
public IResolvable values()
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
fromComplexList | Creates a new iterator from a complex list. |
fromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
fromList | Creates a new iterator from a list. |
fromMap | Creates a new iterator from a map. |
fromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
fromComplexList
import com.hashicorp.cdktf.MapTerraformIterator;
MapTerraformIterator.fromComplexList(IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList list, java.lang.String mapKeyAttributeName)
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.
Object cert = AcmCertificate.Builder.create(this, "cert")
.domainName("example.com")
.validationMethod("DNS")
.build();
Object dvoIterator = TerraformIterator.fromComplexList(cert.getDomainValidationOptions(), "domain_name");
Route53Record.Builder.create(this, "record")
.allowOverwrite(true)
.name(dvoIterator.getString("name"))
.records(List.of(dvoIterator.getString("record")))
.ttl(60)
.type(dvoIterator.getString("type"))
.zoneId(Token.asString(dataAwsRoute53ZoneExample.getZoneId()))
.forEach(dvoIterator)
.build();
list
Required
- Type: IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList
the list to iterate over.
mapKeyAttributeName
Required
- Type: java.lang.String
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
fromDataSources
import com.hashicorp.cdktf.MapTerraformIterator;
MapTerraformIterator.fromDataSources(ITerraformResource resource)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
fromList
import com.hashicorp.cdktf.MapTerraformIterator;
MapTerraformIterator.fromList(java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable > list)
Creates a new iterator from a list.
list
Required
- Type: java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable>
fromMap
import com.hashicorp.cdktf.MapTerraformIterator;
MapTerraformIterator.fromMap(ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean > map)
Creates a new iterator from a map.
map
Required
- Type: ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean >
fromResources
import com.hashicorp.cdktf.MapTerraformIterator;
MapTerraformIterator.fromResources(ITerraformResource resource)
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 | java.lang.String | Returns the key of the current entry in the map that is being iterated over. |
value | java.lang.Object | Returns the value of the current item iterated over. |
key
Required
public java.lang.String getKey();
- Type: java.lang.String
Returns the key of the current entry in the map that is being iterated over.
value
Required
public java.lang.Object getValue();
- Type: java.lang.Object
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 com.hashicorp.cdktf.MigrateIds;
new MigrateIds();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
visit | All aspects can visit an IConstruct. |
visit
public void visit(IConstruct node)
All aspects can visit an IConstruct.
node
Required
- Type: software.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 com.hashicorp.cdktf.NamedCloudWorkspace;
new NamedCloudWorkspace(java.lang.String name);,new NamedCloudWorkspace(java.lang.String name, java.lang.String project);
name
Required
- Type: java.lang.String
project
Optional
- Type: java.lang.String
Methods
Name | Description |
---|---|
toTerraform | No description. |
toHclTerraform | No description. |
toTerraform
public java.lang.Object toTerraform()
toHclTerraform
public java.lang.Object toHclTerraform()
Properties
name
Required
public java.lang.String getName();
- Type: java.lang.String
project
Optional
public java.lang.String getProject();
- Type: java.lang.String
NamedRemoteWorkspace
- Implements: IRemoteWorkspace
Initializers
import com.hashicorp.cdktf.NamedRemoteWorkspace;
new NamedRemoteWorkspace(java.lang.String name);
Name | Type | Description |
---|---|---|
name | java.lang.String | No description. |
name
Required
- Type: java.lang.String
Properties
Name | Type | Description |
---|---|---|
name | java.lang.String | No description. |
name
Required
public java.lang.String getName();
- Type: java.lang.String
NumberListList
Initializers
import com.hashicorp.cdktf.NumberListList;
new NumberListList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
allWithMapKey | Creating an iterator for this complex list. |
computeFqn | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
allWithMapKey
public DynamicListTerraformIterator allWithMapKey(java.lang.String mapKeyAttributeName)
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeName
Required
- Type: java.lang.String
computeFqn
public java.lang.String computeFqn()
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public java.util.List< java.lang.Number > get(java.lang.Number index)
index
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
NumberListMap
Initializers
import com.hashicorp.cdktf.NumberListMap;
new NumberListMap(IInterpolatingParent terraformResource, java.lang.String terraformAttribute);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public java.util.List< java.lang.Number > get(java.lang.String key)
key
Required
- Type: java.lang.String
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
NumberMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import com.hashicorp.cdktf.NumberMap;
new NumberMap(IInterpolatingParent terraformResource, java.lang.String terraformAttribute);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
computeFqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public java.lang.String computeFqn()
lookup
public java.lang.Number lookup(java.lang.String key)
key
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
NumberMapList
Initializers
import com.hashicorp.cdktf.NumberMapList;
new NumberMapList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public NumberMap get(java.lang.Number index)
index
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
Op
This class contains static functions for all arithmetical and logical operators in the Terraform configuration language.
Initializers
import com.hashicorp.cdktf.Op;
new 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 com.hashicorp.cdktf.Op;
Op.add(java.lang.Object left, java.lang.Object right)
Renders left + right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
and
import com.hashicorp.cdktf.Op;
Op.and(java.lang.Object left, java.lang.Object right)
Renders left && right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
div
import com.hashicorp.cdktf.Op;
Op.div(java.lang.Object left, java.lang.Object right)
Renders left / right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
eq
import com.hashicorp.cdktf.Op;
Op.eq(java.lang.Object left, java.lang.Object right)
Renders left == right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
gt
import com.hashicorp.cdktf.Op;
Op.gt(java.lang.Object left, java.lang.Object right)
Renders left > right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
gte
import com.hashicorp.cdktf.Op;
Op.gte(java.lang.Object left, java.lang.Object right)
Renders left >= right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
lt
import com.hashicorp.cdktf.Op;
Op.lt(java.lang.Object left, java.lang.Object right)
Renders left < right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
lte
import com.hashicorp.cdktf.Op;
Op.lte(java.lang.Object left, java.lang.Object right)
Renders left < = right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
mod
import com.hashicorp.cdktf.Op;
Op.mod(java.lang.Object left, java.lang.Object right)
Renders left % right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
mul
import com.hashicorp.cdktf.Op;
Op.mul(java.lang.Object left, java.lang.Object right)
Renders left * right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
negate
import com.hashicorp.cdktf.Op;
Op.negate(java.lang.Object expression)
Renders -expression.
expression
Required
- Type: java.lang.Object
neq
import com.hashicorp.cdktf.Op;
Op.neq(java.lang.Object left, java.lang.Object right)
Renders left != right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
not
import com.hashicorp.cdktf.Op;
Op.not(java.lang.Object expression)
Renders !expression.
expression
Required
- Type: java.lang.Object
or
import com.hashicorp.cdktf.Op;
Op.or(java.lang.Object left, java.lang.Object right)
Renders left || right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
sub
import com.hashicorp.cdktf.Op;
Op.sub(java.lang.Object left, java.lang.Object right)
Renders left - right.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
PrefixedRemoteWorkspaces
- Implements: IRemoteWorkspace
Initializers
import com.hashicorp.cdktf.PrefixedRemoteWorkspaces;
new PrefixedRemoteWorkspaces(java.lang.String prefix);
Name | Type | Description |
---|---|---|
prefix | java.lang.String | No description. |
prefix
Required
- Type: java.lang.String
Properties
Name | Type | Description |
---|---|---|
prefix | java.lang.String | No description. |
prefix
Required
public java.lang.String getPrefix();
- Type: java.lang.String
ResourceTerraformIterator
Initializers
import com.hashicorp.cdktf.ResourceTerraformIterator;
new ResourceTerraformIterator(ITerraformResource element);
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. |
forExpressionForList | Creates a for expression that results in a list. |
forExpressionForMap | Creates a for expression that results in a map. |
getAny | No description. |
getAnyMap | No description. |
getBoolean | No description. |
getBooleanMap | No description. |
getList | No description. |
getMap | No description. |
getNumber | No description. |
getNumberList | No description. |
getNumberMap | No description. |
getString | No description. |
getStringMap | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
public IResolvable dynamic(java.util.Map< java.lang.String, java.lang.Object > attributes)
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: java.util.Map< java.lang.String, java.lang.Object >
forExpressionForList
public IResolvable forExpressionForList(java.lang.String OR IResolvable expression)
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: java.lang.String OR IResolvable
The expression to use in the for mapping.
forExpressionForMap
public IResolvable forExpressionForMap(java.lang.String OR IResolvable keyExpression, java.lang.String OR IResolvable valueExpression)
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
.
keyExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as key in the for mapping.
valueExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as value in the for mapping.
getAny
public IResolvable getAny(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getAnyMap
public java.util.Map< java.lang.String, java.lang.Object > getAnyMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBoolean
public IResolvable getBoolean(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBooleanMap
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getList
public java.util.List< java.lang.String > getList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getMap
public java.util.Map< java.lang.String, java.lang.Object > getMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumber
public java.lang.Number getNumber(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberList
public java.util.List< java.lang.Number > getNumberList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberMap
public java.util.Map< java.lang.String, java.lang.Number > getNumberMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getString
public java.lang.String getString(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getStringMap
public java.util.Map< java.lang.String, java.lang.String > getStringMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
keys
public IResolvable keys()
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluckProperty
public IResolvable pluckProperty(java.lang.String property)
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: java.lang.String
The property of the iterators values to map to.
values
public IResolvable values()
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
fromComplexList | Creates a new iterator from a complex list. |
fromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
fromList | Creates a new iterator from a list. |
fromMap | Creates a new iterator from a map. |
fromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
fromComplexList
import com.hashicorp.cdktf.ResourceTerraformIterator;
ResourceTerraformIterator.fromComplexList(IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList list, java.lang.String mapKeyAttributeName)
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.
Object cert = AcmCertificate.Builder.create(this, "cert")
.domainName("example.com")
.validationMethod("DNS")
.build();
Object dvoIterator = TerraformIterator.fromComplexList(cert.getDomainValidationOptions(), "domain_name");
Route53Record.Builder.create(this, "record")
.allowOverwrite(true)
.name(dvoIterator.getString("name"))
.records(List.of(dvoIterator.getString("record")))
.ttl(60)
.type(dvoIterator.getString("type"))
.zoneId(Token.asString(dataAwsRoute53ZoneExample.getZoneId()))
.forEach(dvoIterator)
.build();
list
Required
- Type: IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList
the list to iterate over.
mapKeyAttributeName
Required
- Type: java.lang.String
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
fromDataSources
import com.hashicorp.cdktf.ResourceTerraformIterator;
ResourceTerraformIterator.fromDataSources(ITerraformResource resource)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
fromList
import com.hashicorp.cdktf.ResourceTerraformIterator;
ResourceTerraformIterator.fromList(java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable > list)
Creates a new iterator from a list.
list
Required
- Type: java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable>
fromMap
import com.hashicorp.cdktf.ResourceTerraformIterator;
ResourceTerraformIterator.fromMap(ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean > map)
Creates a new iterator from a map.
map
Required
- Type: ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean >
fromResources
import com.hashicorp.cdktf.ResourceTerraformIterator;
ResourceTerraformIterator.fromResources(ITerraformResource resource)
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 | java.lang.Object | Returns the current entry in the list or set that is being iterated over. |
value | java.lang.Object | Returns the value of the current item iterated over. |
key
Required
public java.lang.Object getKey();
- Type: java.lang.Object
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
public java.lang.Object getValue();
- Type: java.lang.Object
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 com.hashicorp.cdktf.StringConcat;
new StringConcat();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
join | Concatenates string fragments. |
join
public java.lang.Object join(java.lang.Object left, java.lang.Object right)
Concatenates string fragments.
left
Required
- Type: java.lang.Object
right
Required
- Type: java.lang.Object
StringListList
Initializers
import com.hashicorp.cdktf.StringListList;
new StringListList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
allWithMapKey | Creating an iterator for this complex list. |
computeFqn | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
allWithMapKey
public DynamicListTerraformIterator allWithMapKey(java.lang.String mapKeyAttributeName)
Creating an iterator for this complex list.
The list will be converted into a map with the mapKeyAttributeName as the key.
mapKeyAttributeName
Required
- Type: java.lang.String
computeFqn
public java.lang.String computeFqn()
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public java.util.List< java.lang.String > get(java.lang.Number index)
index
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
StringListMap
Initializers
import com.hashicorp.cdktf.StringListMap;
new StringListMap(IInterpolatingParent terraformResource, java.lang.String terraformAttribute);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public java.util.List< java.lang.String > get(java.lang.String key)
key
Required
- Type: java.lang.String
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
StringMap
- Implements: ITerraformAddressable, IResolvable
Initializers
import com.hashicorp.cdktf.StringMap;
new StringMap(IInterpolatingParent terraformResource, java.lang.String terraformAttribute);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
computeFqn | No description. |
lookup | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
computeFqn
public java.lang.String computeFqn()
lookup
public java.lang.String lookup(java.lang.String key)
key
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
StringMapList
Initializers
import com.hashicorp.cdktf.StringMapList;
new StringMapList(IInterpolatingParent terraformResource, java.lang.String terraformAttribute, java.lang.Boolean wrapsSet);
Name | Type | Description |
---|---|---|
terraformResource | IInterpolatingParent | No description. |
terraformAttribute | java.lang.String | No description. |
wrapsSet | java.lang.Boolean | No description. |
terraformResource
Required
- Type: IInterpolatingParent
terraformAttribute
Required
- Type: java.lang.String
wrapsSet
Required
- Type: java.lang.Boolean
Methods
Name | Description |
---|---|
computeFqn | No description. |
interpolationForAttribute | No description. |
resolve | Produce the Token's value at resolution time. |
toString | Return a string representation of this resolvable object. |
get | No description. |
computeFqn
public java.lang.String computeFqn()
interpolationForAttribute
public IResolvable interpolationForAttribute(java.lang.String property)
property
Required
- Type: java.lang.String
resolve
public java.lang.Object resolve(IResolveContext _context)
Produce the Token's value at resolution time.
_context
Required
- Type: IResolveContext
toString
public java.lang.String toString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
get
public StringMap get(java.lang.Number index)
index
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
creationStack | java.util.List< java.lang.String > | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
fqn | java.lang.String | No description. |
creationStack
Required
public java.util.List< java.lang.String > getCreationStack();
- Type: java.util.List< java.lang.String >
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
TaggedCloudWorkspaces
A set of Terraform Cloud workspace tags.
You will be able to use this working directory with any workspaces that have all of the specified tags, and can use the terraform workspace commands to switch between them or create new workspaces. New workspaces will automatically have the specified tags. This option conflicts with name.
Initializers
import com.hashicorp.cdktf.TaggedCloudWorkspaces;
new TaggedCloudWorkspaces(java.util.List< java.lang.String > tags);,new TaggedCloudWorkspaces(java.util.List< java.lang.String > tags, java.lang.String project);
Name | Type | Description |
---|---|---|
tags | java.util.List< java.lang.String > | No description. |
project | java.lang.String | No description. |
tags
Required
- Type: java.util.List< java.lang.String >
project
Optional
- Type: java.lang.String
Methods
Name | Description |
---|---|
toTerraform | No description. |
toHclTerraform | No description. |
toTerraform
public java.lang.Object toTerraform()
toHclTerraform
public java.lang.Object toHclTerraform()
Properties
Name | Type | Description |
---|---|---|
tags | java.util.List< java.lang.String > | No description. |
project | java.lang.String | No description. |
tags
Required
public java.util.List< java.lang.String > getTags();
- Type: java.util.List< java.lang.String >
project
Optional
public java.lang.String getProject();
- Type: java.lang.String
TerraformCount
Iterator for the Terraform count property.
Methods
Name | Description |
---|---|
toString | No description. |
toTerraform | No description. |
toString
public java.lang.String toString()
toTerraform
public java.lang.Number toTerraform()
Static Functions
Name | Description |
---|---|
isTerraformCount | No description. |
of | No description. |
isTerraformCount
import com.hashicorp.cdktf.TerraformCount;
TerraformCount.isTerraformCount(java.lang.Object x)
x
Required
- Type: java.lang.Object
of
import com.hashicorp.cdktf.TerraformCount;
TerraformCount.of(java.lang.Number count)
count
Required
- Type: java.lang.Number
Properties
Name | Type | Description |
---|---|---|
index | java.lang.Number | No description. |
index
Required
public java.lang.Number getIndex();
- Type: java.lang.Number
TerraformIterator
- Implements: ITerraformIterator
Initializers
import com.hashicorp.cdktf.TerraformIterator;
new TerraformIterator();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
forExpressionForList | Creates a for expression that results in a list. |
forExpressionForMap | Creates a for expression that results in a map. |
getAny | No description. |
getAnyMap | No description. |
getBoolean | No description. |
getBooleanMap | No description. |
getList | No description. |
getMap | No description. |
getNumber | No description. |
getNumberList | No description. |
getNumberMap | No description. |
getString | No description. |
getStringMap | No description. |
keys | Creates a for expression that maps the iterators to its keys. |
pluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
values | Creates a for expression that maps the iterators to its value in case it is a map. |
dynamic
public IResolvable dynamic(java.util.Map< java.lang.String, java.lang.Object > attributes)
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: java.util.Map< java.lang.String, java.lang.Object >
forExpressionForList
public IResolvable forExpressionForList(java.lang.String OR IResolvable expression)
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: java.lang.String OR IResolvable
The expression to use in the for mapping.
forExpressionForMap
public IResolvable forExpressionForMap(java.lang.String OR IResolvable keyExpression, java.lang.String OR IResolvable valueExpression)
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
.
keyExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as key in the for mapping.
valueExpression
Required
- Type: java.lang.String OR IResolvable
The expression to use as value in the for mapping.
getAny
public IResolvable getAny(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getAnyMap
public java.util.Map< java.lang.String, java.lang.Object > getAnyMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBoolean
public IResolvable getBoolean(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getBooleanMap
public java.util.Map< java.lang.String, java.lang.Boolean > getBooleanMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getList
public java.util.List< java.lang.String > getList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getMap
public java.util.Map< java.lang.String, java.lang.Object > getMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumber
public java.lang.Number getNumber(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberList
public java.util.List< java.lang.Number > getNumberList(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getNumberMap
public java.util.Map< java.lang.String, java.lang.Number > getNumberMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getString
public java.lang.String getString(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
getStringMap
public java.util.Map< java.lang.String, java.lang.String > getStringMap(java.lang.String attribute)
attribute
Required
- Type: java.lang.String
name of the property to retrieve.
keys
public IResolvable keys()
Creates a for expression that maps the iterators to its keys.
For lists these would be the indices, for maps the keys.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
pluckProperty
public IResolvable pluckProperty(java.lang.String property)
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: java.lang.String
The property of the iterators values to map to.
values
public IResolvable values()
Creates a for expression that maps the iterators to its value in case it is a map.
For lists these would stay the same.
As this returns an IResolvable you might need to wrap the output in
a Token, e.g. Token.asString
.
Static Functions
Name | Description |
---|---|
fromComplexList | Creates a new iterator from a complex list. |
fromDataSources | Creates a new iterator from a data source that has been created with the for_each argument. |
fromList | Creates a new iterator from a list. |
fromMap | Creates a new iterator from a map. |
fromResources | Creates a new iterator from a resource that has been created with the for_each argument. |
fromComplexList
import com.hashicorp.cdktf.TerraformIterator;
TerraformIterator.fromComplexList(IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList list, java.lang.String mapKeyAttributeName)
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.
Object cert = AcmCertificate.Builder.create(this, "cert")
.domainName("example.com")
.validationMethod("DNS")
.build();
Object dvoIterator = TerraformIterator.fromComplexList(cert.getDomainValidationOptions(), "domain_name");
Route53Record.Builder.create(this, "record")
.allowOverwrite(true)
.name(dvoIterator.getString("name"))
.records(List.of(dvoIterator.getString("record")))
.ttl(60)
.type(dvoIterator.getString("type"))
.zoneId(Token.asString(dataAwsRoute53ZoneExample.getZoneId()))
.forEach(dvoIterator)
.build();
list
Required
- Type: IResolvable OR ComplexList OR StringMapList OR NumberMapList OR BooleanMapList OR AnyMapList
the list to iterate over.
mapKeyAttributeName
Required
- Type: java.lang.String
the name of the attribute that should be used as the key in the map.
Visit https://developer.hashicorp.com/terraform/cdktf/concepts/iterators#using-iterators-on-complex-lists for more information.
fromDataSources
import com.hashicorp.cdktf.TerraformIterator;
TerraformIterator.fromDataSources(ITerraformResource resource)
Creates a new iterator from a data source that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
fromList
import com.hashicorp.cdktf.TerraformIterator;
TerraformIterator.fromList(java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable > list)
Creates a new iterator from a list.
list
Required
- Type: java.util.List< java.lang.String > OR IResolvable OR java.util.List< java.lang.Number > OR java.util.List< java.lang.Boolean OR IResolvable>
fromMap
import com.hashicorp.cdktf.TerraformIterator;
TerraformIterator.fromMap(ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean > map)
Creates a new iterator from a map.
map
Required
- Type: ComplexMap OR java.util.Map< java.lang.String, java.lang.Object > OR java.util.Map< java.lang.String, java.lang.String > OR java.util.Map< java.lang.String, java.lang.Number > OR java.util.Map< java.lang.String, java.lang.Boolean >
fromResources
import com.hashicorp.cdktf.TerraformIterator;
TerraformIterator.fromResources(ITerraformResource resource)
Creates a new iterator from a resource that has been created with the for_each
argument.
resource
Required
- Type: ITerraformResource
TerraformResourceTargets
Initializers
import com.hashicorp.cdktf.TerraformResourceTargets;
new TerraformResourceTargets();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
addResourceTarget | No description. |
getResourceByTarget | No description. |
addResourceTarget
public void addResourceTarget(TerraformResource resource, java.lang.String target)
resource
Required
- Type: TerraformResource
target
Required
- Type: java.lang.String
getResourceByTarget
public TerraformResource getResourceByTarget(java.lang.String target)
target
Required
- Type: java.lang.String
TerraformSelf
Expressions in connection blocks cannot refer to their parent resource by name.
References create dependencies, and referring to a resource by name within its own block would create a dependency cycle. Instead, expressions can use the self object, which represents the connection's parent resource and has all of that resource's attributes. For example, use self.public_ip to reference an aws_instance's public_ip attribute.
Initializers
import com.hashicorp.cdktf.TerraformSelf;
new TerraformSelf();
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
getAny | Only usable within a connection block to reference the connections parent resource. |
getNumber | Only usable within a connection block to reference the connections parent resource. |
getString | Only usable within a connection block to reference the connections parent resource. |
getAny
import com.hashicorp.cdktf.TerraformSelf;
TerraformSelf.getAny(java.lang.String key)
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: java.lang.String
getNumber
import com.hashicorp.cdktf.TerraformSelf;
TerraformSelf.getNumber(java.lang.String key)
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: java.lang.String
getString
import com.hashicorp.cdktf.TerraformSelf;
TerraformSelf.getString(java.lang.String key)
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: java.lang.String
Testing
Testing utilities for cdktf applications.
Initializers
import com.hashicorp.cdktf.Testing;
new Testing();
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
app | Returns an app for testing with the following properties: - Output directory is a temp dir. |
enableFutureFlags | No description. |
fakeCdktfJsonPath | No description. |
fullSynth | No description. |
renderConstructTree | No description. |
setupJest | No description. |
stubVersion | No description. |
synth | Returns the Terraform synthesized JSON. |
synthHcl | Returns the Terraform synthesized JSON. |
synthScope | No description. |
toBeValidTerraform | No description. |
toHaveDataSource | No description. |
toHaveDataSourceWithProperties | No description. |
toHaveProvider | No description. |
toHaveProviderWithProperties | No description. |
toHaveResource | No description. |
toHaveResourceWithProperties | No description. |
app
import com.hashicorp.cdktf.Testing;
Testing.app(),Testing.app(TestingAppConfig options)
Returns an app for testing with the following properties: - Output directory is a temp dir.
options
Optional
- Type: TestingAppConfig
enableFutureFlags
import com.hashicorp.cdktf.Testing;
Testing.enableFutureFlags(App app)
app
Required
- Type: App
fakeCdktfJsonPath
import com.hashicorp.cdktf.Testing;
Testing.fakeCdktfJsonPath(App app)
app
Required
- Type: App
fullSynth
import com.hashicorp.cdktf.Testing;
Testing.fullSynth(TerraformStack stack)
stack
Required
- Type: TerraformStack
renderConstructTree
import com.hashicorp.cdktf.Testing;
Testing.renderConstructTree(IConstruct construct)
construct
Required
- Type: software.constructs.IConstruct
setupJest
import com.hashicorp.cdktf.Testing;
Testing.setupJest()
stubVersion
import com.hashicorp.cdktf.Testing;
Testing.stubVersion(App app)
app
Required
- Type: App
synth
import com.hashicorp.cdktf.Testing;
Testing.synth(TerraformStack stack),Testing.synth(TerraformStack stack, java.lang.Boolean runValidations)
Returns the Terraform synthesized JSON.
stack
Required
- Type: TerraformStack
runValidations
Optional
- Type: java.lang.Boolean
synthHcl
import com.hashicorp.cdktf.Testing;
Testing.synthHcl(TerraformStack stack),Testing.synthHcl(TerraformStack stack, java.lang.Boolean runValidations),Testing.synthHcl(TerraformStack stack, java.lang.Boolean runValidations, java.lang.Boolean returnMetadata)
Returns the Terraform synthesized JSON.
stack
Required
- Type: TerraformStack
runValidations
Optional
- Type: java.lang.Boolean
returnMetadata
Optional
- Type: java.lang.Boolean
synthScope
import com.hashicorp.cdktf.Testing;
Testing.synthScope(IScopeCallback fn)
fn
Required
- Type: IScopeCallback
toBeValidTerraform
import com.hashicorp.cdktf.Testing;
Testing.toBeValidTerraform(java.lang.String received)
received
Required
- Type: java.lang.String
toHaveDataSource
import com.hashicorp.cdktf.Testing;
Testing.toHaveDataSource(java.lang.String received, java.lang.String resourceType)
received
Required
- Type: java.lang.String
resourceType
Required
- Type: java.lang.String
toHaveDataSourceWithProperties
import com.hashicorp.cdktf.Testing;
Testing.toHaveDataSourceWithProperties(java.lang.String received, java.lang.String resourceType),Testing.toHaveDataSourceWithProperties(java.lang.String received, java.lang.String resourceType, java.util.Map< java.lang.String, java.lang.Object > properties)
received
Required
- Type: java.lang.String
resourceType
Required
- Type: java.lang.String
properties
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
toHaveProvider
import com.hashicorp.cdktf.Testing;
Testing.toHaveProvider(java.lang.String received, java.lang.String resourceType)
received
Required
- Type: java.lang.String
resourceType
Required
- Type: java.lang.String
toHaveProviderWithProperties
import com.hashicorp.cdktf.Testing;
Testing.toHaveProviderWithProperties(java.lang.String received, java.lang.String resourceType),Testing.toHaveProviderWithProperties(java.lang.String received, java.lang.String resourceType, java.util.Map< java.lang.String, java.lang.Object > properties)
received
Required
- Type: java.lang.String
resourceType
Required
- Type: java.lang.String
properties
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
toHaveResource
import com.hashicorp.cdktf.Testing;
Testing.toHaveResource(java.lang.String received, java.lang.String resourceType)
received
Required
- Type: java.lang.String
resourceType
Required
- Type: java.lang.String
toHaveResourceWithProperties
import com.hashicorp.cdktf.Testing;
Testing.toHaveResourceWithProperties(java.lang.String received, java.lang.String resourceType),Testing.toHaveResourceWithProperties(java.lang.String received, java.lang.String resourceType, java.util.Map< java.lang.String, java.lang.Object > properties)
received
Required
- Type: java.lang.String
resourceType
Required
- Type: java.lang.String
properties
Optional
- Type: java.util.Map< java.lang.String, java.lang.Object >
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 com.hashicorp.cdktf.Token;
new Token();
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
asAny | Return a resolvable representation of the given value. |
asAnyMap | Return a reversible map representation of this token. |
asBooleanMap | Return a reversible map representation of this token. |
asList | Return a reversible list representation of this token. |
asMap | Return a reversible map representation of this token. |
asNumber | Return a reversible number representation of this token. |
asNumberList | Return a reversible list representation of this token. |
asNumberMap | Return a reversible map representation of this token. |
asString | Return a reversible string representation of this token. |
asStringMap | Return a reversible map representation of this token. |
isUnresolved | Returns true if obj represents an unresolved value. |
nullValue | Return a Token containing a null value. |
asAny
import com.hashicorp.cdktf.Token;
Token.asAny(java.lang.Object value)
Return a resolvable representation of the given value.
value
Required
- Type: java.lang.Object
asAnyMap
import com.hashicorp.cdktf.Token;
Token.asAnyMap(java.lang.Object value),Token.asAnyMap(java.lang.Object value, EncodingOptions options)
Return a reversible map representation of this token.
value
Required
- Type: java.lang.Object
options
Optional
- Type: EncodingOptions
asBooleanMap
import com.hashicorp.cdktf.Token;
Token.asBooleanMap(java.lang.Object value),Token.asBooleanMap(java.lang.Object value, EncodingOptions options)
Return a reversible map representation of this token.
value
Required
- Type: java.lang.Object
options
Optional
- Type: EncodingOptions
asList
import com.hashicorp.cdktf.Token;
Token.asList(java.lang.Object value),Token.asList(java.lang.Object value, EncodingOptions options)
Return a reversible list representation of this token.
value
Required
- Type: java.lang.Object
options
Optional
- Type: EncodingOptions
asMap
import com.hashicorp.cdktf.Token;
Token.asMap(java.lang.Object value, java.lang.Object mapValue),Token.asMap(java.lang.Object value, java.lang.Object mapValue, EncodingOptions options)
Return a reversible map representation of this token.
value
Required
- Type: java.lang.Object
mapValue
Required
- Type: java.lang.Object
options
Optional
- Type: EncodingOptions
asNumber
import com.hashicorp.cdktf.Token;
Token.asNumber(java.lang.Object value)
Return a reversible number representation of this token.
value
Required
- Type: java.lang.Object
asNumberList
import com.hashicorp.cdktf.Token;
Token.asNumberList(java.lang.Object value)
Return a reversible list representation of this token.
value
Required
- Type: java.lang.Object
asNumberMap
import com.hashicorp.cdktf.Token;
Token.asNumberMap(java.lang.Object value),Token.asNumberMap(java.lang.Object value, EncodingOptions options)
Return a reversible map representation of this token.
value
Required
- Type: java.lang.Object
options
Optional
- Type: EncodingOptions
asString
import com.hashicorp.cdktf.Token;
Token.asString(java.lang.Object value),Token.asString(java.lang.Object value, EncodingOptions options)
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: java.lang.Object
options
Optional
- Type: EncodingOptions
asStringMap
import com.hashicorp.cdktf.Token;
Token.asStringMap(java.lang.Object value),Token.asStringMap(java.lang.Object value, EncodingOptions options)
Return a reversible map representation of this token.
value
Required
- Type: java.lang.Object
options
Optional
- Type: EncodingOptions
isUnresolved
import com.hashicorp.cdktf.Token;
Token.isUnresolved(java.lang.Object obj)
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: java.lang.Object
The object to test.
nullValue
import com.hashicorp.cdktf.Token;
Token.nullValue()
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 | java.lang.String | Any map token representation. |
NUMBER_MAP_TOKEN_VALUE | java.lang.Number | Number Map token value representation. |
STRING_MAP_TOKEN_VALUE | java.lang.String | String Map token value representation. |
ANY_MAP_TOKEN_VALUE
Required
public java.lang.String getAnyMapTokenValue();
- Type: java.lang.String
Any map token representation.
NUMBER_MAP_TOKEN_VALUE
Required
public java.lang.Number getNumberMapTokenValue();
- Type: java.lang.Number
Number Map token value representation.
STRING_MAP_TOKEN_VALUE
Required
public java.lang.String getStringMapTokenValue();
- Type: java.lang.String
String Map token value representation.
Tokenization
Less oft-needed functions to manipulate Tokens.
Initializers
import com.hashicorp.cdktf.Tokenization;
new Tokenization();
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
isResolvable | Return whether the given object is an IResolvable object. |
resolve | Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays. |
reverse | Reverse any value into Resolvables, if possible. |
reverseList | Un-encode a Tokenized value from a list. |
reverseMap | Un-encode a Tokenized value from a map. |
reverseNumber | Un-encode a Tokenized value from a number. |
reverseNumberList | Un-encode a Tokenized value from a list. |
reverseString | Un-encode a string potentially containing encoded tokens. |
stringifyNumber | Stringify a number directly or lazily if it's a Token. |
isResolvable
import com.hashicorp.cdktf.Tokenization;
Tokenization.isResolvable(java.lang.Object obj)
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: java.lang.Object
resolve
import com.hashicorp.cdktf.Tokenization;
Tokenization.resolve(java.lang.Object obj, ResolveOptions options)
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: java.lang.Object
The object to resolve.
options
Required
- Type: ResolveOptions
Prefix key path components for diagnostics.
reverse
import com.hashicorp.cdktf.Tokenization;
Tokenization.reverse(java.lang.Object x)
Reverse any value into Resolvables, if possible.
x
Required
- Type: java.lang.Object
reverseList
import com.hashicorp.cdktf.Tokenization;
Tokenization.reverseList(java.util.List< java.lang.String > l)
Un-encode a Tokenized value from a list.
l
Required
- Type: java.util.List< java.lang.String >
reverseMap
import com.hashicorp.cdktf.Tokenization;
Tokenization.reverseMap(java.util.Map< java.lang.String, java.lang.Object > m)
Un-encode a Tokenized value from a map.
m
Required
- Type: java.util.Map< java.lang.String, java.lang.Object >
reverseNumber
import com.hashicorp.cdktf.Tokenization;
Tokenization.reverseNumber(java.lang.Number n)
Un-encode a Tokenized value from a number.
n
Required
- Type: java.lang.Number
reverseNumberList
import com.hashicorp.cdktf.Tokenization;
Tokenization.reverseNumberList(java.util.List< java.lang.Number > l)
Un-encode a Tokenized value from a list.
l
Required
- Type: java.util.List< java.lang.Number >
reverseString
import com.hashicorp.cdktf.Tokenization;
Tokenization.reverseString(java.lang.String s)
Un-encode a string potentially containing encoded tokens.
s
Required
- Type: java.lang.String
stringifyNumber
import com.hashicorp.cdktf.Tokenization;
Tokenization.stringifyNumber(java.lang.Number x)
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: java.lang.Number
TokenizedStringFragments
Fragments of a concatenated string containing stringified Tokens.
Initializers
import com.hashicorp.cdktf.TokenizedStringFragments;
new TokenizedStringFragments();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
addEscape | No description. |
addIntrinsic | Adds an intrinsic fragment. |
addLiteral | Adds a literal fragment. |
addToken | Adds a token fragment. |
concat | No description. |
join | Combine the string fragments using the given joiner. |
mapTokens | Apply a transformation function to all tokens in the string. |
addEscape
public void addEscape(java.lang.String kind)
kind
Required
- Type: java.lang.String
addIntrinsic
public void addIntrinsic(java.lang.Object value)
Adds an intrinsic fragment.
value
Required
- Type: java.lang.Object
the intrinsic value to add.
addLiteral
public void addLiteral(java.lang.Object lit)
Adds a literal fragment.
lit
Required
- Type: java.lang.Object
the literal to add.
addToken
public void addToken(IResolvable token)
Adds a token fragment.
token
Required
- Type: IResolvable
the token to add.
concat
public void concat(TokenizedStringFragments other)
other
Required
- Type: TokenizedStringFragments
join
public java.lang.Object join(IFragmentConcatenator concat)
Combine the string fragments using the given joiner.
If there are any
concat
Required
- Type: IFragmentConcatenator
mapTokens
public TokenizedStringFragments mapTokens(IResolveContext context)
Apply a transformation function to all tokens in the string.
context
Required
- Type: IResolveContext
Properties
Name | Type | Description |
---|---|---|
escapes | java.util.List< IResolvable> | Return all escape fragments from this string. |
firstValue | java.lang.Object | Returns the first value. |
intrinsic | java.util.List< IResolvable> | Return all intrinsic fragments from this string. |
length | java.lang.Number | Returns the number of fragments. |
literals | java.util.List< IResolvable> | Return all literals from this string. |
tokens | java.util.List< IResolvable> | Return all Tokens from this string. |
firstToken | IResolvable | Returns the first token. |
escapes
Required
public java.util.List< IResolvable > getEscapes();
- Type: java.util.List< IResolvable>
Return all escape fragments from this string.
firstValue
Required
public java.lang.Object getFirstValue();
- Type: java.lang.Object
Returns the first value.
intrinsic
Required
public java.util.List< IResolvable > getIntrinsic();
- Type: java.util.List< IResolvable>
Return all intrinsic fragments from this string.
length
Required
public java.lang.Number getLength();
- Type: java.lang.Number
Returns the number of fragments.
literals
Required
public java.util.List< IResolvable > getLiterals();
- Type: java.util.List< IResolvable>
Return all literals from this string.
tokens
Required
public java.util.List< IResolvable > getTokens();
- Type: java.util.List< IResolvable>
Return all Tokens from this string.
firstToken
Optional
public IResolvable getFirstToken();
- Type: IResolvable
Returns the first token.
VariableType
Initializers
import com.hashicorp.cdktf.VariableType;
new 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 com.hashicorp.cdktf.VariableType;
VariableType.list(java.lang.String type)
type
Required
- Type: java.lang.String
map
import com.hashicorp.cdktf.VariableType;
VariableType.map(java.lang.String type)
type
Required
- Type: java.lang.String
object
import com.hashicorp.cdktf.VariableType;
VariableType.object(java.util.Map< java.lang.String, java.lang.String > attributes)
attributes
Required
- Type: java.util.Map< java.lang.String, java.lang.String >
set
import com.hashicorp.cdktf.VariableType;
VariableType.set(java.lang.String type)
type
Required
- Type: java.lang.String
tuple
import com.hashicorp.cdktf.VariableType;
VariableType.tuple(java.lang.String... elements)
elements
Required
- Type: java.lang.String...
Constants
Name | Type | Description |
---|---|---|
ANY | java.lang.String | No description. |
BOOL | java.lang.String | No description. |
LIST | java.lang.String | No description. |
LIST_BOOL | java.lang.String | No description. |
LIST_NUMBER | java.lang.String | No description. |
LIST_STRING | java.lang.String | No description. |
MAP | java.lang.String | No description. |
MAP_BOOL | java.lang.String | No description. |
MAP_NUMBER | java.lang.String | No description. |
MAP_STRING | java.lang.String | No description. |
NUMBER | java.lang.String | No description. |
SET | java.lang.String | No description. |
SET_BOOL | java.lang.String | No description. |
SET_NUMBER | java.lang.String | No description. |
SET_STRING | java.lang.String | No description. |
STRING | java.lang.String | No description. |
ANY
Required
public java.lang.String getAny();
- Type: java.lang.String
BOOL
Required
public java.lang.String getBool();
- Type: java.lang.String
LIST
Required
public java.lang.String getList();
- Type: java.lang.String
LIST_BOOL
Required
public java.lang.String getListBool();
- Type: java.lang.String
LIST_NUMBER
Required
public java.lang.String getListNumber();
- Type: java.lang.String
LIST_STRING
Required
public java.lang.String getListString();
- Type: java.lang.String
MAP
Required
public java.lang.String getMap();
- Type: java.lang.String
MAP_BOOL
Required
public java.lang.String getMapBool();
- Type: java.lang.String
MAP_NUMBER
Required
public java.lang.String getMapNumber();
- Type: java.lang.String
MAP_STRING
Required
public java.lang.String getMapString();
- Type: java.lang.String
NUMBER
Required
public java.lang.String getNumber();
- Type: java.lang.String
SET
Required
public java.lang.String getSet();
- Type: java.lang.String
SET_BOOL
Required
public java.lang.String getSetBool();
- Type: java.lang.String
SET_NUMBER
Required
public java.lang.String getSetNumber();
- Type: java.lang.String
SET_STRING
Required
public java.lang.String getSetString();
- Type: java.lang.String
STRING
Required
public java.lang.String getString();
- Type: java.lang.String