User Tools

Site Tools


programming:variabletypeconstraints

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

programming:variabletypeconstraints [2024/07/01 10:13] – created kamaradskiprogramming: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 "vpc_cidr_block" { 
-  description = "CIDR block for the VPC" 
-  type        = string 
-} 
- 
-variable "availability_zones" { 
-  description = "List of availability zones" 
-  type        = list(string) 
-} 
- 
-variable "instance_tags" { 
-  description = "Map of tags to assign to the instance" 
-  type        = map(string) 
-} 
-</code> 
programming/variabletypeconstraints.1719828784.txt.gz · Last modified: 2024/07/01 10:13 by kamaradski