forked from terraform-aws-modules/terraform-aws-vpc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutputs.tf
116 lines (95 loc) · 3.3 KB
/
outputs.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# VPC
output "vpc_id" {
description = "The ID of the VPC"
value = "${aws_vpc.this.id}"
}
output "vpc_cidr_block" {
description = "The CIDR block of the VPC"
value = "${aws_vpc.this.cidr_block}"
}
output "default_security_group_id" {
description = "The ID of the security group created by default on VPC creation"
value = "${aws_vpc.this.default_security_group_id}"
}
output "default_network_acl_id" {
description = "The ID of the default network ACL"
value = "${aws_vpc.this.default_network_acl_id}"
}
output "default_route_table_id" {
description = "The ID of the default route table"
value = "${aws_vpc.this.default_route_table_id}"
}
# Subnets
output "private_subnets" {
description = "List of IDs of private subnets"
value = ["${aws_subnet.private.*.id}"]
}
output "private_subnets_cidr_blocks" {
description = "List of cidr_blocks of private subnets"
value = ["${aws_subnet.private.*.cidr_block}"]
}
output "public_subnets" {
description = "List of IDs of public subnets"
value = ["${aws_subnet.public.*.id}"]
}
output "public_subnets_cidr_blocks" {
description = "List of cidr_blocks of public subnets"
value = ["${aws_subnet.public.*.cidr_block}"]
}
# Route tables
output "public_route_table_ids" {
description = "List of IDs of public route tables"
value = ["${aws_route_table.public.*.id}"]
}
output "private_route_table_ids" {
description = "List of IDs of private route tables"
value = ["${aws_route_table.private.*.id}"]
}
output "nat_ids" {
description = "List of allocation ID of Elastic IPs created for AWS NAT Gateway"
value = ["${aws_eip.nat.*.id}"]
}
output "nat_public_ips" {
description = "List of public Elastic IPs created for AWS NAT Gateway"
value = ["${aws_eip.nat.*.public_ip}"]
}
output "natgw_ids" {
description = "List of NAT Gateway IDs"
value = ["${aws_nat_gateway.this.*.id}"]
}
# Internet Gateway
output "igw_id" {
description = "The ID of the Internet Gateway"
value = "${element(concat(aws_internet_gateway.this.*.id, list("")), 0)}"
}
# VPC Endpoints
output "vpc_endpoint_s3_id" {
description = "The ID of VPC endpoint for S3"
value = "${element(concat(aws_vpc_endpoint.s3.*.id, list("")), 0)}"
}
output "vpc_endpoint_s3_pl_id" {
description = "The prefix list for the S3 VPC endpoint."
value = "${element(concat(aws_vpc_endpoint.s3.*.prefix_list_id, list("")), 0)}"
}
output "vpc_endpoint_dynamodb_id" {
description = "The ID of VPC endpoint for DynamoDB"
value = "${element(concat(aws_vpc_endpoint.dynamodb.*.id, list("")), 0)}"
}
# VPN Gateway
output "vgw_id" {
description = "The ID of the VPN Gateway"
value = "${element(concat(aws_vpn_gateway.this.*.id, list("")), 0)}"
}
output "vpc_endpoint_dynamodb_pl_id" {
description = "The prefix list for the DynamoDB VPC endpoint."
value = "${element(concat(aws_vpc_endpoint.dynamodb.*.prefix_list_id, list("")), 0)}"
}
output "availability_zones" {
description = "The availability zones that this vpc lives in"
value = "${local.azs}"
}
# The AWS account id used as an output so we can use it as an input (for arns?) elsewhere
output "aws_account_id" {
description = "The aws account id we're using"
value = "${data.aws_caller_identity.current.account_id}"
}