Documentation Index
Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Initializers
import io.cdktn.cdktn.TerraformVariable;
TerraformVariable.Builder.create(Construct scope, java.lang.String id)
// .default(java.lang.Object)
// .description(java.lang.String)
// .nullable(java.lang.Boolean)
// .sensitive(java.lang.Boolean)
// .type(java.lang.String)
// .validation(java.util.List<TerraformVariableValidationConfig>)
.build();
| Name | Type | Description |
|---|
scope | software.constructs.Construct | No description. |
id | java.lang.String | No description. |
default | java.lang.Object | No description. |
description | java.lang.String | No description. |
nullable | java.lang.Boolean | No description. |
sensitive | java.lang.Boolean | No description. |
type | java.lang.String | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. |
validation | java.util.List<TerraformVariableValidationConfig> | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. |
scopeRequired
- Type: software.constructs.Construct
idRequired
defaultOptional
descriptionOptional
nullableOptional
sensitiveOptional
typeOptional
The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable.
If no type constraint is set then a value of any type is accepted.
While type constraints are optional, we recommend specifying them; they serve as easy reminders for users of the module, and allow Terraform to return a helpful error message if the wrong type is used.
Type constraints are created from a mixture of type keywords and type constructors. The supported type keywords are:
The type constructors allow you to specify complex types such as collections:
- list(< TYPE >)
- set(< TYPE >)
- map(< TYPE >)
- object({< ATTR NAME > = < TYPE >, … })
- tuple([< TYPE >, …])
The keyword any may be used to indicate that any type is acceptable. For more information on the meaning and behavior of these different types, as well as detailed information about automatic conversion of complex types, refer to Type Constraints.
If both the type and default arguments are specified, the given default value must be convertible to the specified type.
validationOptional
Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block.
Methods
| Name | Description |
|---|
toString | Returns a string representation of this construct. |
addOverride | No description. |
overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
toHclTerraform | No description. |
toMetadata | No description. |
toTerraform | No description. |
addValidation | No description. |
synthesizeAttributes | No description. |
synthesizeHclAttributes | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addOverride
public void addOverride(java.lang.String path, java.lang.Object value)
pathRequired
valueRequired
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
The new logical ID to use for this stack element.
resetOverrideLogicalId
public void resetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
public java.lang.Object toHclTerraform()
public java.lang.Object toMetadata()
public java.lang.Object toTerraform()
addValidation
public void addValidation(TerraformVariableValidationConfig validation)
validationRequired
synthesizeAttributes
public java.util.Map<java.lang.String, java.lang.Object> synthesizeAttributes()
synthesizeHclAttributes
public java.util.Map<java.lang.String, java.lang.Object> synthesizeHclAttributes()
Static Functions
| Name | Description |
|---|
isConstruct | Checks if x is a construct. |
isTerraformElement | No description. |
isConstruct
import io.cdktn.cdktn.TerraformVariable;
TerraformVariable.isConstruct(java.lang.Object x)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired
Any object.
import io.cdktn.cdktn.TerraformVariable;
TerraformVariable.isTerraformElement(java.lang.Object x)
xRequired
Properties
| Name | Type | Description |
|---|
node | software.constructs.Node | The tree node. |
cdktfStack | TerraformStack | No description. |
fqn | java.lang.String | No description. |
friendlyUniqueId | java.lang.String | No description. |
booleanValue | IResolvable | No description. |
listValue | java.util.List< java.lang.String > | No description. |
numberValue | java.lang.Number | No description. |
stringValue | java.lang.String | No description. |
value | java.lang.Object | No description. |
default | java.lang.Object | No description. |
description | java.lang.String | No description. |
nullable | java.lang.Boolean | No description. |
sensitive | java.lang.Boolean | No description. |
type | java.lang.String | No description. |
validation | java.util.List<TerraformVariableValidationConfig> | No description. |
nodeRequired
- Type: software.constructs.Node
The tree node.
cdktfStackRequired
public TerraformStack getCdktfStack();
fqnRequired
public java.lang.String getFqn();
friendlyUniqueIdRequired
public java.lang.String getFriendlyUniqueId();
booleanValueRequired
public IResolvable getBooleanValue();
listValueRequired
public java.util.List<java.lang.String> getListValue();
- Type: java.util.List< java.lang.String >
numberValueRequired
public java.lang.Number getNumberValue();
stringValueRequired
public java.lang.String getStringValue();
valueRequired
public java.lang.Object getValue();
defaultOptional
public java.lang.Object getDefault();
descriptionOptional
public java.lang.String getDescription();
nullableOptional
public java.lang.Boolean getNullable();
sensitiveOptional
public java.lang.Boolean getSensitive();
typeOptional
public java.lang.String getType();
validationOptional
public java.util.List<TerraformVariableValidationConfig> getValidation();