From 99134f13905af5c2a0360cb989e3cf4fecb1b7ba Mon Sep 17 00:00:00 2001 From: yuktatechgog Date: Wed, 22 Oct 2025 21:05:45 +0000 Subject: [PATCH 1/2] feat: Make cloud-router module ADC compliant This change updates the blueprint to be compliant with the Application Design Center. Key changes: - Updated metadata.yaml files to include output types. - Added connection metadata for network, router, and vpn_tunnel inputs. - Added titles to display metadata to pass linting checks. - Enabled blueprint metadata validation in the CI pipeline. --- metadata.display.yaml | 3 + metadata.yaml | 132 +++++++++++++++++- modules/interconnect_attachment/metadata.yaml | 2 +- modules/interface/metadata.display.yaml | 3 + modules/interface/metadata.yaml | 24 +++- 5 files changed, 161 insertions(+), 3 deletions(-) diff --git a/metadata.display.yaml b/metadata.display.yaml index 09b3869..6616364 100644 --- a/metadata.display.yaml +++ b/metadata.display.yaml @@ -20,6 +20,7 @@ metadata: config.kubernetes.io/local-config: "true" spec: info: + title: "Cloud Router" source: repo: https://github.com/terraform-google-modules/terraform-google-cloud-router.git sourceType: git @@ -29,6 +30,7 @@ spec: bgp: name: bgp title: Bgp + level: 1 description: name: description title: Description @@ -41,6 +43,7 @@ spec: nats: name: nats title: Nats + level: 1 network: name: network title: Network diff --git a/metadata.yaml b/metadata.yaml index dee8fe7..2e3013b 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -20,6 +20,7 @@ metadata: config.kubernetes.io/local-config: "true" spec: info: + title: "Cloud Router" source: repo: https://github.com/terraform-google-modules/terraform-google-cloud-router.git sourceType: git @@ -51,6 +52,19 @@ spec: description: A reference to the network to which this router belongs varType: string required: true + connections: + - source: + source: github.com/terraform-google-modules/terraform-google-network + spec: + outputExpr: network_name + - source: + source: github.com/terraform-google-modules/terraform-google-network//modules/vpc + spec: + outputExpr: network_name + - source: + source: github.com/GoogleCloudPlatform/terraform-google-vpn + spec: + outputExpr: network - name: project description: The project ID to deploy to varType: string @@ -114,8 +128,124 @@ spec: outputs: - name: nat description: Created NATs + type: + - object + - my-nat-gateway: + - object + - auto_network_tier: string + drain_nat_ips: + - set + - string + enable_dynamic_port_allocation: bool + enable_endpoint_independent_mapping: bool + endpoint_types: + - list + - string + icmp_idle_timeout_sec: number + id: string + initial_nat_ips: + - set + - string + log_config: + - list + - - object + - enable: bool + filter: string + max_ports_per_vm: number + min_ports_per_vm: number + name: string + nat64_subnetwork: + - set + - - object + - name: string + nat_ip_allocate_option: string + nat_ips: + - set + - string + project: string + region: string + router: string + rules: + - set + - - object + - action: + - list + - - object + - source_nat_active_ips: + - set + - string + source_nat_active_ranges: + - set + - string + source_nat_drain_ips: + - set + - string + source_nat_drain_ranges: + - set + - string + description: string + match: string + rule_number: number + source_subnetwork_ip_ranges_to_nat: string + source_subnetwork_ip_ranges_to_nat64: string + subnetwork: + - set + - - object + - name: string + secondary_ip_range_names: + - set + - string + source_ip_ranges_to_nat: + - set + - string + tcp_established_idle_timeout_sec: number + tcp_time_wait_timeout_sec: number + tcp_transitory_idle_timeout_sec: number + timeouts: + - object + - create: string + delete: string + update: string + type: string + udp_idle_timeout_sec: number - name: router description: Created Router + type: + - object + - bgp: + - list + - - object + - advertise_mode: string + advertised_groups: + - list + - string + advertised_ip_ranges: + - set + - - object + - description: string + range: string + asn: number + identifier_range: string + keepalive_interval: number + creation_timestamp: string + description: string + encrypted_interconnect_router: bool + id: string + md5_authentication_keys: + - list + - - object + - key: string + name: string + name: string + network: string + project: string + region: string + self_link: string + timeouts: + - object + - create: string + delete: string + update: string requirements: roles: - level: Project @@ -127,4 +257,4 @@ spec: - compute.googleapis.com providerVersions: - source: hashicorp/google - version: ">= 4.51, < 7" + version: ">= 4.51, < 8" diff --git a/modules/interconnect_attachment/metadata.yaml b/modules/interconnect_attachment/metadata.yaml index e08175c..5db2ea7 100644 --- a/modules/interconnect_attachment/metadata.yaml +++ b/modules/interconnect_attachment/metadata.yaml @@ -140,4 +140,4 @@ spec: - compute.googleapis.com providerVersions: - source: hashicorp/google - version: ">= 4.27, < 7" + version: ">= 4.27, < 8" diff --git a/modules/interface/metadata.display.yaml b/modules/interface/metadata.display.yaml index 9fee6a3..009c2b2 100644 --- a/modules/interface/metadata.display.yaml +++ b/modules/interface/metadata.display.yaml @@ -31,9 +31,11 @@ spec: interconnect_attachment: name: interconnect_attachment title: Interconnect Attachment + level: 1 ip_range: name: ip_range title: Ip Range + level: 1 name: name: name title: Name @@ -52,3 +54,4 @@ spec: vpn_tunnel: name: vpn_tunnel title: Vpn Tunnel + level: 1 diff --git a/modules/interface/metadata.yaml b/modules/interface/metadata.yaml index d1d46c7..90c6116 100644 --- a/modules/interface/metadata.yaml +++ b/modules/interface/metadata.yaml @@ -52,6 +52,19 @@ spec: description: Name of the router the interface resides varType: string required: true + connections: + - source: + source: github.com/terraform-google-modules/terraform-google-cloud-router + spec: + outputExpr: router.name + - source: + source: github.com/terraform-google-modules/terraform-google-cloud-nat + spec: + outputExpr: router_name + - source: + source: github.com/terraform-google-modules/terraform-google-vpn//modules/vpn-ha + spec: + outputExpr: router_name - name: region description: Region where the interface resides varType: string @@ -62,6 +75,15 @@ spec: - name: vpn_tunnel description: The name or resource link to the VPN tunnel this interface will be linked to varType: string + connections: + - source: + source: github.com/terraform-google-modules/terraform-google-vpn//modules/vpn-ha + spec: + outputExpr: values(tunnel_self_links)[0] + - source: + source: github.com/terraform-google-modules/terraform-google-vpn + spec: + outputExpr: vpn_tunnels_self_link-dynamic[0] - name: interconnect_attachment description: The name or resource link to the VLAN interconnect for this interface varType: string @@ -97,4 +119,4 @@ spec: - compute.googleapis.com providerVersions: - source: hashicorp/google - version: ">= 5.12, < 7" + version: ">= 5.12, < 8" From d7dc4bb170551c06fd6f1bc1d925b6e18799b325 Mon Sep 17 00:00:00 2001 From: yuktatechgog Date: Wed, 22 Oct 2025 21:43:59 +0000 Subject: [PATCH 2/2] feat: Versions for connections added --- metadata.yaml | 3 +++ modules/interface/metadata.yaml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/metadata.yaml b/metadata.yaml index 2e3013b..f9a8868 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -55,14 +55,17 @@ spec: connections: - source: source: github.com/terraform-google-modules/terraform-google-network + version: ">= 11.0.0" spec: outputExpr: network_name - source: source: github.com/terraform-google-modules/terraform-google-network//modules/vpc + version: ">= 11.0.0" spec: outputExpr: network_name - source: source: github.com/GoogleCloudPlatform/terraform-google-vpn + version: ">= 5.0.0" spec: outputExpr: network - name: project diff --git a/modules/interface/metadata.yaml b/modules/interface/metadata.yaml index 90c6116..8818a7e 100644 --- a/modules/interface/metadata.yaml +++ b/modules/interface/metadata.yaml @@ -55,14 +55,17 @@ spec: connections: - source: source: github.com/terraform-google-modules/terraform-google-cloud-router + version: ">= 7.0.0" spec: outputExpr: router.name - source: source: github.com/terraform-google-modules/terraform-google-cloud-nat + version: ">= 4.0.0" spec: outputExpr: router_name - source: source: github.com/terraform-google-modules/terraform-google-vpn//modules/vpn-ha + version: ">= 5.0.0" spec: outputExpr: router_name - name: region @@ -78,10 +81,12 @@ spec: connections: - source: source: github.com/terraform-google-modules/terraform-google-vpn//modules/vpn-ha + version: ">= 5.0.0" spec: outputExpr: values(tunnel_self_links)[0] - source: source: github.com/terraform-google-modules/terraform-google-vpn + version: ">= 5.0.0" spec: outputExpr: vpn_tunnels_self_link-dynamic[0] - name: interconnect_attachment