This shows you the differences between two versions of the page.
| programming:variablevalidation [2024/07/01 10:24] – created kamaradski | programming:variablevalidation [2024/07/01 10:32] (current) – removed kamaradski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Variable Validation ====== | ||
| - | You can add validation rules to ensure that input values meet certain criteria. | ||
| - | |||
| - | <code hcl> | ||
| - | variable " | ||
| - | description = "Type of EC2 instance" | ||
| - | type = string | ||
| - | default | ||
| - | |||
| - | validation { | ||
| - | condition | ||
| - | error_message = " | ||
| - | } | ||
| - | } | ||
| - | </ | ||