forked from wardviaene/terraform-course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault_vpc.tf
33 lines (28 loc) · 852 Bytes
/
default_vpc.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# these resources are added to provide the vpc_id and subnets to the consul module
# aws_default_* are resources that terraform doesn't creat, rather adopt
# See https://www.terraform.io/docs/providers/aws/r/default_vpc.html for more info
# default VPC
resource "aws_default_vpc" "default" {
tags {
Name = "Default VPC"
}
}
# default subnets
resource "aws_default_subnet" "default_az1" {
availability_zone = "${var.AWS_REGION}a"
tags {
Name = "Default subnet for ${var.AWS_REGION}a"
}
}
resource "aws_default_subnet" "default_az2" {
availability_zone = "${var.AWS_REGION}b"
tags {
Name = "Default subnet for ${var.AWS_REGION}b"
}
}
resource "aws_default_subnet" "default_az3" {
availability_zone = "${var.AWS_REGION}c"
tags {
Name = "Default subnet for ${var.AWS_REGION}c"
}
}