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)