Skip to content

Commit fe77470

Browse files
authored
feat: update connection metadata and url_map creation in modules/frontend (#471)
1 parent 44c17b2 commit fe77470

File tree

14 files changed

+356
-304
lines changed

14 files changed

+356
-304
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.22
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.23
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

@@ -76,7 +76,7 @@ docker_test_lint:
7676
.PHONY: docker_generate_docs
7777
docker_generate_docs:
7878
docker run --rm -it \
79-
-e ENABLE_BPMETADATA \
79+
-e ENABLE_BPMETADATA=1 \
8080
-v "$(CURDIR)":/workspace \
8181
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
8282
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_docs'
@@ -85,6 +85,7 @@ docker_generate_docs:
8585
.PHONY: docker_generate_modules
8686
docker_generate_modules:
8787
docker run --rm -it \
88+
-e ENABLE_BPMETADATA \
8889
-v "$(CURDIR)":/workspace \
8990
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
9091
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_modules'

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ intended for Terraform 0.12.x is [v4.5.0](https://registry.terraform.io/modules/
2929

3030
Current version is 12.0. Upgrade guides:
3131

32-
- [2.X -> 3.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v3.0.0.md)
33-
- [3.X -> 4.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v4.0.md)
34-
- [6.X -> 7.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v7.0.md)
35-
- [7.X -> 8.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v8.0.md)
36-
- [8.X -> 9.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v9.0.md)
37-
- [9.X -> 10.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v10.0.md)
38-
- [10.X -> 11.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v11.0.md)
32+
- [2.X -> 3.0](/docs/upgrading-v2.0.0-v3.0.0.md)
33+
- [3.X -> 4.0](/docs/upgrading_to_v4.0.md)
34+
- [6.X -> 7.0](/docs/upgrading_to_v7.0.md)
35+
- [7.X -> 8.0](/docs/upgrading_to_v8.0.md)
36+
- [8.X -> 9.0](/docs/upgrading_to_v9.0.md)
37+
- [9.X -> 10.0](/docs/upgrading_to_v10.0.md)
38+
- [10.X -> 11.0](/docs/upgrading_to_v11.0.md)
3939

4040
## Usage
4141

autogen/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ intended for Terraform 0.12.x is [v4.5.0](https://registry.terraform.io/modules/
4343

4444
## Version
4545

46-
Current version is 9.0. Upgrade guides:
46+
Current version is 12.0. Upgrade guides:
4747

4848
- [2.X -> 3.0](/docs/upgrading-v2.0.0-v3.0.0.md)
4949
- [3.X -> 4.0](/docs/upgrading_to_v4.0.md)
5050
- [6.X -> 7.0](/docs/upgrading_to_v7.0.md)
5151
- [7.X -> 8.0](/docs/upgrading_to_v8.0.md)
5252
- [8.X -> 9.0](/docs/upgrading_to_v9.0.md)
5353
- [9.X -> 10.0](/docs/upgrading_to_v10.0.md)
54+
- [10.X -> 11.0](/docs/upgrading_to_v11.0.md)
5455

5556
## Usage
5657

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ tags:
132132
- 'integration'
133133
substitutions:
134134
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
135-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.22'
135+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.23'

build/lint.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ tags:
2121
- 'lint'
2222
substitutions:
2323
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
24-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.22'
24+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.23'

metadata.yaml

Lines changed: 103 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -76,9 +76,50 @@ spec:
7676
location: examples/user-managed-google-managed-ssl
7777
interfaces:
7878
variables:
79+
- name: project
80+
description: The project to deploy to, if not set the default provider project is used.
81+
varType: string
82+
required: true
83+
- name: name
84+
description: Name for the forwarding rule and prefix for supporting resources
85+
varType: string
86+
required: true
87+
- name: create_address
88+
description: Create a new global IPv4 address
89+
varType: bool
90+
defaultValue: true
7991
- name: address
8092
description: Existing IPv4 address to use (the actual IP address value)
8193
varType: string
94+
- name: enable_ipv6
95+
description: Enable IPv6 address on the CDN load-balancer
96+
varType: bool
97+
defaultValue: false
98+
- name: create_ipv6_address
99+
description: Allocate a new IPv6 address. Conflicts with "ipv6_address" - if both specified, "create_ipv6_address" takes precedence.
100+
varType: bool
101+
defaultValue: false
102+
- name: ipv6_address
103+
description: An existing IPv6 address to use (the actual IP address value)
104+
varType: string
105+
- name: firewall_networks
106+
description: Names of the networks to create firewall rules in
107+
varType: list(string)
108+
defaultValue:
109+
- default
110+
- name: firewall_projects
111+
description: Names of the projects to create firewall rules in
112+
varType: list(string)
113+
defaultValue:
114+
- default
115+
- name: target_tags
116+
description: List of target tags for health check firewall rule. Exactly one of target_tags or target_service_accounts should be specified.
117+
varType: list(string)
118+
defaultValue: []
119+
- name: target_service_accounts
120+
description: List of target service accounts for health check firewall rule. Exactly one of target_tags or target_service_accounts should be specified.
121+
varType: list(string)
122+
defaultValue: []
82123
- name: backends
83124
description: Map backend indices to list of backend maps.
84125
varType: |-
@@ -186,67 +227,62 @@ spec:
186227
}))
187228
}))
188229
required: true
189-
- name: certificate
190-
description: Content of the SSL certificate. Requires `ssl` to be set to `true` and `create_ssl_certificate` set to `true`
191-
varType: string
192-
- name: certificate_map
193-
description: Certificate Map ID in format projects/{project}/locations/global/certificateMaps/{name}. Identifies a certificate map associated with the given target proxy. Requires `ssl` to be set to `true`
230+
- name: create_url_map
231+
description: Set to `false` if url_map variable is provided.
232+
varType: bool
233+
defaultValue: true
234+
- name: url_map
235+
description: The url_map resource to use. Default is to send all traffic to first backend.
194236
varType: string
195-
- name: create_address
196-
description: Create a new global IPv4 address
237+
- name: http_forward
238+
description: Set to `false` to disable HTTP port 80 forward
197239
varType: bool
198240
defaultValue: true
199-
- name: create_ipv6_address
200-
description: Allocate a new IPv6 address. Conflicts with "ipv6_address" - if both specified, "create_ipv6_address" takes precedence.
241+
- name: ssl
242+
description: "Set to `true` to enable SSL support. If `true` then at least one of these are required: 1) `ssl_certificates` OR 2) `create_ssl_certificate` set to `true` and `private_key/certificate` OR 3) `managed_ssl_certificate_domains`, OR 4) `certificate_map`"
201243
varType: bool
202244
defaultValue: false
203245
- name: create_ssl_certificate
204246
description: If `true`, Create certificate using `private_key/certificate`
205247
varType: bool
206248
defaultValue: false
207-
- name: create_url_map
208-
description: Set to `false` if url_map variable is provided.
249+
- name: ssl_certificates
250+
description: SSL cert self_link list. Requires `ssl` to be set to `true`
251+
varType: list(string)
252+
defaultValue: []
253+
- name: private_key
254+
description: Content of the private SSL key. Requires `ssl` to be set to `true` and `create_ssl_certificate` set to `true`
255+
varType: string
256+
- name: certificate
257+
description: Content of the SSL certificate. Requires `ssl` to be set to `true` and `create_ssl_certificate` set to `true`
258+
varType: string
259+
- name: managed_ssl_certificate_domains
260+
description: Create Google-managed SSL certificates for specified domains. Requires `ssl` to be set to `true`
261+
varType: list(string)
262+
defaultValue: []
263+
- name: certificate_map
264+
description: Certificate Map ID in format projects/{project}/locations/global/certificateMaps/{name}. Identifies a certificate map associated with the given target proxy. Requires `ssl` to be set to `true`
265+
varType: string
266+
- name: ssl_policy
267+
description: Selfink to SSL Policy
268+
varType: string
269+
- name: quic
270+
description: Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only.
209271
varType: bool
210-
defaultValue: true
211272
- name: edge_security_policy
212273
description: The resource URL for the edge security policy to associate with the backend service
213274
varType: string
214-
- name: enable_ipv6
215-
description: Enable IPv6 address on the CDN load-balancer
216-
varType: bool
217-
defaultValue: false
218-
- name: firewall_networks
219-
description: Names of the networks to create firewall rules in
220-
varType: list(string)
221-
defaultValue:
222-
- default
223-
- name: firewall_projects
224-
description: Names of the projects to create firewall rules in
225-
varType: list(string)
226-
defaultValue:
227-
- default
228-
- name: http_forward
229-
description: Set to `false` to disable HTTP port 80 forward
230-
varType: bool
231-
defaultValue: true
232-
- name: http_keep_alive_timeout_sec
233-
description: Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds).
234-
varType: number
235-
- name: http_port
236-
description: The port for the HTTP load balancer
237-
varType: number
238-
defaultValue: 80
239-
- name: https_port
240-
description: The port for the HTTPS load balancer
241-
varType: number
242-
defaultValue: 443
275+
- name: security_policy
276+
description: The resource URL for the security policy to associate with the backend service
277+
varType: string
243278
- name: https_redirect
244279
description: Set to `true` to enable https redirect on the lb.
245280
varType: bool
246281
defaultValue: false
247-
- name: ipv6_address
248-
description: An existing IPv6 address to use (the actual IP address value)
249-
varType: string
282+
- name: random_certificate_suffix
283+
description: Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert.
284+
varType: bool
285+
defaultValue: false
250286
- name: labels
251287
description: The labels to attach to resources created by this module
252288
varType: map(string)
@@ -255,60 +291,24 @@ spec:
255291
description: Load balancing scheme type (EXTERNAL for classic external load balancer, EXTERNAL_MANAGED for Envoy-based load balancer, and INTERNAL_SELF_MANAGED for traffic director)
256292
varType: string
257293
defaultValue: EXTERNAL
258-
- name: managed_ssl_certificate_domains
259-
description: Create Google-managed SSL certificates for specified domains. Requires `ssl` to be set to `true`
260-
varType: list(string)
261-
defaultValue: []
262-
- name: name
263-
description: Name for the forwarding rule and prefix for supporting resources
264-
varType: string
265-
required: true
266294
- name: network
267295
description: Network for INTERNAL_SELF_MANAGED load balancing scheme
268296
varType: string
269297
defaultValue: default
270-
- name: private_key
271-
description: Content of the private SSL key. Requires `ssl` to be set to `true` and `create_ssl_certificate` set to `true`
272-
varType: string
273-
- name: project
274-
description: The project to deploy to, if not set the default provider project is used.
275-
varType: string
276-
required: true
277-
- name: quic
278-
description: Specifies the QUIC override policy for this resource. Set true to enable HTTP/3 and Google QUIC support, false to disable both. Defaults to null which enables support for HTTP/3 only.
279-
varType: bool
280-
- name: random_certificate_suffix
281-
description: Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert.
282-
varType: bool
283-
defaultValue: false
284-
- name: security_policy
285-
description: The resource URL for the security policy to associate with the backend service
286-
varType: string
287298
- name: server_tls_policy
288299
description: The resource URL for the server TLS policy to associate with the https proxy service
289300
varType: string
290-
- name: ssl
291-
description: "Set to `true` to enable SSL support. If `true` then at least one of these are required: 1) `ssl_certificates` OR 2) `create_ssl_certificate` set to `true` and `private_key/certificate` OR 3) `managed_ssl_certificate_domains`, OR 4) `certificate_map`"
292-
varType: bool
293-
defaultValue: false
294-
- name: ssl_certificates
295-
description: SSL cert self_link list. Requires `ssl` to be set to `true`
296-
varType: list(string)
297-
defaultValue: []
298-
- name: ssl_policy
299-
description: Selfink to SSL Policy
300-
varType: string
301-
- name: target_service_accounts
302-
description: List of target service accounts for health check firewall rule. Exactly one of target_tags or target_service_accounts should be specified.
303-
varType: list(string)
304-
defaultValue: []
305-
- name: target_tags
306-
description: List of target tags for health check firewall rule. Exactly one of target_tags or target_service_accounts should be specified.
307-
varType: list(string)
308-
defaultValue: []
309-
- name: url_map
310-
description: The url_map resource to use. Default is to send all traffic to first backend.
311-
varType: string
301+
- name: http_port
302+
description: The port for the HTTP load balancer
303+
varType: number
304+
defaultValue: 80
305+
- name: https_port
306+
description: The port for the HTTPS load balancer
307+
varType: number
308+
defaultValue: 443
309+
- name: http_keep_alive_timeout_sec
310+
description: Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds).
311+
varType: number
312312
outputs:
313313
- name: backend_services
314314
description: The backend service resources.
@@ -333,8 +333,11 @@ spec:
333333
- roles/compute.xpnAdmin
334334
- level: Project
335335
roles:
336-
- roles/owner
337336
- roles/storage.admin
337+
- roles/compute.admin
338+
- roles/run.admin
339+
- roles/iam.serviceAccountUser
340+
- roles/certificatemanager.owner
338341
services:
339342
- cloudresourcemanager.googleapis.com
340343
- storage-api.googleapis.com
@@ -343,3 +346,10 @@ spec:
343346
- run.googleapis.com
344347
- iam.googleapis.com
345348
- certificatemanager.googleapis.com
349+
providerVersions:
350+
- source: hashicorp/google
351+
version: ">= 6.0, < 7"
352+
- source: hashicorp/google-beta
353+
version: ">= 6.0, < 7"
354+
- source: hashicorp/random
355+
version: ">= 2.1"

0 commit comments

Comments
 (0)