Skip to main content
Add one or more validation blocks within the variable block to specify custom conditions.

Initializer

import io.cdktn.cdktn.TerraformVariableValidationConfig;

TerraformVariableValidationConfig.builder()
    .condition(java.lang.Object)
    .errorMessage(java.lang.String)
    .build();

Properties

NameTypeDescription
conditionjava.lang.ObjectThis is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.
errorMessagejava.lang.StringThis contains the text that Terraform will include as part of error messages when it detects an unmet condition.

conditionRequired

public java.lang.Object getCondition();
  • Type: java.lang.Object
This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.

errorMessageRequired

public java.lang.String getErrorMessage();
  • Type: java.lang.String
This contains the text that Terraform will include as part of error messages when it detects an unmet condition.