Created
February 2, 2018 13:01
-
-
Save geek182/4bd64e9d5f71faa33f36ef759679894f to your computer and use it in GitHub Desktop.
terraform-out-subnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
resource "aws_subnet" "public-subnet" { | |
count = "${length(split(",", lookup(var.azs, var.region)))}" | |
vpc_id = "${aws_vpc.main.id}" | |
cidr_block = "${cidrsubnet(var.vpc_cidr, 3,count.index +3 )}" | |
availability_zone = "${element(split(",", lookup(var.azs, var.region)), count.index)}" | |
map_public_ip_on_launch = true | |
tags { | |
Name = "Public-Subnet" | |
} | |
} | |
### | |
Terraform will perform the following actions: | |
+ aws_subnet.public-subnet[0] | |
id: <computed> | |
assign_ipv6_address_on_creation: "false" | |
availability_zone: "sa-east-1a" | |
cidr_block: "10.76.22.0/23" | |
ipv6_cidr_block: <computed> | |
ipv6_cidr_block_association_id: <computed> | |
map_public_ip_on_launch: "true" | |
tags.%: "1" | |
tags.Name: "Public-Subnet" | |
vpc_id: "vpc-xxxxxx" | |
+ aws_subnet.public-subnet[1] | |
id: <computed> | |
assign_ipv6_address_on_creation: "false" | |
availability_zone: " sa-east-1c" | |
cidr_block: "10.76.24.0/23" | |
ipv6_cidr_block: <computed> | |
ipv6_cidr_block_association_id: <computed> | |
map_public_ip_on_launch: "true" | |
tags.%: "1" | |
tags.Name: "Public-Subnet" | |
vpc_id: "vpc-xxxxxxx" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment