Easy
In the following code :
variable "vpc_cidrs" {
type = map
default = {
us-east-1 = "10.0.0.0/16"
us-east-2 = "10.1.0.0/16"
us-west-1 = "10.2.0.0/16"
us-west-2 = "10.3.0.0/16"
}
}
resource "aws_vpc" "shared" {
cidr_block = _____________
}
How to define the cidr_block
for the region us-east-1
in the aws_vpc.shared
resource, using the vpc_cidrs
variable ?
Author: Julien WITTOUCKStatus: PublishedQuestion passed 27 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
2
How to use a local variable in a Terraform resource declaration?1
How to use variables defined in a file when creating an execution plan in Terraform?0
What Terraform command line parameter controls the number of operations performed simultaneously during a `terraform apply`?0
Which provider versions is Terraform allowed to install?0
How to reuse the same code to initialize several environments with different variable values, and different states in Terraform?0
What happens if an error occurs when executing `terraform apply`?0
What are the valid type statements in Terraform?