-
Notifications
You must be signed in to change notification settings - Fork 1
/
data.tf
51 lines (44 loc) · 1.6 KB
/
data.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Expects a single VPC in the account, and will fail if there are none or more than one.
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc
data "aws_vpc" "vpc" {}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets
data "aws_subnets" "subnets" {
filter {
name = "vpc-id"
values = [
data.aws_vpc.vpc.id,
]
}
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet
data "aws_subnet" "subnet_int_a" {
vpc_id = data.aws_vpc.vpc.id
availability_zone = "${data.aws_region.current.name}a"
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet
data "aws_subnet" "subnet_int_b" {
vpc_id = data.aws_vpc.vpc.id
availability_zone = "${data.aws_region.current.name}b"
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet
data "aws_subnet" "subnet_int_c" {
vpc_id = data.aws_vpc.vpc.id
availability_zone = "${data.aws_region.current.name}c"
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route_table
data "aws_route_table" "route_table" {
vpc_id = data.aws_vpc.vpc.id
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/internet_gateway
data "aws_internet_gateway" "igw" {
filter {
name = "attachment.vpc-id"
values = [
data.aws_vpc.vpc.id,
]
}
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/network_acls
data "aws_network_acls" "nacl" {
vpc_id = data.aws_vpc.vpc.id
}