generated from aws-ia/terraform-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 12
/
outputs.tf
60 lines (53 loc) · 2.08 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
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
# --- root/outputs.tf ---
# AWS TRANSIT GATEWAY (if created)
output "transit_gateway" {
description = <<-EOF
AWS Transit Gateway resource. Check the resource in the Terraform Registry - [aws_ec2_transit_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_transit_gateway) - for more information about the output attributes.
```
EOF
value = try(aws_ec2_transit_gateway.tgw[0], null)
}
# CENTRAL VPCS
output "central_vpcs" {
description = <<-EOF
Central VPCs created. Check the [AWS VPC Module](https://github.com/aws-ia/terraform-aws-vpc) README for more information about the output attributes.
```
EOF
value = module.central_vpcs
}
# TRANSIT GATEWAY ROUTE TABLES
output "transit_gateway_route_tables" {
description = <<-EOF
Transit Gateway Route Tables. The format of the output is the following one:
```
transit_gateway_route_tables = {
central_vpcs = {
inspection = { ... }
egress = { ... }
...
}
spoke_vpcs = {
segment1 = { ... }
segment2 = { ... }
...
}
}
```
Check the AWS Transit Gateway Route Table resource in the Terraform Registry - [aws_ec2_transit_gateway_route_table](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_transit_gateway_route_table) for more information about the output attributes.
```
EOF
value = {
central_vpcs = try(aws_ec2_transit_gateway_route_table.tgw_route_table, {})
spoke_vpcs = aws_ec2_transit_gateway_route_table.spokes_tgw_rt
}
}
# AWS NETWORK FIREWALL RESOURCE (IF CREATED)
output "aws_network_firewall" {
description = <<-EOF
AWS Network Firewall resource. Check the resource in the Terraform Registry - [aws_networkfirewall_firewall](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/networkfirewall_firewall) - for more information about the output attributes.
```
EOF
value = local.create_anfw ? module.aws_network_firewall[0].aws_network_firewall : null
}