Skip to content

Commit 4228427

Browse files
feat: surface additional hub-spoke dns sharing outputs (#668)
1 parent c14b41c commit 4228427

File tree

13 files changed

+101
-29
lines changed

13 files changed

+101
-29
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ To attach access management tags to resources in this module, you need the follo
8383

8484
- [ Basic Example](examples/basic)
8585
- [ Default Example](examples/default)
86+
- [ Hub and Spoke VPC Example](examples/hub-spoke-delegated-resolver)
8687
- [ Hub and Spoke VPC with manual DNS resolver Example](examples/hub-spoke-manual-resolver)
87-
- [ Hub and Spoke VPC Example](examples/hub-spoke)
8888
- [ Landing Zone example](examples/landing_zone)
8989
- [ No Prefix Example](examples/no-prefix)
9090
<!-- END EXAMPLES HOOK -->
@@ -176,6 +176,8 @@ To attach access management tags to resources in this module, you need the follo
176176
|------|-------------|
177177
| <a name="output_cidr_blocks"></a> [cidr\_blocks](#output\_cidr\_blocks) | List of CIDR blocks present in VPC stack |
178178
| <a name="output_custom_resolver_hub"></a> [custom\_resolver\_hub](#output\_custom\_resolver\_hub) | The custom resolver created for the hub vpc. Only set if enable\_hub is set and skip\_custom\_resolver\_hub\_creation is false. |
179+
| <a name="output_dns_endpoint_gateways_by_crn"></a> [dns\_endpoint\_gateways\_by\_crn](#output\_dns\_endpoint\_gateways\_by\_crn) | The list of VPEs that are made available for DNS resolution in the created VPC. Only set if enable\_hub is false and enable\_hub\_vpc\_id are true. |
180+
| <a name="output_dns_endpoint_gateways_by_id"></a> [dns\_endpoint\_gateways\_by\_id](#output\_dns\_endpoint\_gateways\_by\_id) | The list of VPEs that are made available for DNS resolution in the created VPC. Only set if enable\_hub is false and enable\_hub\_vpc\_id are true. |
179181
| <a name="output_network_acls"></a> [network\_acls](#output\_network\_acls) | List of shortnames and IDs of network ACLs |
180182
| <a name="output_public_gateways"></a> [public\_gateways](#output\_public\_gateways) | Map of public gateways by zone |
181183
| <a name="output_subnet_detail_list"></a> [subnet\_detail\_list](#output\_subnet\_detail\_list) | A list of subnets containing names, CIDR blocks, and zones. |
File renamed without changes.
File renamed without changes.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
##############################################################################
2+
# Outputs
3+
##############################################################################
4+
5+
output "hub_vpc_id" {
6+
value = module.hub_vpc.vpc_id
7+
description = "Hub VPC id"
8+
}
9+
10+
output "hub_vpc_crn" {
11+
value = module.hub_vpc.vpc_crn
12+
description = "Hub VPC crn"
13+
}
14+
15+
output "spoke_vpc_id" {
16+
value = module.spoke_vpc.vpc_id
17+
description = "Hub VPC id"
18+
}
19+
20+
output "spoke_vpc_crn" {
21+
value = module.spoke_vpc.vpc_crn
22+
description = "Hub VPC crn"
23+
}
24+
25+
output "transit_gateway_id" {
26+
value = module.tg_gateway_connection.tg_id
27+
description = "The ID of the transit gateway"
28+
}
29+
30+
output "transit_gateway_crn" {
31+
value = module.tg_gateway_connection.tg_crn
32+
description = "The CRN of the transit gateway"
33+
}
34+
35+
output "vpc_connection_ids" {
36+
value = module.tg_gateway_connection.vpc_conn_ids
37+
description = "List of VPC connection IDs."
38+
}
39+
40+
output "custom_resolver_hub_vpc" {
41+
value = module.hub_vpc.custom_resolver_hub
42+
description = "The custom resolver created for the hub vpc."
43+
}
44+
45+
output "dns_endpoint_gateways_by_spoke_vpc_crn" {
46+
value = module.spoke_vpc.dns_endpoint_gateways_by_crn
47+
description = "The list of VPEs that are made available for DNS resolution in the created VPC."
48+
}
49+
50+
output "dns_endpoint_gateways_by_spoke_vpc_id" {
51+
value = module.spoke_vpc.dns_endpoint_gateways_by_id
52+
description = "The list of VPEs that are made available for DNS resolution in the created VPC."
53+
}
File renamed without changes.

examples/hub-spoke/variables.tf renamed to examples/hub-spoke-delegated-resolver/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ variable "region" {
1313
variable "prefix" {
1414
description = "The prefix that you would like to append to your resources"
1515
type = string
16-
default = "hs-vpc"
16+
default = "hs-delegated"
1717
}
1818

1919
variable "resource_group" {
File renamed without changes.

examples/hub-spoke-manual-resolver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ This example demostrates how to deploy hub and spoke VPCs, inclusive of enabling
44

55
Caveat: Using a manual resolver, as opposed to a delegated resolver requires to ensure that the custom resolver IPs in the hub VPC do not change outside the terraform lifecycle (which should be the case if you follow a proper IaC approach).
66

7-
Refer to the documentation [here](../hub-spoke/) if you are new to hub-spoke dns-sharing VPC topology.
7+
Refer to the documentation [here](../hub-spoke-delegated-resolver/) if you are new to hub-spoke dns-sharing VPC topology.

examples/hub-spoke-manual-resolver/outputs.tf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,33 @@ output "spoke_vpc_crn" {
2121
value = module.spoke_vpc.vpc_crn
2222
description = "Hub VPC crn"
2323
}
24+
25+
output "transit_gateway_id" {
26+
value = module.tg_gateway_connection.tg_id
27+
description = "The ID of the transit gateway"
28+
}
29+
30+
output "transit_gateway_crn" {
31+
value = module.tg_gateway_connection.tg_crn
32+
description = "The CRN of the transit gateway"
33+
}
34+
35+
output "vpc_connection_ids" {
36+
value = module.tg_gateway_connection.vpc_conn_ids
37+
description = "List of VPC connection IDs."
38+
}
39+
40+
output "custom_resolver_hub_vpc" {
41+
value = module.hub_vpc.custom_resolver_hub
42+
description = "The custom resolver created for the hub vpc."
43+
}
44+
45+
output "dns_endpoint_gateways_by_spoke_vpc_crn" {
46+
value = module.spoke_vpc.dns_endpoint_gateways_by_crn
47+
description = "The list of VPEs that are made available for DNS resolution in the created VPC."
48+
}
49+
50+
output "dns_endpoint_gateways_by_spoke_vpc_id" {
51+
value = module.spoke_vpc.dns_endpoint_gateways_by_id
52+
description = "The list of VPEs that are made available for DNS resolution in the created VPC."
53+
}

examples/hub-spoke/outputs.tf

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)