Skip to content

Commit 8f29a17

Browse files
authored
feat: Make cloud-router module ADC compliant (#171)
1 parent 5264e67 commit 8f29a17

File tree

5 files changed

+169
-3
lines changed

5 files changed

+169
-3
lines changed

metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ metadata:
2020
config.kubernetes.io/local-config: "true"
2121
spec:
2222
info:
23+
title: "Cloud Router"
2324
source:
2425
repo: https://github.com/terraform-google-modules/terraform-google-cloud-router.git
2526
sourceType: git
@@ -29,6 +30,7 @@ spec:
2930
bgp:
3031
name: bgp
3132
title: Bgp
33+
level: 1
3234
description:
3335
name: description
3436
title: Description
@@ -41,6 +43,7 @@ spec:
4143
nats:
4244
name: nats
4345
title: Nats
46+
level: 1
4447
network:
4548
name: network
4649
title: Network

metadata.yaml

Lines changed: 134 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ metadata:
2020
config.kubernetes.io/local-config: "true"
2121
spec:
2222
info:
23+
title: "Cloud Router"
2324
source:
2425
repo: https://github.com/terraform-google-modules/terraform-google-cloud-router.git
2526
sourceType: git
@@ -51,6 +52,22 @@ spec:
5152
description: A reference to the network to which this router belongs
5253
varType: string
5354
required: true
55+
connections:
56+
- source:
57+
source: github.com/terraform-google-modules/terraform-google-network
58+
version: ">= 11.0.0"
59+
spec:
60+
outputExpr: network_name
61+
- source:
62+
source: github.com/terraform-google-modules/terraform-google-network//modules/vpc
63+
version: ">= 11.0.0"
64+
spec:
65+
outputExpr: network_name
66+
- source:
67+
source: github.com/GoogleCloudPlatform/terraform-google-vpn
68+
version: ">= 5.0.0"
69+
spec:
70+
outputExpr: network
5471
- name: project
5572
description: The project ID to deploy to
5673
varType: string
@@ -114,8 +131,124 @@ spec:
114131
outputs:
115132
- name: nat
116133
description: Created NATs
134+
type:
135+
- object
136+
- my-nat-gateway:
137+
- object
138+
- auto_network_tier: string
139+
drain_nat_ips:
140+
- set
141+
- string
142+
enable_dynamic_port_allocation: bool
143+
enable_endpoint_independent_mapping: bool
144+
endpoint_types:
145+
- list
146+
- string
147+
icmp_idle_timeout_sec: number
148+
id: string
149+
initial_nat_ips:
150+
- set
151+
- string
152+
log_config:
153+
- list
154+
- - object
155+
- enable: bool
156+
filter: string
157+
max_ports_per_vm: number
158+
min_ports_per_vm: number
159+
name: string
160+
nat64_subnetwork:
161+
- set
162+
- - object
163+
- name: string
164+
nat_ip_allocate_option: string
165+
nat_ips:
166+
- set
167+
- string
168+
project: string
169+
region: string
170+
router: string
171+
rules:
172+
- set
173+
- - object
174+
- action:
175+
- list
176+
- - object
177+
- source_nat_active_ips:
178+
- set
179+
- string
180+
source_nat_active_ranges:
181+
- set
182+
- string
183+
source_nat_drain_ips:
184+
- set
185+
- string
186+
source_nat_drain_ranges:
187+
- set
188+
- string
189+
description: string
190+
match: string
191+
rule_number: number
192+
source_subnetwork_ip_ranges_to_nat: string
193+
source_subnetwork_ip_ranges_to_nat64: string
194+
subnetwork:
195+
- set
196+
- - object
197+
- name: string
198+
secondary_ip_range_names:
199+
- set
200+
- string
201+
source_ip_ranges_to_nat:
202+
- set
203+
- string
204+
tcp_established_idle_timeout_sec: number
205+
tcp_time_wait_timeout_sec: number
206+
tcp_transitory_idle_timeout_sec: number
207+
timeouts:
208+
- object
209+
- create: string
210+
delete: string
211+
update: string
212+
type: string
213+
udp_idle_timeout_sec: number
117214
- name: router
118215
description: Created Router
216+
type:
217+
- object
218+
- bgp:
219+
- list
220+
- - object
221+
- advertise_mode: string
222+
advertised_groups:
223+
- list
224+
- string
225+
advertised_ip_ranges:
226+
- set
227+
- - object
228+
- description: string
229+
range: string
230+
asn: number
231+
identifier_range: string
232+
keepalive_interval: number
233+
creation_timestamp: string
234+
description: string
235+
encrypted_interconnect_router: bool
236+
id: string
237+
md5_authentication_keys:
238+
- list
239+
- - object
240+
- key: string
241+
name: string
242+
name: string
243+
network: string
244+
project: string
245+
region: string
246+
self_link: string
247+
timeouts:
248+
- object
249+
- create: string
250+
delete: string
251+
update: string
119252
requirements:
120253
roles:
121254
- level: Project
@@ -127,4 +260,4 @@ spec:
127260
- compute.googleapis.com
128261
providerVersions:
129262
- source: hashicorp/google
130-
version: ">= 4.51, < 7"
263+
version: ">= 4.51, < 8"

modules/interconnect_attachment/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,4 @@ spec:
140140
- compute.googleapis.com
141141
providerVersions:
142142
- source: hashicorp/google
143-
version: ">= 4.27, < 7"
143+
version: ">= 4.27, < 8"

modules/interface/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ spec:
3131
interconnect_attachment:
3232
name: interconnect_attachment
3333
title: Interconnect Attachment
34+
level: 1
3435
ip_range:
3536
name: ip_range
3637
title: Ip Range
38+
level: 1
3739
name:
3840
name: name
3941
title: Name
@@ -52,3 +54,4 @@ spec:
5254
vpn_tunnel:
5355
name: vpn_tunnel
5456
title: Vpn Tunnel
57+
level: 1

modules/interface/metadata.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,22 @@ spec:
5252
description: Name of the router the interface resides
5353
varType: string
5454
required: true
55+
connections:
56+
- source:
57+
source: github.com/terraform-google-modules/terraform-google-cloud-router
58+
version: ">= 7.0.0"
59+
spec:
60+
outputExpr: router.name
61+
- source:
62+
source: github.com/terraform-google-modules/terraform-google-cloud-nat
63+
version: ">= 4.0.0"
64+
spec:
65+
outputExpr: router_name
66+
- source:
67+
source: github.com/terraform-google-modules/terraform-google-vpn//modules/vpn-ha
68+
version: ">= 5.0.0"
69+
spec:
70+
outputExpr: router_name
5571
- name: region
5672
description: Region where the interface resides
5773
varType: string
@@ -62,6 +78,17 @@ spec:
6278
- name: vpn_tunnel
6379
description: The name or resource link to the VPN tunnel this interface will be linked to
6480
varType: string
81+
connections:
82+
- source:
83+
source: github.com/terraform-google-modules/terraform-google-vpn//modules/vpn-ha
84+
version: ">= 5.0.0"
85+
spec:
86+
outputExpr: values(tunnel_self_links)[0]
87+
- source:
88+
source: github.com/terraform-google-modules/terraform-google-vpn
89+
version: ">= 5.0.0"
90+
spec:
91+
outputExpr: vpn_tunnels_self_link-dynamic[0]
6592
- name: interconnect_attachment
6693
description: The name or resource link to the VLAN interconnect for this interface
6794
varType: string
@@ -97,4 +124,4 @@ spec:
97124
- compute.googleapis.com
98125
providerVersions:
99126
- source: hashicorp/google
100-
version: ">= 5.12, < 7"
127+
version: ">= 5.12, < 8"

0 commit comments

Comments
 (0)