This shows you the differences between two versions of the page.
| programming:variabletypeconstraints [2024/07/01 10:13] – created kamaradski | programming:variabletypeconstraints [2024/07/01 10:30] (current) – removed kamaradski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Variable Type Constraints ====== | ||
| - | You can specify the type of a variable to enforce that the provided value matches the expected type. | ||
| - | |||
| - | <code hcl> | ||
| - | variable " | ||
| - | description = "CIDR block for the VPC" | ||
| - | type = string | ||
| - | } | ||
| - | |||
| - | variable " | ||
| - | description = "List of availability zones" | ||
| - | type = list(string) | ||
| - | } | ||
| - | |||
| - | variable " | ||
| - | description = "Map of tags to assign to the instance" | ||
| - | type = map(string) | ||
| - | } | ||
| - | </ | ||