Skip to main content

Initializer

import io.cdktn.cdktn.TerraformVariableConfig;

TerraformVariableConfig.builder()
//  .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();

Properties

NameTypeDescription
defaultjava.lang.ObjectNo description.
descriptionjava.lang.StringNo description.
nullablejava.lang.BooleanNo description.
sensitivejava.lang.BooleanNo description.
typejava.lang.StringThe type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable.
validationjava.util.List<TerraformVariableValidationConfig>Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block.

defaultOptional

public java.lang.Object getDefault();
  • Type: java.lang.Object

descriptionOptional

public java.lang.String getDescription();
  • Type: java.lang.String

nullableOptional

public java.lang.Boolean getNullable();
  • Type: java.lang.Boolean

sensitiveOptional

public java.lang.Boolean getSensitive();
  • Type: java.lang.Boolean

typeOptional

public java.lang.String getType();
  • 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. 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:
  • string
  • number
  • bool
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

public java.util.List<TerraformVariableValidationConfig> getValidation();
Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block.