Skip to content

Commit 1956646

Browse files
authored
test: correct the syntax to connect vpcs using transit gateway in example (#939)
* fix: transit gateway error * doc: fixed broken link and added hns url
1 parent 561e5fe commit 1956646

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This module creates the following IBM Cloud® Virtual Private Cloud (VPC) net
1414
- Network ACLs: Create network ACLs with multiple rules. By default, VPC network ACLs can have no more than 25 rules.
1515
- VPN gateways: Create VPN gateways on your subnets by using the `vpn_gateways` variable. For more information about VPN gateways on VPC, see [About site-to-site VPN gateways](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn) in the IBM Cloud docs.
1616
- VPN gateway connections: Add connections to a VPN gateway.
17-
- Hub and spoke DNS-sharing model: Optionally create a hub or spoke VPC, with associated custom resolver and DNS resolution binding, as well as a service-to-service authorization policy which supports the hub and spoke VPCs to be in separate accounts. See [About DNS sharing for VPE gateways](https://cloud.ibm.com/docs/vpc?topic=vpc-hub-spoke-model) in the IBM Cloud docs for details.
17+
- Hub and spoke DNS-sharing model: Optionally create a hub or spoke VPC, with associated custom resolver and DNS resolution binding, as well as a service-to-service authorization policy which supports the hub and spoke VPCs to be in separate accounts. See [About DNS sharing for VPE gateways](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-dns-sharing) and [hub and spoke communication](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-vpc-transit1) in the IBM Cloud docs for details.
1818

1919
![vpc-module](https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/main/.docs/vpc-module.png)
2020

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hub and Spoke VPC Example
22

3-
This example demonstrates how to deploy hub and spoke VPCs, inclusive of enabling DNS-sharing. See https://cloud.ibm.com/docs/vpc?topic=vpc-hub-spoke-model for details.
3+
This example demonstrates how to deploy hub and spoke VPCs, inclusive of enabling DNS-sharing. See [About DNS sharing for VPE gateways](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-dns-sharing) and [hub and spoke communication](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-vpc-transit1) for details.
44
- The 2 VPCs are connected through a transit gateway.
55
- The hub VPC is configured with a custom resolver.
66
- The spoke VPC is configured with a delegated DNS resolver. DNS requests are resolved by the hub VPC.
@@ -12,6 +12,6 @@ This example demonstrates how to deploy hub and spoke VPCs, inclusive of enablin
1212
1. The first terraform apply lay down all of the topology, but does not configure the DNS resolver to delegated in the spoke
1313
2. The second terraform apply should have the update_delegated_resolver variable to true to configure the DNS resolver to be delegated ```terraform apply -var=update_delegated_resolver=true```
1414

15-
In order to perform a successful destroy, please set to the resolver to "system" in the spoke VPC through the UI before issuing the terraform destroy - see https://cloud.ibm.com/docs/vpc?topic=vpc-hub-spoke-configure-dns-resolver&interface=ui
15+
In order to perform a successful destroy, please set to the resolver to "system" in the spoke VPC through the UI before issuing the terraform destroy - see https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-vpc-transit2
1616

1717
You may also be interested in the [Hub and Spoke VPC with manual DNS resolver Example](../hub-spoke-manual-resolver/) which does not exhibit those issues.

examples/hub-spoke-delegated-resolver/main.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ resource "time_sleep" "delay_between_hub_spoke" {
2929
#############################################################################
3030

3131
module "hub_vpc" {
32-
source = "../../"
33-
resource_group_id = module.resource_group.resource_group_id
34-
region = var.region
35-
name = "hub"
36-
prefix = "${var.prefix}-hub"
37-
tags = var.resource_tags
38-
enable_hub = true
39-
skip_custom_resolver_hub_creation = true
32+
source = "../../"
33+
resource_group_id = module.resource_group.resource_group_id
34+
region = var.region
35+
name = "hub"
36+
prefix = "${var.prefix}-hub"
37+
tags = var.resource_tags
38+
enable_hub = true
39+
dns_zone_name = "hnsexample.com"
4040
subnets = {
4141
zone-1 = [
4242
{
@@ -121,6 +121,6 @@ module "tg_gateway_connection" {
121121
global_routing = false
122122
resource_tags = var.resource_tags
123123
resource_group_id = module.resource_group.resource_group_id
124-
vpc_connections = [module.hub_vpc.vpc_crn, module.spoke_vpc.vpc_crn]
124+
vpc_connections = [{ vpc_crn = module.hub_vpc.vpc_crn }, { vpc_crn = module.spoke_vpc.vpc_crn }]
125125
classic_connections_count = 0
126126
}

0 commit comments

Comments
 (0)