give everything a name.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
resource "aws_internet_gateway" "test-env-gw" {
|
resource "aws_internet_gateway" "test-env-gw" {
|
||||||
|
tags = {
|
||||||
|
"Name" = "tf-gateway-test-env"
|
||||||
|
}
|
||||||
|
|
||||||
vpc_id = "${aws_vpc.test-env.id}"
|
vpc_id = "${aws_vpc.test-env.id}"
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,18 @@
|
|||||||
resource "aws_vpc" "test-env" {
|
resource "aws_vpc" "test-env" {
|
||||||
|
tags = {
|
||||||
|
"Name" = "tf-vpc-test-env"
|
||||||
|
}
|
||||||
|
|
||||||
cidr_block = "10.0.0.0/16"
|
cidr_block = "10.0.0.0/16"
|
||||||
enable_dns_hostnames = true
|
enable_dns_hostnames = true
|
||||||
enable_dns_support = true
|
enable_dns_support = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_eip" "ip-test-env" {
|
resource "aws_eip" "ip-test-env" {
|
||||||
|
tags = {
|
||||||
|
"Name" = "tf-EIP-IP-test-env"
|
||||||
|
}
|
||||||
|
|
||||||
instance = "${aws_instance.app_server.id}"
|
instance = "${aws_instance.app_server.id}"
|
||||||
vpc = true
|
vpc = true
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
resource "aws_security_group" "ingress-all-test" {
|
resource "aws_security_group" "ingress-all-test" {
|
||||||
name = "allow-all-sg"
|
name = "allow-all-sg"
|
||||||
|
tags = {
|
||||||
|
"Name" = "tf-allow-all-sg"
|
||||||
|
}
|
||||||
vpc_id = "${aws_vpc.test-env.id}"
|
vpc_id = "${aws_vpc.test-env.id}"
|
||||||
ingress {
|
ingress {
|
||||||
cidr_blocks = [
|
cidr_blocks = [
|
||||||
|
|||||||
@@ -1,10 +1,18 @@
|
|||||||
resource "aws_subnet" "subnet-uno" {
|
resource "aws_subnet" "subnet-uno" {
|
||||||
|
tags = {
|
||||||
|
"Name" = "tf-subnet-uno"
|
||||||
|
}
|
||||||
|
|
||||||
cidr_block = "${cidrsubnet(aws_vpc.test-env.cidr_block, 3, 1)}"
|
cidr_block = "${cidrsubnet(aws_vpc.test-env.cidr_block, 3, 1)}"
|
||||||
vpc_id = "${aws_vpc.test-env.id}"
|
vpc_id = "${aws_vpc.test-env.id}"
|
||||||
availability_zone = "us-west-2a"
|
availability_zone = "us-west-2a"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_route_table" "route-table-test-env" {
|
resource "aws_route_table" "route-table-test-env" {
|
||||||
|
tags = {
|
||||||
|
"Name" = "tf-route-table-test-env"
|
||||||
|
}
|
||||||
|
|
||||||
vpc_id = "${aws_vpc.test-env.id}"
|
vpc_id = "${aws_vpc.test-env.id}"
|
||||||
route {
|
route {
|
||||||
cidr_block = "0.0.0.0/0"
|
cidr_block = "0.0.0.0/0"
|
||||||
|
|||||||
Reference in New Issue
Block a user