Reference documentation and code samples for the Google Cloud Design Center V1 Client class TerraformVariableValidation.
Represents a custom validation rule defined on a Terraform input variable.
Generated from protobuf message google.cloud.designcenter.v1.TerraformVariableValidation
Namespace
Google \ Cloud \ DesignCenter \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ condition |
string
Optional. The HCL expression for the validation condition (e.g., "length(var.image_id) > 4"). |
↳ error_message |
string
Optional. The error message displayed when the condition is false. |
getCondition
Optional. The HCL expression for the validation condition (e.g., "length(var.image_id) > 4").
| Returns | |
|---|---|
| Type | Description |
string |
|
setCondition
Optional. The HCL expression for the validation condition (e.g., "length(var.image_id) > 4").
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getErrorMessage
Optional. The error message displayed when the condition is false.
| Returns | |
|---|---|
| Type | Description |
string |
|
setErrorMessage
Optional. The error message displayed when the condition is false.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|