Terraform
CSharp: 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
private void AddError(string Message)
Adds an { "error": < message > } metadata entry to this construct.
The toolkit will fail synthesis when errors are reported.
Message
Required
- Type: string
The error message.
AddInfo
private void AddInfo(string Message)
Adds an info metadata entry to this construct.
The CLI will display the info message when apps are synthesized.
Message
Required
- Type: string
The info message.
AddWarning
private void AddWarning(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: string
The warning message.
Static Functions
Name | Description |
---|---|
Of | Returns the annotations API for a construct scope. |
Of
using HashiCorp.Cdktf;
Annotations.Of(IConstruct Scope);
Returns the annotations API for a construct scope.
Scope
Required
- Type: Constructs.IConstruct
The scope.
AnyListList
Initializers
using HashiCorp.Cdktf;
new AnyListList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private DynamicListTerraformIterator AllWithMapKey(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: string
ComputeFqn
private string ComputeFqn()
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private IResolvable Get(double Index)
Index
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
AnyListMap
Initializers
using HashiCorp.Cdktf;
new AnyListMap(IInterpolatingParent TerraformResource, string TerraformAttribute);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: 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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private IResolvable Get(string Key)
Key
Required
- Type: string
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
AnyMap
- Implements: ITerraformAddressable, IResolvable
Initializers
using HashiCorp.Cdktf;
new AnyMap(IInterpolatingParent TerraformResource, string TerraformAttribute);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: 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
private string ComputeFqn()
Lookup
private object Lookup(string Key)
Key
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
AnyMapList
Initializers
using HashiCorp.Cdktf;
new AnyMapList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private AnyMap Get(double Index)
Index
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: 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
private 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
using HashiCorp.Cdktf;
Aspects.Of(IConstruct Scope);
Returns the Aspects
object associated with a construct scope.
Scope
Required
- Type: Constructs.IConstruct
The scope for which these aspects will apply.
Properties
All
Required
public IAspect[] All { get; }
- Type: IAspect[]
The list of aspects which were directly applied on this scope.
AssertionReturn
Class representing the contents of a return by an assertion.
Initializers
using HashiCorp.Cdktf;
new AssertionReturn(string Message, bool Pass);
Name | Type | Description |
---|---|---|
Message | string | - String message containing information about the result of the assertion. |
Pass | bool | - Boolean pass denoting the success of the assertion. |
Message
Required
- Type: string
String message containing information about the result of the assertion.
Pass
Required
- Type: bool
Boolean pass denoting the success of the assertion.
Properties
Name | Type | Description |
---|---|---|
Message | string | - String message containing information about the result of the assertion. |
Pass | bool | - Boolean pass denoting the success of the assertion. |
Message
Required
public string Message { get; }
- Type: string
String message containing information about the result of the assertion.
Pass
Required
public bool Pass { get; }
- Type: bool
Boolean pass denoting the success of the assertion.
BooleanList
Initializers
using HashiCorp.Cdktf;
new BooleanList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private DynamicListTerraformIterator AllWithMapKey(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: string
ComputeFqn
private string ComputeFqn()
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private IResolvable Get(double Index)
Index
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
BooleanListList
Initializers
using HashiCorp.Cdktf;
new BooleanListList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private DynamicListTerraformIterator AllWithMapKey(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: string
ComputeFqn
private string ComputeFqn()
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private IResolvable Get(double Index)
Index
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
BooleanListMap
Initializers
using HashiCorp.Cdktf;
new BooleanListMap(IInterpolatingParent TerraformResource, string TerraformAttribute);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: 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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private IResolvable Get(string Key)
Key
Required
- Type: string
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
BooleanMap
- Implements: ITerraformAddressable, IResolvable
Initializers
using HashiCorp.Cdktf;
new BooleanMap(IInterpolatingParent TerraformResource, string TerraformAttribute);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: 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
private string ComputeFqn()
Lookup
private IResolvable Lookup(string Key)
Key
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
BooleanMapList
Initializers
using HashiCorp.Cdktf;
new BooleanMapList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private BooleanMap Get(double Index)
Index
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
CloudWorkspace
A cloud workspace can either be a single named workspace, or a list of tagged workspaces.
Initializers
using HashiCorp.Cdktf;
new CloudWorkspace();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
ToTerraform | No description. |
ToTerraform
private object ToTerraform()
ComplexComputedList
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
using HashiCorp.Cdktf;
new ComplexComputedList(IInterpolatingParent TerraformResource, string TerraformAttribute, string ComplexComputedListIndex, bool WrapsSet = null);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
ComplexComputedListIndex | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
ComplexComputedListIndex
Required
- Type: string
WrapsSet
Optional
- Type: bool
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
private string ComputeFqn()
GetAnyMapAttribute
GetAnyMapAttribute
private System.Collections.Generic.IDictionary< string, object > GetAnyMapAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetBooleanAttribute
GetBooleanAttribute
private IResolvable GetBooleanAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetBooleanMapAttribute
GetBooleanMapAttribute
private System.Collections.Generic.IDictionary< string, bool > GetBooleanMapAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetListAttribute
GetListAttribute
private string[] GetListAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetNumberAttribute
GetNumberAttribute
private double GetNumberAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetNumberListAttribute
GetNumberListAttribute
private double[] GetNumberListAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetNumberMapAttribute
GetNumberMapAttribute
private System.Collections.Generic.IDictionary< string, double > GetNumberMapAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetStringAttribute
GetStringAttribute
private string GetStringAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetStringMapAttribute
GetStringMapAttribute
private System.Collections.Generic.IDictionary< string, string > GetStringMapAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
InterpolationForAttribute
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
CreationStack
- Deprecated: Going to be replaced by Array of ComplexListItem and will be removed in the future
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
ComplexList
- Implements: ITerraformAddressable, IResolvable
Initializers
using HashiCorp.Cdktf;
new ComplexList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private DynamicListTerraformIterator AllWithMapKey(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: string
ComputeFqn
private string ComputeFqn()
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
ComplexMap
- Implements: ITerraformAddressable, IResolvable
Initializers
using HashiCorp.Cdktf;
new ComplexMap(IInterpolatingParent TerraformResource, string TerraformAttribute);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: 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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
ComplexObject
- Implements: IInterpolatingParent, IResolvable, ITerraformAddressable
Initializers
using HashiCorp.Cdktf;
new ComplexObject(IInterpolatingParent TerraformResource, string TerraformAttribute, bool ComplexObjectIsFromSet, object ComplexObjectIndex = null);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
ComplexObjectIsFromSet | bool | set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items. |
ComplexObjectIndex | object | the index of the complex object in a list. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
ComplexObjectIsFromSet
Required
- Type: bool
set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items.
ComplexObjectIndex
Optional
- Type: object
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
private string ComputeFqn()
GetAnyMapAttribute
private System.Collections.Generic.IDictionary< string, object > GetAnyMapAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetBooleanAttribute
private IResolvable GetBooleanAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetBooleanMapAttribute
private System.Collections.Generic.IDictionary< string, bool > GetBooleanMapAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetListAttribute
private string[] GetListAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetNumberAttribute
private double GetNumberAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetNumberListAttribute
private double[] GetNumberListAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetNumberMapAttribute
private System.Collections.Generic.IDictionary< string, double > GetNumberMapAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetStringAttribute
private string GetStringAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
GetStringMapAttribute
private System.Collections.Generic.IDictionary< string, string > GetStringMapAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
DefaultTokenResolver
- Implements: ITokenResolver
Default resolver implementation.
Initializers
using HashiCorp.Cdktf;
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
private object ResolveList(string[] Xs, IResolveContext Context)
Resolves a list of string.
Xs
Required
- Type: string[]
Context
Required
- Type: IResolveContext
ResolveMap
private object ResolveMap(System.Collections.Generic.IDictionary< string, object > Xs, IResolveContext Context)
Resolves a map token.
Xs
Required
- Type: System.Collections.Generic.IDictionary< string, object >
Context
Required
- Type: IResolveContext
ResolveNumberList
private object ResolveNumberList(double[] Xs, IResolveContext Context)
Resolves a list of numbers.
Xs
Required
- Type: double[]
Context
Required
- Type: IResolveContext
ResolveString
private object ResolveString(TokenizedStringFragments Fragments, IResolveContext Context)
Resolve string fragments to Tokens.
Fragments
Required
- Type: TokenizedStringFragments
Context
Required
- Type: IResolveContext
ResolveToken
private 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
using HashiCorp.Cdktf;
new DynamicListTerraformIterator(object List, string MapKeyAttributeName);
Name | Type | Description |
---|---|---|
List | object | No description. |
MapKeyAttributeName | string | No description. |
List
Required
- Type: object
MapKeyAttributeName
Required
- Type: string
Methods
Name | Description |
---|---|
Dynamic | Creates a dynamic expression that can be used to loop over this iterator in a dynamic block. |
ForExpressionForList | Creates a for expression that results in a list. |
ForExpressionForMap | Creates a for expression that results in a map. |
GetAny | No description. |
GetAnyMap | No description. |
GetBoolean | No description. |
GetBooleanMap | No description. |
GetList | No description. |
GetMap | No description. |
GetNumber | No description. |
GetNumberList | No description. |
GetNumberMap | No description. |
GetString | No description. |
GetStringMap | No description. |
Keys | Creates a for expression that maps the iterators to its keys. |
PluckProperty | Creates a for expression that accesses the key on each element of the iterator. |
Values | Creates a for expression that maps the iterators to its value in case it is a map. |
Dynamic
private IResolvable Dynamic(System.Collections.Generic.IDictionary< string, 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: System.Collections.Generic.IDictionary< string, object >
ForExpressionForList
private IResolvable ForExpressionForList(object 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: object
The expression to use in the for mapping.
ForExpressionForMap
private IResolvable ForExpressionForMap(object KeyExpression, object 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: object
The expression to use as key in the for mapping.
ValueExpression
Required
- Type: object
The expression to use as value in the for mapping.
GetAny
private IResolvable GetAny(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetAnyMap
private System.Collections.Generic.IDictionary< string, object > GetAnyMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBoolean
private IResolvable GetBoolean(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBooleanMap
private System.Collections.Generic.IDictionary< string, bool > GetBooleanMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetList
private string[] GetList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetMap
private System.Collections.Generic.IDictionary< string, object > GetMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumber
private double GetNumber(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberList
private double[] GetNumberList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberMap
private System.Collections.Generic.IDictionary< string, double > GetNumberMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetString
private string GetString(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetStringMap
private System.Collections.Generic.IDictionary< string, string > GetStringMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
Keys
private 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
private IResolvable PluckProperty(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: string
The property of the iterators values to map to.
Values
private 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
using HashiCorp.Cdktf;
DynamicListTerraformIterator.FromComplexList(object List, 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.
var cert = new AcmCertificate(this, "cert", new Struct {
DomainName = "example.com",
ValidationMethod = "DNS"
});
var dvoIterator = TerraformIterator.FromComplexList(cert.DomainValidationOptions, "domain_name");
new Route53Record(this, "record", new Struct {
AllowOverwrite = true,
Name = dvoIterator.GetString("name"),
Records = new [] { dvoIterator.GetString("record") },
Ttl = 60,
Type = dvoIterator.GetString("type"),
ZoneId = Token.AsString(dataAwsRoute53ZoneExample.ZoneId),
ForEach = dvoIterator
});
List
Required
- Type: object
the list to iterate over.
MapKeyAttributeName
Required
- Type: 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
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
DynamicListTerraformIterator.FromList(object List);
Creates a new iterator from a list.
List
Required
- Type: object
FromMap
using HashiCorp.Cdktf;
DynamicListTerraformIterator.FromMap(object Map);
Creates a new iterator from a map.
Map
Required
- Type: object
FromResources
using HashiCorp.Cdktf;
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 | string | Returns the key of the current entry in the map that is being iterated over. |
Value | object | Returns the value of the current item iterated over. |
Key
Required
public string Key { get; }
- Type: string
Returns the key of the current entry in the map that is being iterated over.
Value
Required
public object Value { get; }
- Type: object
Returns the value of the current item iterated over.
Fn
Initializers
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
Fn.Abs(double 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: double
Abspath
using HashiCorp.Cdktf;
Fn.Abspath(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: string
Alltrue
using HashiCorp.Cdktf;
Fn.Alltrue(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: object[]
Anytrue
using HashiCorp.Cdktf;
Fn.Anytrue(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: object[]
Base64decode
using HashiCorp.Cdktf;
Fn.Base64decode(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: string
Base64encode
using HashiCorp.Cdktf;
Fn.Base64encode(string Str);
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
Str
Required
- Type: string
Base64gzip
using HashiCorp.Cdktf;
Fn.Base64gzip(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: string
Base64sha256
using HashiCorp.Cdktf;
Fn.Base64sha256(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: string
Base64sha512
using HashiCorp.Cdktf;
Fn.Base64sha512(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: string
Basename
using HashiCorp.Cdktf;
Fn.Basename(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: string
Can
using HashiCorp.Cdktf;
Fn.Can(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: object
Ceil
using HashiCorp.Cdktf;
Fn.Ceil(double 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: double
Chomp
using HashiCorp.Cdktf;
Fn.Chomp(string Str);
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
Str
Required
- Type: string
Chunklist
using HashiCorp.Cdktf;
Fn.Chunklist(object[] List, double 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: object[]
Size
Required
- Type: double
Cidrhost
using HashiCorp.Cdktf;
Fn.Cidrhost(string Prefix, double 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: string
Hostnum
Required
- Type: double
Cidrnetmask
using HashiCorp.Cdktf;
Fn.Cidrnetmask(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: string
Cidrsubnet
using HashiCorp.Cdktf;
Fn.Cidrsubnet(string Prefix, double Newbits, double Netnum);
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
Prefix
Required
- Type: string
Newbits
Required
- Type: double
Netnum
Required
- Type: double
Cidrsubnets
using HashiCorp.Cdktf;
Fn.Cidrsubnets(string Prefix, double[] 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: string
Newbits
Required
- Type: double[]
Coalesce
using HashiCorp.Cdktf;
Fn.Coalesce(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: object[]
Coalescelist
using HashiCorp.Cdktf;
Fn.Coalescelist(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: object[]
Compact
using HashiCorp.Cdktf;
Fn.Compact(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: string[]
Concat
using HashiCorp.Cdktf;
Fn.Concat(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: object[]
Contains
using HashiCorp.Cdktf;
Fn.Contains(object List, 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: object
Value
Required
- Type: object
Csvdecode
using HashiCorp.Cdktf;
Fn.Csvdecode(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: string
Dirname
using HashiCorp.Cdktf;
Fn.Dirname(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: string
Distinct
using HashiCorp.Cdktf;
Fn.Distinct(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: object[]
Element
using HashiCorp.Cdktf;
Fn.Element(object List, double Index);
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
List
Required
- Type: object
Index
Required
- Type: double
Endswith
using HashiCorp.Cdktf;
Fn.Endswith(string Str, 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: string
Suffix
Required
- Type: string
File
using HashiCorp.Cdktf;
Fn.File(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: string
Filebase64
using HashiCorp.Cdktf;
Fn.Filebase64(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: string
Filebase64sha256
using HashiCorp.Cdktf;
Fn.Filebase64sha256(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: string
Filebase64sha512
using HashiCorp.Cdktf;
Fn.Filebase64sha512(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: string
Fileexists
using HashiCorp.Cdktf;
Fn.Fileexists(string Path);
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
Path
Required
- Type: string
Filemd5
using HashiCorp.Cdktf;
Fn.Filemd5(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: string
Fileset
using HashiCorp.Cdktf;
Fn.Fileset(string Path, 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: string
Pattern
Required
- Type: string
Filesha1
using HashiCorp.Cdktf;
Fn.Filesha1(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: string
Filesha256
using HashiCorp.Cdktf;
Fn.Filesha256(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: string
Filesha512
using HashiCorp.Cdktf;
Fn.Filesha512(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: string
Flatten
using HashiCorp.Cdktf;
Fn.Flatten(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: object
Floor
using HashiCorp.Cdktf;
Fn.Floor(double 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: double
Format
using HashiCorp.Cdktf;
Fn.Format(string Format, 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: string
Args
Required
- Type: object[]
Formatdate
using HashiCorp.Cdktf;
Fn.Formatdate(string Format, string Time);
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
Format
Required
- Type: string
Time
Required
- Type: string
Formatlist
using HashiCorp.Cdktf;
Fn.Formatlist(string Format, 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: string
Args
Required
- Type: object[]
Indent
using HashiCorp.Cdktf;
Fn.Indent(double Spaces, 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: double
Str
Required
- Type: string
Index
using HashiCorp.Cdktf;
Fn.Index(object List, 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: object
Value
Required
- Type: object
Jsondecode
using HashiCorp.Cdktf;
Fn.Jsondecode(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: string
Jsonencode
using HashiCorp.Cdktf;
Fn.Jsonencode(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: object
Keys
using HashiCorp.Cdktf;
Fn.Keys(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: object
LengthOf
using HashiCorp.Cdktf;
Fn.LengthOf(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: object
Log
using HashiCorp.Cdktf;
Fn.Log(double Num, double 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: double
Base
Required
- Type: double
Lower
using HashiCorp.Cdktf;
Fn.Lower(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: string
Matchkeys
using HashiCorp.Cdktf;
Fn.Matchkeys(object[] Values, object[] Keys, 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: object[]
Keys
Required
- Type: object[]
Searchset
Required
- Type: object[]
Max
using HashiCorp.Cdktf;
Fn.Max(double[] 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: double[]
Md5
using HashiCorp.Cdktf;
Fn.Md5(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: string
Merge
using HashiCorp.Cdktf;
Fn.Merge(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: object[]
Min
using HashiCorp.Cdktf;
Fn.Min(double[] 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: double[]
Nonsensitive
using HashiCorp.Cdktf;
Fn.Nonsensitive(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: object
One
using HashiCorp.Cdktf;
Fn.One(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: object
Parseint
using HashiCorp.Cdktf;
Fn.Parseint(object Number, double 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: object
Base
Required
- Type: double
Pathexpand
using HashiCorp.Cdktf;
Fn.Pathexpand(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: string
Plantimestamp
using HashiCorp.Cdktf;
Fn.Plantimestamp();
{@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan.
Pow
using HashiCorp.Cdktf;
Fn.Pow(double Num, double 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: double
Power
Required
- Type: double
Regex
using HashiCorp.Cdktf;
Fn.Regex(string Pattern, 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: string
Str
Required
- Type: string
Regexall
using HashiCorp.Cdktf;
Fn.Regexall(string Pattern, 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: string
Str
Required
- Type: string
Replace
using HashiCorp.Cdktf;
Fn.Replace(string Str, string Substr, 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: string
Substr
Required
- Type: string
Replace
Required
- Type: string
Reverse
using HashiCorp.Cdktf;
Fn.Reverse(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: object
Rsadecrypt
using HashiCorp.Cdktf;
Fn.Rsadecrypt(string Ciphertext, string Privatekey);
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
Ciphertext
Required
- Type: string
Privatekey
Required
- Type: string
Sensitive
using HashiCorp.Cdktf;
Fn.Sensitive(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: object
Setintersection
using HashiCorp.Cdktf;
Fn.Setintersection(object[] FirstSet, object[][] OtherSets);
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.
FirstSet
Required
- Type: object[]
OtherSets
Required
- Type: object[][]
Setproduct
using HashiCorp.Cdktf;
Fn.Setproduct(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: object[]
Setsubtract
using HashiCorp.Cdktf;
Fn.Setsubtract(object[] A, 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: object[]
B
Required
- Type: object[]
Setunion
using HashiCorp.Cdktf;
Fn.Setunion(object[] FirstSet, object[][] OtherSets);
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.
FirstSet
Required
- Type: object[]
OtherSets
Required
- Type: object[][]
Sha1
using HashiCorp.Cdktf;
Fn.Sha1(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: string
Sha256
using HashiCorp.Cdktf;
Fn.Sha256(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: string
Sha512
using HashiCorp.Cdktf;
Fn.Sha512(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: string
Signum
using HashiCorp.Cdktf;
Fn.Signum(double 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: double
Slice
using HashiCorp.Cdktf;
Fn.Slice(object List, double StartIndex, double EndIndex);
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
List
Required
- Type: object
StartIndex
Required
- Type: double
EndIndex
Required
- Type: double
Sort
using HashiCorp.Cdktf;
Fn.Sort(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: string[]
Split
using HashiCorp.Cdktf;
Fn.Split(string Separator, 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: string
Str
Required
- Type: string
Startswith
using HashiCorp.Cdktf;
Fn.Startswith(string Str, 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: string
Prefix
Required
- Type: string
Strcontains
using HashiCorp.Cdktf;
Fn.Strcontains(string Str, 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: string
Substr
Required
- Type: string
Strrev
using HashiCorp.Cdktf;
Fn.Strrev(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: string
Substr
using HashiCorp.Cdktf;
Fn.Substr(string Str, double Offset, double 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: string
Offset
Required
- Type: double
Length
Required
- Type: double
Sum
using HashiCorp.Cdktf;
Fn.Sum(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: object
Templatefile
using HashiCorp.Cdktf;
Fn.Templatefile(string Path, 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: string
Vars
Required
- Type: object
Textdecodebase64
using HashiCorp.Cdktf;
Fn.Textdecodebase64(string Source, 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: string
Encoding
Required
- Type: string
Textencodebase64
using HashiCorp.Cdktf;
Fn.Textencodebase64(string Str, 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: string
Encoding
Required
- Type: string
Timeadd
using HashiCorp.Cdktf;
Fn.Timeadd(string Timestamp, 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: string
Duration
Required
- Type: string
Timecmp
using HashiCorp.Cdktf;
Fn.Timecmp(string TimestampA, string TimestampB);
{@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.
TimestampA
Required
- Type: string
TimestampB
Required
- Type: string
Timestamp
using HashiCorp.Cdktf;
Fn.Timestamp();
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
Title
using HashiCorp.Cdktf;
Fn.Title(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: string
Tobool
using HashiCorp.Cdktf;
Fn.Tobool(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
V
Required
- Type: object
Tolist
using HashiCorp.Cdktf;
Fn.Tolist(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
V
Required
- Type: object
Tomap
using HashiCorp.Cdktf;
Fn.Tomap(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
V
Required
- Type: object
Tonumber
using HashiCorp.Cdktf;
Fn.Tonumber(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
V
Required
- Type: object
Toset
using HashiCorp.Cdktf;
Fn.Toset(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
V
Required
- Type: object
Tostring
using HashiCorp.Cdktf;
Fn.Tostring(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
V
Required
- Type: object
Transpose
using HashiCorp.Cdktf;
Fn.Transpose(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: object
Trim
using HashiCorp.Cdktf;
Fn.Trim(string Str, 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: string
Cutset
Required
- Type: string
Trimprefix
using HashiCorp.Cdktf;
Fn.Trimprefix(string Str, 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: string
Prefix
Required
- Type: string
Trimspace
using HashiCorp.Cdktf;
Fn.Trimspace(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: string
Trimsuffix
using HashiCorp.Cdktf;
Fn.Trimsuffix(string Str, 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: string
Suffix
Required
- Type: string
Try
using HashiCorp.Cdktf;
Fn.Try(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: object[]
Upper
using HashiCorp.Cdktf;
Fn.Upper(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: string
Urlencode
using HashiCorp.Cdktf;
Fn.Urlencode(string Str);
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
Str
Required
- Type: string
Uuid
using HashiCorp.Cdktf;
Fn.Uuid();
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
Uuidv5
using HashiCorp.Cdktf;
Fn.Uuidv5(string Namespace, 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: string
Name
Required
- Type: string
Values
using HashiCorp.Cdktf;
Fn.Values(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: object
Yamldecode
using HashiCorp.Cdktf;
Fn.Yamldecode(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: string
Yamlencode
using HashiCorp.Cdktf;
Fn.Yamlencode(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: object
Zipmap
using HashiCorp.Cdktf;
Fn.Zipmap(string[] Keys, 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: string[]
Values
Required
- Type: object
Bcrypt
using HashiCorp.Cdktf;
Fn.Bcrypt(string Str, double Cost = null);
{@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: string
Cost
Optional
- Type: double
Conditional
using HashiCorp.Cdktf;
Fn.Conditional(object Condition, object TrueValue, 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: object
TrueValue
Required
- Type: object
FalseValue
Required
- Type: object
Join
using HashiCorp.Cdktf;
Fn.Join(string Separator, 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: string
List
Required
- Type: string[]
Lookup
using HashiCorp.Cdktf;
Fn.Lookup(object InputMap, string Key, object DefaultValue = null);
{@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: object
Key
Required
- Type: string
DefaultValue
Optional
- Type: object
LookupNested
using HashiCorp.Cdktf;
Fn.LookupNested(object InputMap, 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: object
Path
Required
- Type: object[]
Range
using HashiCorp.Cdktf;
Fn.Range(double Start, double Limit, double Step = null);
{@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: double
Limit
Required
- Type: double
Step
Optional
- Type: double
RawString
using HashiCorp.Cdktf;
Fn.RawString(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: string
FnGenerated
Initializers
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
FnGenerated.Abs(double 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: double
Abspath
using HashiCorp.Cdktf;
FnGenerated.Abspath(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: string
Alltrue
using HashiCorp.Cdktf;
FnGenerated.Alltrue(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: object[]
Anytrue
using HashiCorp.Cdktf;
FnGenerated.Anytrue(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: object[]
Base64decode
using HashiCorp.Cdktf;
FnGenerated.Base64decode(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: string
Base64encode
using HashiCorp.Cdktf;
FnGenerated.Base64encode(string Str);
{@link https://developer.hashicorp.com/terraform/language/functions/base64encode base64encode} applies Base64 encoding to a string.
Str
Required
- Type: string
Base64gzip
using HashiCorp.Cdktf;
FnGenerated.Base64gzip(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: string
Base64sha256
using HashiCorp.Cdktf;
FnGenerated.Base64sha256(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: string
Base64sha512
using HashiCorp.Cdktf;
FnGenerated.Base64sha512(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: string
Basename
using HashiCorp.Cdktf;
FnGenerated.Basename(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: string
Can
using HashiCorp.Cdktf;
FnGenerated.Can(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: object
Ceil
using HashiCorp.Cdktf;
FnGenerated.Ceil(double 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: double
Chomp
using HashiCorp.Cdktf;
FnGenerated.Chomp(string Str);
{@link https://developer.hashicorp.com/terraform/language/functions/chomp chomp} removes newline characters at the end of a string.
Str
Required
- Type: string
Chunklist
using HashiCorp.Cdktf;
FnGenerated.Chunklist(object[] List, double 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: object[]
Size
Required
- Type: double
Cidrhost
using HashiCorp.Cdktf;
FnGenerated.Cidrhost(string Prefix, double 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: string
Hostnum
Required
- Type: double
Cidrnetmask
using HashiCorp.Cdktf;
FnGenerated.Cidrnetmask(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: string
Cidrsubnet
using HashiCorp.Cdktf;
FnGenerated.Cidrsubnet(string Prefix, double Newbits, double Netnum);
{@link https://developer.hashicorp.com/terraform/language/functions/cidrsubnet cidrsubnet} calculates a subnet address within given IP network address prefix.
Prefix
Required
- Type: string
Newbits
Required
- Type: double
Netnum
Required
- Type: double
Cidrsubnets
using HashiCorp.Cdktf;
FnGenerated.Cidrsubnets(string Prefix, double[] 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: string
Newbits
Required
- Type: double[]
Coalesce
using HashiCorp.Cdktf;
FnGenerated.Coalesce(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: object[]
Coalescelist
using HashiCorp.Cdktf;
FnGenerated.Coalescelist(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: object[]
Compact
using HashiCorp.Cdktf;
FnGenerated.Compact(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: string[]
Concat
using HashiCorp.Cdktf;
FnGenerated.Concat(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: object[]
Contains
using HashiCorp.Cdktf;
FnGenerated.Contains(object List, 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: object
Value
Required
- Type: object
Csvdecode
using HashiCorp.Cdktf;
FnGenerated.Csvdecode(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: string
Dirname
using HashiCorp.Cdktf;
FnGenerated.Dirname(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: string
Distinct
using HashiCorp.Cdktf;
FnGenerated.Distinct(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: object[]
Element
using HashiCorp.Cdktf;
FnGenerated.Element(object List, double Index);
{@link https://developer.hashicorp.com/terraform/language/functions/element element} retrieves a single element from a list.
List
Required
- Type: object
Index
Required
- Type: double
Endswith
using HashiCorp.Cdktf;
FnGenerated.Endswith(string Str, 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: string
Suffix
Required
- Type: string
File
using HashiCorp.Cdktf;
FnGenerated.File(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: string
Filebase64
using HashiCorp.Cdktf;
FnGenerated.Filebase64(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: string
Filebase64sha256
using HashiCorp.Cdktf;
FnGenerated.Filebase64sha256(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: string
Filebase64sha512
using HashiCorp.Cdktf;
FnGenerated.Filebase64sha512(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: string
Fileexists
using HashiCorp.Cdktf;
FnGenerated.Fileexists(string Path);
{@link https://developer.hashicorp.com/terraform/language/functions/fileexists fileexists} determines whether a file exists at a given path.
Path
Required
- Type: string
Filemd5
using HashiCorp.Cdktf;
FnGenerated.Filemd5(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: string
Fileset
using HashiCorp.Cdktf;
FnGenerated.Fileset(string Path, 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: string
Pattern
Required
- Type: string
Filesha1
using HashiCorp.Cdktf;
FnGenerated.Filesha1(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: string
Filesha256
using HashiCorp.Cdktf;
FnGenerated.Filesha256(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: string
Filesha512
using HashiCorp.Cdktf;
FnGenerated.Filesha512(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: string
Flatten
using HashiCorp.Cdktf;
FnGenerated.Flatten(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: object
Floor
using HashiCorp.Cdktf;
FnGenerated.Floor(double 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: double
Format
using HashiCorp.Cdktf;
FnGenerated.Format(string Format, 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: string
Args
Required
- Type: object[]
Formatdate
using HashiCorp.Cdktf;
FnGenerated.Formatdate(string Format, string Time);
{@link https://developer.hashicorp.com/terraform/language/functions/formatdate formatdate} converts a timestamp into a different time format.
Format
Required
- Type: string
Time
Required
- Type: string
Formatlist
using HashiCorp.Cdktf;
FnGenerated.Formatlist(string Format, 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: string
Args
Required
- Type: object[]
Indent
using HashiCorp.Cdktf;
FnGenerated.Indent(double Spaces, 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: double
Str
Required
- Type: string
Index
using HashiCorp.Cdktf;
FnGenerated.Index(object List, 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: object
Value
Required
- Type: object
Jsondecode
using HashiCorp.Cdktf;
FnGenerated.Jsondecode(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: string
Jsonencode
using HashiCorp.Cdktf;
FnGenerated.Jsonencode(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: object
Keys
using HashiCorp.Cdktf;
FnGenerated.Keys(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: object
LengthOf
using HashiCorp.Cdktf;
FnGenerated.LengthOf(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: object
Log
using HashiCorp.Cdktf;
FnGenerated.Log(double Num, double 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: double
Base
Required
- Type: double
Lower
using HashiCorp.Cdktf;
FnGenerated.Lower(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: string
Matchkeys
using HashiCorp.Cdktf;
FnGenerated.Matchkeys(object[] Values, object[] Keys, 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: object[]
Keys
Required
- Type: object[]
Searchset
Required
- Type: object[]
Max
using HashiCorp.Cdktf;
FnGenerated.Max(double[] 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: double[]
Md5
using HashiCorp.Cdktf;
FnGenerated.Md5(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: string
Merge
using HashiCorp.Cdktf;
FnGenerated.Merge(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: object[]
Min
using HashiCorp.Cdktf;
FnGenerated.Min(double[] 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: double[]
Nonsensitive
using HashiCorp.Cdktf;
FnGenerated.Nonsensitive(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: object
One
using HashiCorp.Cdktf;
FnGenerated.One(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: object
Parseint
using HashiCorp.Cdktf;
FnGenerated.Parseint(object Number, double 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: object
Base
Required
- Type: double
Pathexpand
using HashiCorp.Cdktf;
FnGenerated.Pathexpand(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: string
Plantimestamp
using HashiCorp.Cdktf;
FnGenerated.Plantimestamp();
{@link https://developer.hashicorp.com/terraform/language/functions/plantimestamp plantimestamp} returns a UTC timestamp string in RFC 3339 format, fixed to a constant time representing the time of the plan.
Pow
using HashiCorp.Cdktf;
FnGenerated.Pow(double Num, double 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: double
Power
Required
- Type: double
Regex
using HashiCorp.Cdktf;
FnGenerated.Regex(string Pattern, 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: string
Str
Required
- Type: string
Regexall
using HashiCorp.Cdktf;
FnGenerated.Regexall(string Pattern, 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: string
Str
Required
- Type: string
Replace
using HashiCorp.Cdktf;
FnGenerated.Replace(string Str, string Substr, 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: string
Substr
Required
- Type: string
Replace
Required
- Type: string
Reverse
using HashiCorp.Cdktf;
FnGenerated.Reverse(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: object
Rsadecrypt
using HashiCorp.Cdktf;
FnGenerated.Rsadecrypt(string Ciphertext, string Privatekey);
{@link https://developer.hashicorp.com/terraform/language/functions/rsadecrypt rsadecrypt} decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
Ciphertext
Required
- Type: string
Privatekey
Required
- Type: string
Sensitive
using HashiCorp.Cdktf;
FnGenerated.Sensitive(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: object
Setintersection
using HashiCorp.Cdktf;
FnGenerated.Setintersection(object[] FirstSet, object[][] OtherSets);
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.
FirstSet
Required
- Type: object[]
OtherSets
Required
- Type: object[][]
Setproduct
using HashiCorp.Cdktf;
FnGenerated.Setproduct(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: object[]
Setsubtract
using HashiCorp.Cdktf;
FnGenerated.Setsubtract(object[] A, 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: object[]
B
Required
- Type: object[]
Setunion
using HashiCorp.Cdktf;
FnGenerated.Setunion(object[] FirstSet, object[][] OtherSets);
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.
FirstSet
Required
- Type: object[]
OtherSets
Required
- Type: object[][]
Sha1
using HashiCorp.Cdktf;
FnGenerated.Sha1(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: string
Sha256
using HashiCorp.Cdktf;
FnGenerated.Sha256(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: string
Sha512
using HashiCorp.Cdktf;
FnGenerated.Sha512(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: string
Signum
using HashiCorp.Cdktf;
FnGenerated.Signum(double 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: double
Slice
using HashiCorp.Cdktf;
FnGenerated.Slice(object List, double StartIndex, double EndIndex);
{@link https://developer.hashicorp.com/terraform/language/functions/slice slice} extracts some consecutive elements from within a list.
List
Required
- Type: object
StartIndex
Required
- Type: double
EndIndex
Required
- Type: double
Sort
using HashiCorp.Cdktf;
FnGenerated.Sort(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: string[]
Split
using HashiCorp.Cdktf;
FnGenerated.Split(string Separator, 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: string
Str
Required
- Type: string
Startswith
using HashiCorp.Cdktf;
FnGenerated.Startswith(string Str, 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: string
Prefix
Required
- Type: string
Strcontains
using HashiCorp.Cdktf;
FnGenerated.Strcontains(string Str, 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: string
Substr
Required
- Type: string
Strrev
using HashiCorp.Cdktf;
FnGenerated.Strrev(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: string
Substr
using HashiCorp.Cdktf;
FnGenerated.Substr(string Str, double Offset, double 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: string
Offset
Required
- Type: double
Length
Required
- Type: double
Sum
using HashiCorp.Cdktf;
FnGenerated.Sum(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: object
Templatefile
using HashiCorp.Cdktf;
FnGenerated.Templatefile(string Path, 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: string
Vars
Required
- Type: object
Textdecodebase64
using HashiCorp.Cdktf;
FnGenerated.Textdecodebase64(string Source, 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: string
Encoding
Required
- Type: string
Textencodebase64
using HashiCorp.Cdktf;
FnGenerated.Textencodebase64(string Str, 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: string
Encoding
Required
- Type: string
Timeadd
using HashiCorp.Cdktf;
FnGenerated.Timeadd(string Timestamp, 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: string
Duration
Required
- Type: string
Timecmp
using HashiCorp.Cdktf;
FnGenerated.Timecmp(string TimestampA, string TimestampB);
{@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.
TimestampA
Required
- Type: string
TimestampB
Required
- Type: string
Timestamp
using HashiCorp.Cdktf;
FnGenerated.Timestamp();
{@link https://developer.hashicorp.com/terraform/language/functions/timestamp timestamp} returns a UTC timestamp string in RFC 3339 format.
Title
using HashiCorp.Cdktf;
FnGenerated.Title(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: string
Tobool
using HashiCorp.Cdktf;
FnGenerated.Tobool(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tobool tobool} converts its argument to a boolean value.
V
Required
- Type: object
Tolist
using HashiCorp.Cdktf;
FnGenerated.Tolist(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tolist tolist} converts its argument to a list value.
V
Required
- Type: object
Tomap
using HashiCorp.Cdktf;
FnGenerated.Tomap(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tomap tomap} converts its argument to a map value.
V
Required
- Type: object
Tonumber
using HashiCorp.Cdktf;
FnGenerated.Tonumber(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tonumber tonumber} converts its argument to a number value.
V
Required
- Type: object
Toset
using HashiCorp.Cdktf;
FnGenerated.Toset(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/toset toset} converts its argument to a set value.
V
Required
- Type: object
Tostring
using HashiCorp.Cdktf;
FnGenerated.Tostring(object V);
{@link https://developer.hashicorp.com/terraform/language/functions/tostring tostring} converts its argument to a string value.
V
Required
- Type: object
Transpose
using HashiCorp.Cdktf;
FnGenerated.Transpose(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: object
Trim
using HashiCorp.Cdktf;
FnGenerated.Trim(string Str, 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: string
Cutset
Required
- Type: string
Trimprefix
using HashiCorp.Cdktf;
FnGenerated.Trimprefix(string Str, 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: string
Prefix
Required
- Type: string
Trimspace
using HashiCorp.Cdktf;
FnGenerated.Trimspace(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: string
Trimsuffix
using HashiCorp.Cdktf;
FnGenerated.Trimsuffix(string Str, 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: string
Suffix
Required
- Type: string
Try
using HashiCorp.Cdktf;
FnGenerated.Try(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: object[]
Upper
using HashiCorp.Cdktf;
FnGenerated.Upper(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: string
Urlencode
using HashiCorp.Cdktf;
FnGenerated.Urlencode(string Str);
{@link https://developer.hashicorp.com/terraform/language/functions/urlencode urlencode} applies URL encoding to a given string.
Str
Required
- Type: string
Uuid
using HashiCorp.Cdktf;
FnGenerated.Uuid();
{@link https://developer.hashicorp.com/terraform/language/functions/uuid uuid} generates a unique identifier string.
Uuidv5
using HashiCorp.Cdktf;
FnGenerated.Uuidv5(string Namespace, 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: string
Name
Required
- Type: string
Values
using HashiCorp.Cdktf;
FnGenerated.Values(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: object
Yamldecode
using HashiCorp.Cdktf;
FnGenerated.Yamldecode(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: string
Yamlencode
using HashiCorp.Cdktf;
FnGenerated.Yamlencode(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: object
Zipmap
using HashiCorp.Cdktf;
FnGenerated.Zipmap(string[] Keys, 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: string[]
Values
Required
- Type: 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
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
Lazy.AnyValue(IAnyProducer Producer, LazyAnyValueOptions Options = null);
Produces a lazy token from an untyped value.
Producer
Required
- Type: IAnyProducer
The lazy producer.
Options
Optional
- Type: LazyAnyValueOptions
Options.
ListValue
using HashiCorp.Cdktf;
Lazy.ListValue(IListProducer Producer, LazyListValueOptions Options = null);
Returns a list-ified token for a lazy value.
Producer
Required
- Type: IListProducer
The producer.
Options
Optional
- Type: LazyListValueOptions
Options.
NumberValue
using HashiCorp.Cdktf;
Lazy.NumberValue(INumberProducer Producer);
Returns a numberified token for a lazy value.
Producer
Required
- Type: INumberProducer
The producer.
StringValue
using HashiCorp.Cdktf;
Lazy.StringValue(IStringProducer Producer, LazyStringValueOptions Options = null);
Returns a stringified token for a lazy value.
Producer
Required
- Type: IStringProducer
The producer.
Options
Optional
- Type: LazyStringValueOptions
Options.
LazyBase
- Implements: IResolvable
Initializers
using HashiCorp.Cdktf;
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
private void AddPostProcessor(IPostProcessor PostProcessor)
PostProcessor
Required
- Type: IPostProcessor
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToJSON
private object ToJSON()
Turn this Token into JSON.
Called automatically when JSON.stringify() is called on a Token.
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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
using HashiCorp.Cdktf;
new ListTerraformIterator(object List);
Name | Type | Description |
---|---|---|
List | object | No description. |
List
Required
- Type: object
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
private IResolvable Dynamic(System.Collections.Generic.IDictionary< string, 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: System.Collections.Generic.IDictionary< string, object >
ForExpressionForList
private IResolvable ForExpressionForList(object 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: object
The expression to use in the for mapping.
ForExpressionForMap
private IResolvable ForExpressionForMap(object KeyExpression, object 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: object
The expression to use as key in the for mapping.
ValueExpression
Required
- Type: object
The expression to use as value in the for mapping.
GetAny
private IResolvable GetAny(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetAnyMap
private System.Collections.Generic.IDictionary< string, object > GetAnyMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBoolean
private IResolvable GetBoolean(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBooleanMap
private System.Collections.Generic.IDictionary< string, bool > GetBooleanMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetList
private string[] GetList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetMap
private System.Collections.Generic.IDictionary< string, object > GetMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumber
private double GetNumber(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberList
private double[] GetNumberList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberMap
private System.Collections.Generic.IDictionary< string, double > GetNumberMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetString
private string GetString(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetStringMap
private System.Collections.Generic.IDictionary< string, string > GetStringMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
Keys
private 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
private IResolvable PluckProperty(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: string
The property of the iterators values to map to.
Values
private 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
using HashiCorp.Cdktf;
ListTerraformIterator.FromComplexList(object List, 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.
var cert = new AcmCertificate(this, "cert", new Struct {
DomainName = "example.com",
ValidationMethod = "DNS"
});
var dvoIterator = TerraformIterator.FromComplexList(cert.DomainValidationOptions, "domain_name");
new Route53Record(this, "record", new Struct {
AllowOverwrite = true,
Name = dvoIterator.GetString("name"),
Records = new [] { dvoIterator.GetString("record") },
Ttl = 60,
Type = dvoIterator.GetString("type"),
ZoneId = Token.AsString(dataAwsRoute53ZoneExample.ZoneId),
ForEach = dvoIterator
});
List
Required
- Type: object
the list to iterate over.
MapKeyAttributeName
Required
- Type: 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
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
ListTerraformIterator.FromList(object List);
Creates a new iterator from a list.
List
Required
- Type: object
FromMap
using HashiCorp.Cdktf;
ListTerraformIterator.FromMap(object Map);
Creates a new iterator from a map.
Map
Required
- Type: object
FromResources
using HashiCorp.Cdktf;
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 | object | Returns the currently entry in the list or set that is being iterated over. |
Value | object | Returns the value of the current item iterated over. |
Key
Required
public object Key { get; }
- Type: 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 object Value { get; }
- Type: object
Returns the value of the current item iterated over.
Manifest
- Implements: IManifest
Initializers
using HashiCorp.Cdktf;
new Manifest(string Version, string Outdir, bool HclOutput);
Name | Type | Description |
---|---|---|
Version | string | No description. |
Outdir | string | No description. |
HclOutput | bool | No description. |
Version
Required
- Type: string
Outdir
Required
- Type: string
HclOutput
Required
- Type: bool
Methods
Name | Description |
---|---|
BuildManifest | No description. |
ForStack | No description. |
WriteToFile | No description. |
BuildManifest
private IManifest BuildManifest()
ForStack
private StackManifest ForStack(TerraformStack Stack)
Stack
Required
- Type: TerraformStack
WriteToFile
private void WriteToFile()
Properties
Name | Type | Description |
---|---|---|
HclOutput | bool | No description. |
Outdir | string | No description. |
StackFileName | string | No description. |
Stacks | System.Collections.Generic.IDictionary< string, StackManifest> | No description. |
Version | string | No description. |
HclOutput
Required
public bool HclOutput { get; }
- Type: bool
Outdir
Required
public string Outdir { get; }
- Type: string
StackFileName
Required
public string StackFileName { get; }
- Type: string
Stacks
Required
public System.Collections.Generic.IDictionary< string, StackManifest > Stacks { get; }
- Type: System.Collections.Generic.IDictionary< string, StackManifest>
Version
Required
public string Version { get; }
- Type: string
Constants
Name | Type | Description |
---|---|---|
FileName | string | No description. |
StackMetadataPath | string | No description. |
StacksFolder | string | No description. |
FileName
Required
public string FileName { get; }
- Type: string
StackMetadataPath
Required
public string StackMetadataPath { get; }
- Type: string
StacksFolder
Required
public string StacksFolder { get; }
- Type: string
MapList
- Implements: ITerraformAddressable, IInterpolatingParent, IResolvable
Initializers
using HashiCorp.Cdktf;
new MapList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
MapTerraformIterator
Initializers
using HashiCorp.Cdktf;
new MapTerraformIterator(object Map);
Name | Type | Description |
---|---|---|
Map | object | No description. |
Map
Required
- Type: object
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
private IResolvable Dynamic(System.Collections.Generic.IDictionary< string, 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: System.Collections.Generic.IDictionary< string, object >
ForExpressionForList
private IResolvable ForExpressionForList(object 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: object
The expression to use in the for mapping.
ForExpressionForMap
private IResolvable ForExpressionForMap(object KeyExpression, object 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: object
The expression to use as key in the for mapping.
ValueExpression
Required
- Type: object
The expression to use as value in the for mapping.
GetAny
private IResolvable GetAny(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetAnyMap
private System.Collections.Generic.IDictionary< string, object > GetAnyMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBoolean
private IResolvable GetBoolean(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBooleanMap
private System.Collections.Generic.IDictionary< string, bool > GetBooleanMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetList
private string[] GetList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetMap
private System.Collections.Generic.IDictionary< string, object > GetMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumber
private double GetNumber(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberList
private double[] GetNumberList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberMap
private System.Collections.Generic.IDictionary< string, double > GetNumberMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetString
private string GetString(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetStringMap
private System.Collections.Generic.IDictionary< string, string > GetStringMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
Keys
private 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
private IResolvable PluckProperty(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: string
The property of the iterators values to map to.
Values
private 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
using HashiCorp.Cdktf;
MapTerraformIterator.FromComplexList(object List, 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.
var cert = new AcmCertificate(this, "cert", new Struct {
DomainName = "example.com",
ValidationMethod = "DNS"
});
var dvoIterator = TerraformIterator.FromComplexList(cert.DomainValidationOptions, "domain_name");
new Route53Record(this, "record", new Struct {
AllowOverwrite = true,
Name = dvoIterator.GetString("name"),
Records = new [] { dvoIterator.GetString("record") },
Ttl = 60,
Type = dvoIterator.GetString("type"),
ZoneId = Token.AsString(dataAwsRoute53ZoneExample.ZoneId),
ForEach = dvoIterator
});
List
Required
- Type: object
the list to iterate over.
MapKeyAttributeName
Required
- Type: 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
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
MapTerraformIterator.FromList(object List);
Creates a new iterator from a list.
List
Required
- Type: object
FromMap
using HashiCorp.Cdktf;
MapTerraformIterator.FromMap(object Map);
Creates a new iterator from a map.
Map
Required
- Type: object
FromResources
using HashiCorp.Cdktf;
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 | string | Returns the key of the current entry in the map that is being iterated over. |
Value | object | Returns the value of the current item iterated over. |
Key
Required
public string Key { get; }
- Type: string
Returns the key of the current entry in the map that is being iterated over.
Value
Required
public object Value { get; }
- Type: 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
using HashiCorp.Cdktf;
new MigrateIds();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
Visit | All aspects can visit an IConstruct. |
Visit
private void Visit(IConstruct Node)
All aspects can visit an IConstruct.
Node
Required
- Type: Constructs.IConstruct
NamedCloudWorkspace
The name of a single Terraform Cloud workspace.
You will only be able to use the workspace specified in the configuration with this working directory, and cannot manage workspaces from the CLI (e.g. terraform workspace select or terraform workspace new).
Initializers
using HashiCorp.Cdktf;
new NamedCloudWorkspace(string Name, string Project = null);
Name
Required
- Type: string
Project
Optional
- Type: string
Methods
Name | Description |
---|---|
ToTerraform | No description. |
ToHclTerraform | No description. |
ToTerraform
private object ToTerraform()
ToHclTerraform
private object ToHclTerraform()
Properties
Name
Required
public string Name { get; }
- Type: string
Project
Optional
public string Project { get; }
- Type: string
NamedRemoteWorkspace
- Implements: IRemoteWorkspace
Initializers
using HashiCorp.Cdktf;
new NamedRemoteWorkspace(string Name);
Name | Type | Description |
---|---|---|
Name | string | No description. |
Name
Required
- Type: string
Properties
Name | Type | Description |
---|---|---|
Name | string | No description. |
Name
Required
public string Name { get; }
- Type: string
NumberListList
Initializers
using HashiCorp.Cdktf;
new NumberListList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private DynamicListTerraformIterator AllWithMapKey(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: string
ComputeFqn
private string ComputeFqn()
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private double[] Get(double Index)
Index
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
NumberListMap
Initializers
using HashiCorp.Cdktf;
new NumberListMap(IInterpolatingParent TerraformResource, string TerraformAttribute);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: 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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private double[] Get(string Key)
Key
Required
- Type: string
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
NumberMap
- Implements: ITerraformAddressable, IResolvable
Initializers
using HashiCorp.Cdktf;
new NumberMap(IInterpolatingParent TerraformResource, string TerraformAttribute);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: 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
private string ComputeFqn()
Lookup
private double Lookup(string Key)
Key
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
NumberMapList
Initializers
using HashiCorp.Cdktf;
new NumberMapList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private NumberMap Get(double Index)
Index
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
Op
This class contains static functions for all arithmetical and logical operators in the Terraform configuration language.
Initializers
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
Op.Add(object Left, object Right);
Renders left + right.
Left
Required
- Type: object
Right
Required
- Type: object
And
using HashiCorp.Cdktf;
Op.And(object Left, object Right);
Renders left && right.
Left
Required
- Type: object
Right
Required
- Type: object
Div
using HashiCorp.Cdktf;
Op.Div(object Left, object Right);
Renders left / right.
Left
Required
- Type: object
Right
Required
- Type: object
Eq
using HashiCorp.Cdktf;
Op.Eq(object Left, object Right);
Renders left == right.
Left
Required
- Type: object
Right
Required
- Type: object
Gt
using HashiCorp.Cdktf;
Op.Gt(object Left, object Right);
Renders left > right.
Left
Required
- Type: object
Right
Required
- Type: object
Gte
using HashiCorp.Cdktf;
Op.Gte(object Left, object Right);
Renders left >= right.
Left
Required
- Type: object
Right
Required
- Type: object
Lt
using HashiCorp.Cdktf;
Op.Lt(object Left, object Right);
Renders left < right.
Left
Required
- Type: object
Right
Required
- Type: object
Lte
using HashiCorp.Cdktf;
Op.Lte(object Left, object Right);
Renders left < = right.
Left
Required
- Type: object
Right
Required
- Type: object
Mod
using HashiCorp.Cdktf;
Op.Mod(object Left, object Right);
Renders left % right.
Left
Required
- Type: object
Right
Required
- Type: object
Mul
using HashiCorp.Cdktf;
Op.Mul(object Left, object Right);
Renders left * right.
Left
Required
- Type: object
Right
Required
- Type: object
Negate
using HashiCorp.Cdktf;
Op.Negate(object Expression);
Renders -expression.
Expression
Required
- Type: object
Neq
using HashiCorp.Cdktf;
Op.Neq(object Left, object Right);
Renders left != right.
Left
Required
- Type: object
Right
Required
- Type: object
Not
using HashiCorp.Cdktf;
Op.Not(object Expression);
Renders !expression.
Expression
Required
- Type: object
Or
using HashiCorp.Cdktf;
Op.Or(object Left, object Right);
Renders left || right.
Left
Required
- Type: object
Right
Required
- Type: object
Sub
using HashiCorp.Cdktf;
Op.Sub(object Left, object Right);
Renders left - right.
Left
Required
- Type: object
Right
Required
- Type: object
PrefixedRemoteWorkspaces
- Implements: IRemoteWorkspace
Initializers
using HashiCorp.Cdktf;
new PrefixedRemoteWorkspaces(string Prefix);
Name | Type | Description |
---|---|---|
Prefix | string | No description. |
Prefix
Required
- Type: string
Properties
Name | Type | Description |
---|---|---|
Prefix | string | No description. |
Prefix
Required
public string Prefix { get; }
- Type: string
ResourceTerraformIterator
Initializers
using HashiCorp.Cdktf;
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
private IResolvable Dynamic(System.Collections.Generic.IDictionary< string, 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: System.Collections.Generic.IDictionary< string, object >
ForExpressionForList
private IResolvable ForExpressionForList(object 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: object
The expression to use in the for mapping.
ForExpressionForMap
private IResolvable ForExpressionForMap(object KeyExpression, object 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: object
The expression to use as key in the for mapping.
ValueExpression
Required
- Type: object
The expression to use as value in the for mapping.
GetAny
private IResolvable GetAny(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetAnyMap
private System.Collections.Generic.IDictionary< string, object > GetAnyMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBoolean
private IResolvable GetBoolean(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBooleanMap
private System.Collections.Generic.IDictionary< string, bool > GetBooleanMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetList
private string[] GetList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetMap
private System.Collections.Generic.IDictionary< string, object > GetMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumber
private double GetNumber(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberList
private double[] GetNumberList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberMap
private System.Collections.Generic.IDictionary< string, double > GetNumberMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetString
private string GetString(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetStringMap
private System.Collections.Generic.IDictionary< string, string > GetStringMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
Keys
private 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
private IResolvable PluckProperty(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: string
The property of the iterators values to map to.
Values
private 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
using HashiCorp.Cdktf;
ResourceTerraformIterator.FromComplexList(object List, 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.
var cert = new AcmCertificate(this, "cert", new Struct {
DomainName = "example.com",
ValidationMethod = "DNS"
});
var dvoIterator = TerraformIterator.FromComplexList(cert.DomainValidationOptions, "domain_name");
new Route53Record(this, "record", new Struct {
AllowOverwrite = true,
Name = dvoIterator.GetString("name"),
Records = new [] { dvoIterator.GetString("record") },
Ttl = 60,
Type = dvoIterator.GetString("type"),
ZoneId = Token.AsString(dataAwsRoute53ZoneExample.ZoneId),
ForEach = dvoIterator
});
List
Required
- Type: object
the list to iterate over.
MapKeyAttributeName
Required
- Type: 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
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
ResourceTerraformIterator.FromList(object List);
Creates a new iterator from a list.
List
Required
- Type: object
FromMap
using HashiCorp.Cdktf;
ResourceTerraformIterator.FromMap(object Map);
Creates a new iterator from a map.
Map
Required
- Type: object
FromResources
using HashiCorp.Cdktf;
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 | object | Returns the current entry in the list or set that is being iterated over. |
Value | object | Returns the value of the current item iterated over. |
Key
Required
public object Key { get; }
- Type: 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 object Value { get; }
- Type: 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
using HashiCorp.Cdktf;
new StringConcat();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
Join | Concatenates string fragments. |
Join
private object Join(object Left, object Right)
Concatenates string fragments.
Left
Required
- Type: object
Right
Required
- Type: object
StringListList
Initializers
using HashiCorp.Cdktf;
new StringListList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private DynamicListTerraformIterator AllWithMapKey(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: string
ComputeFqn
private string ComputeFqn()
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private string[] Get(double Index)
Index
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
StringListMap
Initializers
using HashiCorp.Cdktf;
new StringListMap(IInterpolatingParent TerraformResource, string TerraformAttribute);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: 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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private string[] Get(string Key)
Key
Required
- Type: string
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
StringMap
- Implements: ITerraformAddressable, IResolvable
Initializers
using HashiCorp.Cdktf;
new StringMap(IInterpolatingParent TerraformResource, string TerraformAttribute);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: 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
private string ComputeFqn()
Lookup
private string Lookup(string Key)
Key
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: string
StringMapList
Initializers
using HashiCorp.Cdktf;
new StringMapList(IInterpolatingParent TerraformResource, string TerraformAttribute, bool WrapsSet);
Name | Type | Description |
---|---|---|
TerraformResource | IInterpolatingParent | No description. |
TerraformAttribute | string | No description. |
WrapsSet | bool | No description. |
TerraformResource
Required
- Type: IInterpolatingParent
TerraformAttribute
Required
- Type: string
WrapsSet
Required
- Type: bool
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
private string ComputeFqn()
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string Property)
Property
Required
- Type: string
Resolve
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
Return a string representation of this resolvable object.
Returns a reversible string representation.
Get
private StringMap Get(double Index)
Index
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
CreationStack | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
Fqn | string | No description. |
CreationStack
Required
public string[] CreationStack { get; }
- Type: 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 string Fqn { get; }
- Type: 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
using HashiCorp.Cdktf;
new TaggedCloudWorkspaces(string[] Tags, string Project = null);
Tags
Required
- Type: string[]
Project
Optional
- Type: string
Methods
Name | Description |
---|---|
ToTerraform | No description. |
ToHclTerraform | No description. |
ToTerraform
private object ToTerraform()
ToHclTerraform
private object ToHclTerraform()
Properties
Tags
Required
public string[] Tags { get; }
- Type: string[]
Project
Optional
public string Project { get; }
- Type: string
TerraformCount
Iterator for the Terraform count property.
Methods
Name | Description |
---|---|
ToString | No description. |
ToTerraform | No description. |
ToString
private string ToString()
ToTerraform
private double ToTerraform()
Static Functions
Name | Description |
---|---|
IsTerraformCount | No description. |
Of | No description. |
IsTerraformCount
using HashiCorp.Cdktf;
TerraformCount.IsTerraformCount(object X);
X
Required
- Type: object
Of
using HashiCorp.Cdktf;
TerraformCount.Of(double Count);
Count
Required
- Type: double
Properties
Name | Type | Description |
---|---|---|
Index | double | No description. |
Index
Required
public double Index { get; }
- Type: double
TerraformIterator
- Implements: ITerraformIterator
Initializers
using HashiCorp.Cdktf;
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
private IResolvable Dynamic(System.Collections.Generic.IDictionary< string, 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: System.Collections.Generic.IDictionary< string, object >
ForExpressionForList
private IResolvable ForExpressionForList(object 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: object
The expression to use in the for mapping.
ForExpressionForMap
private IResolvable ForExpressionForMap(object KeyExpression, object 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: object
The expression to use as key in the for mapping.
ValueExpression
Required
- Type: object
The expression to use as value in the for mapping.
GetAny
private IResolvable GetAny(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetAnyMap
private System.Collections.Generic.IDictionary< string, object > GetAnyMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBoolean
private IResolvable GetBoolean(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetBooleanMap
private System.Collections.Generic.IDictionary< string, bool > GetBooleanMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetList
private string[] GetList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetMap
private System.Collections.Generic.IDictionary< string, object > GetMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumber
private double GetNumber(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberList
private double[] GetNumberList(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetNumberMap
private System.Collections.Generic.IDictionary< string, double > GetNumberMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetString
private string GetString(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
GetStringMap
private System.Collections.Generic.IDictionary< string, string > GetStringMap(string Attribute)
Attribute
Required
- Type: string
name of the property to retrieve.
Keys
private 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
private IResolvable PluckProperty(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: string
The property of the iterators values to map to.
Values
private 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
using HashiCorp.Cdktf;
TerraformIterator.FromComplexList(object List, 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.
var cert = new AcmCertificate(this, "cert", new Struct {
DomainName = "example.com",
ValidationMethod = "DNS"
});
var dvoIterator = TerraformIterator.FromComplexList(cert.DomainValidationOptions, "domain_name");
new Route53Record(this, "record", new Struct {
AllowOverwrite = true,
Name = dvoIterator.GetString("name"),
Records = new [] { dvoIterator.GetString("record") },
Ttl = 60,
Type = dvoIterator.GetString("type"),
ZoneId = Token.AsString(dataAwsRoute53ZoneExample.ZoneId),
ForEach = dvoIterator
});
List
Required
- Type: object
the list to iterate over.
MapKeyAttributeName
Required
- Type: 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
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
TerraformIterator.FromList(object List);
Creates a new iterator from a list.
List
Required
- Type: object
FromMap
using HashiCorp.Cdktf;
TerraformIterator.FromMap(object Map);
Creates a new iterator from a map.
Map
Required
- Type: object
FromResources
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
new TerraformResourceTargets();
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
AddResourceTarget | No description. |
GetResourceByTarget | No description. |
AddResourceTarget
private void AddResourceTarget(TerraformResource Resource, string Target)
Resource
Required
- Type: TerraformResource
Target
Required
- Type: string
GetResourceByTarget
private TerraformResource GetResourceByTarget(string Target)
Target
Required
- Type: 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
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
TerraformSelf.GetAny(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: string
GetNumber
using HashiCorp.Cdktf;
TerraformSelf.GetNumber(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: string
GetString
using HashiCorp.Cdktf;
TerraformSelf.GetString(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: string
Testing
Testing utilities for cdktf applications.
Initializers
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
Testing.App(TestingAppConfig Options = null);
Returns an app for testing with the following properties: - Output directory is a temp dir.
Options
Optional
- Type: TestingAppConfig
EnableFutureFlags
using HashiCorp.Cdktf;
Testing.EnableFutureFlags(App App);
App
Required
- Type: App
FakeCdktfJsonPath
using HashiCorp.Cdktf;
Testing.FakeCdktfJsonPath(App App);
App
Required
- Type: App
FullSynth
using HashiCorp.Cdktf;
Testing.FullSynth(TerraformStack Stack);
Stack
Required
- Type: TerraformStack
RenderConstructTree
using HashiCorp.Cdktf;
Testing.RenderConstructTree(IConstruct Construct);
Construct
Required
- Type: Constructs.IConstruct
SetupJest
using HashiCorp.Cdktf;
Testing.SetupJest();
StubVersion
using HashiCorp.Cdktf;
Testing.StubVersion(App App);
App
Required
- Type: App
Synth
using HashiCorp.Cdktf;
Testing.Synth(TerraformStack Stack, bool RunValidations = null);
Returns the Terraform synthesized JSON.
Stack
Required
- Type: TerraformStack
RunValidations
Optional
- Type: bool
SynthHcl
using HashiCorp.Cdktf;
Testing.SynthHcl(TerraformStack Stack, bool RunValidations = null, bool ReturnMetadata = null);
Returns the Terraform synthesized JSON.
Stack
Required
- Type: TerraformStack
RunValidations
Optional
- Type: bool
ReturnMetadata
Optional
- Type: bool
SynthScope
using HashiCorp.Cdktf;
Testing.SynthScope(IScopeCallback Fn);
Fn
Required
- Type: IScopeCallback
ToBeValidTerraform
using HashiCorp.Cdktf;
Testing.ToBeValidTerraform(string Received);
Received
Required
- Type: string
ToHaveDataSource
using HashiCorp.Cdktf;
Testing.ToHaveDataSource(string Received, string ResourceType);
Received
Required
- Type: string
ResourceType
Required
- Type: string
ToHaveDataSourceWithProperties
using HashiCorp.Cdktf;
Testing.ToHaveDataSourceWithProperties(string Received, string ResourceType, System.Collections.Generic.IDictionary< string, object > Properties = null);
Received
Required
- Type: string
ResourceType
Required
- Type: string
Properties
Optional
- Type: System.Collections.Generic.IDictionary< string, object >
ToHaveProvider
using HashiCorp.Cdktf;
Testing.ToHaveProvider(string Received, string ResourceType);
Received
Required
- Type: string
ResourceType
Required
- Type: string
ToHaveProviderWithProperties
using HashiCorp.Cdktf;
Testing.ToHaveProviderWithProperties(string Received, string ResourceType, System.Collections.Generic.IDictionary< string, object > Properties = null);
Received
Required
- Type: string
ResourceType
Required
- Type: string
Properties
Optional
- Type: System.Collections.Generic.IDictionary< string, object >
ToHaveResource
using HashiCorp.Cdktf;
Testing.ToHaveResource(string Received, string ResourceType);
Received
Required
- Type: string
ResourceType
Required
- Type: string
ToHaveResourceWithProperties
using HashiCorp.Cdktf;
Testing.ToHaveResourceWithProperties(string Received, string ResourceType, System.Collections.Generic.IDictionary< string, object > Properties = null);
Received
Required
- Type: string
ResourceType
Required
- Type: string
Properties
Optional
- Type: System.Collections.Generic.IDictionary< string, 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
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
Token.AsAny(object Value);
Return a resolvable representation of the given value.
Value
Required
- Type: object
AsAnyMap
using HashiCorp.Cdktf;
Token.AsAnyMap(object Value, EncodingOptions Options = null);
Return a reversible map representation of this token.
Value
Required
- Type: object
Options
Optional
- Type: EncodingOptions
AsBooleanMap
using HashiCorp.Cdktf;
Token.AsBooleanMap(object Value, EncodingOptions Options = null);
Return a reversible map representation of this token.
Value
Required
- Type: object
Options
Optional
- Type: EncodingOptions
AsList
using HashiCorp.Cdktf;
Token.AsList(object Value, EncodingOptions Options = null);
Return a reversible list representation of this token.
Value
Required
- Type: object
Options
Optional
- Type: EncodingOptions
AsMap
using HashiCorp.Cdktf;
Token.AsMap(object Value, object MapValue, EncodingOptions Options = null);
Return a reversible map representation of this token.
Value
Required
- Type: object
MapValue
Required
- Type: object
Options
Optional
- Type: EncodingOptions
AsNumber
using HashiCorp.Cdktf;
Token.AsNumber(object Value);
Return a reversible number representation of this token.
Value
Required
- Type: object
AsNumberList
using HashiCorp.Cdktf;
Token.AsNumberList(object Value);
Return a reversible list representation of this token.
Value
Required
- Type: object
AsNumberMap
using HashiCorp.Cdktf;
Token.AsNumberMap(object Value, EncodingOptions Options = null);
Return a reversible map representation of this token.
Value
Required
- Type: object
Options
Optional
- Type: EncodingOptions
AsString
using HashiCorp.Cdktf;
Token.AsString(object Value, EncodingOptions Options = null);
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: object
Options
Optional
- Type: EncodingOptions
AsStringMap
using HashiCorp.Cdktf;
Token.AsStringMap(object Value, EncodingOptions Options = null);
Return a reversible map representation of this token.
Value
Required
- Type: object
Options
Optional
- Type: EncodingOptions
IsUnresolved
using HashiCorp.Cdktf;
Token.IsUnresolved(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: object
The object to test.
NullValue
using HashiCorp.Cdktf;
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 |
---|---|---|
AnyMapTokenValue | string | Any map token representation. |
NumberMapTokenValue | double | Number Map token value representation. |
StringMapTokenValue | string | String Map token value representation. |
AnyMapTokenValue
Required
public string AnyMapTokenValue { get; }
- Type: string
Any map token representation.
NumberMapTokenValue
Required
public double NumberMapTokenValue { get; }
- Type: double
Number Map token value representation.
StringMapTokenValue
Required
public string StringMapTokenValue { get; }
- Type: string
String Map token value representation.
Tokenization
Less oft-needed functions to manipulate Tokens.
Initializers
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
Tokenization.IsResolvable(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: object
Resolve
using HashiCorp.Cdktf;
Tokenization.Resolve(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: object
The object to resolve.
Options
Required
- Type: ResolveOptions
Prefix key path components for diagnostics.
Reverse
using HashiCorp.Cdktf;
Tokenization.Reverse(object X);
Reverse any value into Resolvables, if possible.
X
Required
- Type: object
ReverseList
using HashiCorp.Cdktf;
Tokenization.ReverseList(string[] L);
Un-encode a Tokenized value from a list.
L
Required
- Type: string[]
ReverseMap
using HashiCorp.Cdktf;
Tokenization.ReverseMap(System.Collections.Generic.IDictionary< string, object > M);
Un-encode a Tokenized value from a map.
M
Required
- Type: System.Collections.Generic.IDictionary< string, object >
ReverseNumber
using HashiCorp.Cdktf;
Tokenization.ReverseNumber(double N);
Un-encode a Tokenized value from a number.
N
Required
- Type: double
ReverseNumberList
using HashiCorp.Cdktf;
Tokenization.ReverseNumberList(double[] L);
Un-encode a Tokenized value from a list.
L
Required
- Type: double[]
ReverseString
using HashiCorp.Cdktf;
Tokenization.ReverseString(string S);
Un-encode a string potentially containing encoded tokens.
S
Required
- Type: string
StringifyNumber
using HashiCorp.Cdktf;
Tokenization.StringifyNumber(double 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: double
TokenizedStringFragments
Fragments of a concatenated string containing stringified Tokens.
Initializers
using HashiCorp.Cdktf;
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
private void AddEscape(string Kind)
Kind
Required
- Type: string
AddIntrinsic
private void AddIntrinsic(object Value)
Adds an intrinsic fragment.
Value
Required
- Type: object
the intrinsic value to add.
AddLiteral
private void AddLiteral(object Lit)
Adds a literal fragment.
Lit
Required
- Type: object
the literal to add.
AddToken
private void AddToken(IResolvable Token)
Adds a token fragment.
Token
Required
- Type: IResolvable
the token to add.
Concat
private void Concat(TokenizedStringFragments Other)
Other
Required
- Type: TokenizedStringFragments
Join
private object Join(IFragmentConcatenator Concat)
Combine the string fragments using the given joiner.
If there are any
Concat
Required
- Type: IFragmentConcatenator
MapTokens
private TokenizedStringFragments MapTokens(IResolveContext Context)
Apply a transformation function to all tokens in the string.
Context
Required
- Type: IResolveContext
Properties
Name | Type | Description |
---|---|---|
Escapes | IResolvable[] | Return all escape fragments from this string. |
FirstValue | object | Returns the first value. |
Intrinsic | IResolvable[] | Return all intrinsic fragments from this string. |
Length | double | Returns the number of fragments. |
Literals | IResolvable[] | Return all literals from this string. |
Tokens | IResolvable[] | Return all Tokens from this string. |
FirstToken | IResolvable | Returns the first token. |
Escapes
Required
public IResolvable[] Escapes { get; }
- Type: IResolvable[]
Return all escape fragments from this string.
FirstValue
Required
public object FirstValue { get; }
- Type: object
Returns the first value.
Intrinsic
Required
public IResolvable[] Intrinsic { get; }
- Type: IResolvable[]
Return all intrinsic fragments from this string.
Length
Required
public double Length { get; }
- Type: double
Returns the number of fragments.
Literals
Required
public IResolvable[] Literals { get; }
- Type: IResolvable[]
Return all literals from this string.
Tokens
Required
public IResolvable[] Tokens { get; }
- Type: IResolvable[]
Return all Tokens from this string.
FirstToken
Optional
public IResolvable FirstToken { get; }
- Type: IResolvable
Returns the first token.
VariableType
Initializers
using HashiCorp.Cdktf;
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
using HashiCorp.Cdktf;
VariableType.List(string Type);
Type
Required
- Type: string
Map
using HashiCorp.Cdktf;
VariableType.Map(string Type);
Type
Required
- Type: string
Object
using HashiCorp.Cdktf;
VariableType.Object(System.Collections.Generic.IDictionary< string, string > Attributes);
Attributes
Required
- Type: System.Collections.Generic.IDictionary< string, string >
Set
using HashiCorp.Cdktf;
VariableType.Set(string Type);
Type
Required
- Type: string
Tuple
using HashiCorp.Cdktf;
VariableType.Tuple(params string[] Elements);
Elements
Required
- Type: params string[]
Constants
Name | Type | Description |
---|---|---|
Any | string | No description. |
Bool | string | No description. |
List | string | No description. |
ListBool | string | No description. |
ListNumber | string | No description. |
ListString | string | No description. |
Map | string | No description. |
MapBool | string | No description. |
MapNumber | string | No description. |
MapString | string | No description. |
Number | string | No description. |
Set | string | No description. |
SetBool | string | No description. |
SetNumber | string | No description. |
SetString | string | No description. |
String | string | No description. |
Any
Required
public string Any { get; }
- Type: string
Bool
Required
public string Bool { get; }
- Type: string
List
Required
public string List { get; }
- Type: string
ListBool
Required
public string ListBool { get; }
- Type: string
ListNumber
Required
public string ListNumber { get; }
- Type: string
ListString
Required
public string ListString { get; }
- Type: string
Map
Required
public string Map { get; }
- Type: string
MapBool
Required
public string MapBool { get; }
- Type: string
MapNumber
Required
public string MapNumber { get; }
- Type: string
MapString
Required
public string MapString { get; }
- Type: string
Number
Required
public string Number { get; }
- Type: string
Set
Required
public string Set { get; }
- Type: string
SetBool
Required
public string SetBool { get; }
- Type: string
SetNumber
Required
public string SetNumber { get; }
- Type: string
SetString
Required
public string SetString { get; }
- Type: string
String
Required
public string String { get; }
- Type: string