Package com.hashicorp.cdktf
Class TerraformVariableConfig.Builder
java.lang.Object
com.hashicorp.cdktf.TerraformVariableConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<TerraformVariableConfig>
- Enclosing interface:
TerraformVariableConfig
@Stability(Experimental)
public static final class TerraformVariableConfig.Builder
extends Object
implements software.amazon.jsii.Builder<TerraformVariableConfig>
A builder for
TerraformVariableConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.defaultValue
(Object defaultValue) Sets the value ofTerraformVariableConfig.getDefaultValue()
description
(String description) Sets the value ofTerraformVariableConfig.getDescription()
Sets the value ofTerraformVariableConfig.getNullable()
Sets the value ofTerraformVariableConfig.getSensitive()
Sets the value ofTerraformVariableConfig.getType()
validation
(List<? extends TerraformVariableValidationConfig> validation) Sets the value ofTerraformVariableConfig.getValidation()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaultValue
Sets the value ofTerraformVariableConfig.getDefaultValue()
- Parameters:
defaultValue
- the value to be set.- Returns:
this
-
description
Sets the value ofTerraformVariableConfig.getDescription()
- Parameters:
description
- the value to be set.- Returns:
this
-
nullable
Sets the value ofTerraformVariableConfig.getNullable()
- Parameters:
nullable
- the value to be set.- Returns:
this
-
sensitive
Sets the value ofTerraformVariableConfig.getSensitive()
- Parameters:
sensitive
- the value to be set.- Returns:
this
-
type
Sets the value ofTerraformVariableConfig.getType()
- Parameters:
type
- 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() * set( ) * map( ) * object({ = , ... }) * tuple([ , ...]) 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 invalid @link
{@link https://developer.hashicorp.com/terraform/language/expressions/type-constraints
- Returns:
this
-
validation
@Stability(Experimental) public TerraformVariableConfig.Builder validation(List<? extends TerraformVariableValidationConfig> validation) Sets the value ofTerraformVariableConfig.getValidation()
- Parameters:
validation
- Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<TerraformVariableConfig>
- Returns:
- a new instance of
TerraformVariableConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-