-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutputs.tf
61 lines (54 loc) · 2.1 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
/**
* Copyright 2020 Quortex
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
output "vpc_id" {
value = aws_vpc.quortex.id
description = "The ID of the VPC"
}
output "vpc_cidr_block" {
value = var.vpc_cidr_block
description = "The CIDR block of the VPC"
}
output "subnets" {
value = { for k, v in aws_subnet.quortex : k =>
{
id = v.id,
availability_zone = v.availability_zone,
public = v.map_public_ip_on_launch,
cidr = v.cidr_block,
}
}
description = <<EOT
A map representing the subnets that has been created. The keys match those
passed in the subnets variable, each item contains the subnet's ID,
Availability Zone, cidr block, and whether the subnet is public or not.
EOT
}
output "route_table_ids_public" {
value = values(aws_route_table.quortex_public)[*].id
description = "The IDs of the route tables for public subnets"
}
output "route_table_ids_private" {
value = values(aws_route_table.quortex_private)[*].id
description = "The IDs of the route tables for private subnets"
}
output "nat_eip_ids" {
value = concat(values(aws_eip.quortex)[*].allocation_id, [for k, v in var.nat_gateways : v.eip_allocation_id if v.eip_allocation_id != null])
description = "The IDs of the Elastic IPs associated to the Quortex cluster External NAT Gateways."
}
output "nat_eip_addresses" {
value = concat(values(aws_eip.quortex)[*].public_ip, values(data.aws_eip.existing_eip)[*].public_ip)
description = "The public addresses of the Elastic IP associated to the Quortex cluster External NAT Gateways."
}