Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update connection metadata and url_map creation in modules/frontend #471

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Make will use bash instead of sh
SHELL := /usr/bin/env bash

DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.22
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.23
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
REGISTRY_URL := gcr.io/cloud-foundation-cicd

Expand Down Expand Up @@ -85,6 +85,7 @@ docker_generate_docs:
.PHONY: docker_generate_modules
docker_generate_modules:
docker run --rm -it \
-e ENABLE_BPMETADATA \
-v "$(CURDIR)":/workspace \
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_modules'
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ intended for Terraform 0.12.x is [v4.5.0](https://registry.terraform.io/modules/

## Version

Current version is 12.0. Upgrade guides:

- [2.X -> 3.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v3.0.0.md)
- [3.X -> 4.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v4.0.md)
- [6.X -> 7.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v7.0.md)
- [7.X -> 8.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v8.0.md)
- [8.X -> 9.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v9.0.md)
- [9.X -> 10.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v10.0.md)
- [10.X -> 11.0](https://github.com/terraform-google-modules/terraform-google-lb-http/blob/master/docs/upgrading_to_v11.0.md)
Current version is 9.0. Upgrade guides:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems erroneous - latest version is 12?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is autogenerated! If i don't update this the lint test is failing!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- [2.X -> 3.0](/docs/upgrading-v2.0.0-v3.0.0.md)
- [3.X -> 4.0](/docs/upgrading_to_v4.0.md)
- [6.X -> 7.0](/docs/upgrading_to_v7.0.md)
- [7.X -> 8.0](/docs/upgrading_to_v8.0.md)
- [8.X -> 9.0](/docs/upgrading_to_v9.0.md)
- [9.X -> 10.0](/docs/upgrading_to_v10.0.md)

## Usage

Expand Down
2 changes: 1 addition & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ tags:
- 'integration'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.22'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.23'
2 changes: 1 addition & 1 deletion build/lint.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ tags:
- 'lint'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.22'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.23'
191 changes: 99 additions & 92 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -76,9 +76,50 @@ spec:
location: examples/user-managed-google-managed-ssl
interfaces:
variables:
- name: project
description: The project to deploy to, if not set the default provider project is used.
varType: string
required: true
- name: name
description: Name for the forwarding rule and prefix for supporting resources
varType: string
required: true
- name: create_address
description: Create a new global IPv4 address
varType: bool
defaultValue: true
- name: address
description: Existing IPv4 address to use (the actual IP address value)
varType: string
- name: enable_ipv6
description: Enable IPv6 address on the CDN load-balancer
varType: bool
defaultValue: false
- name: create_ipv6_address
description: Allocate a new IPv6 address. Conflicts with "ipv6_address" - if both specified, "create_ipv6_address" takes precedence.
varType: bool
defaultValue: false
- name: ipv6_address
description: An existing IPv6 address to use (the actual IP address value)
varType: string
- name: firewall_networks
description: Names of the networks to create firewall rules in
varType: list(string)
defaultValue:
- default
- name: firewall_projects
description: Names of the projects to create firewall rules in
varType: list(string)
defaultValue:
- default
- name: target_tags
description: List of target tags for health check firewall rule. Exactly one of target_tags or target_service_accounts should be specified.
varType: list(string)
defaultValue: []
- name: target_service_accounts
description: List of target service accounts for health check firewall rule. Exactly one of target_tags or target_service_accounts should be specified.
varType: list(string)
defaultValue: []
- name: backends
description: Map backend indices to list of backend maps.
varType: |-
Expand Down Expand Up @@ -186,67 +227,62 @@ spec:
}))
}))
required: true
- name: certificate
description: Content of the SSL certificate. Requires `ssl` to be set to `true` and `create_ssl_certificate` set to `true`
varType: string
- name: certificate_map
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`
- name: create_url_map
description: Set to `false` if url_map variable is provided.
varType: bool
defaultValue: true
- name: url_map
description: The url_map resource to use. Default is to send all traffic to first backend.
varType: string
- name: create_address
description: Create a new global IPv4 address
- name: http_forward
description: Set to `false` to disable HTTP port 80 forward
varType: bool
defaultValue: true
- name: create_ipv6_address
description: Allocate a new IPv6 address. Conflicts with "ipv6_address" - if both specified, "create_ipv6_address" takes precedence.
- name: ssl
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`"
varType: bool
defaultValue: false
- name: create_ssl_certificate
description: If `true`, Create certificate using `private_key/certificate`
varType: bool
defaultValue: false
- name: create_url_map
description: Set to `false` if url_map variable is provided.
- name: ssl_certificates
description: SSL cert self_link list. Requires `ssl` to be set to `true`
varType: list(string)
defaultValue: []
- name: private_key
description: Content of the private SSL key. Requires `ssl` to be set to `true` and `create_ssl_certificate` set to `true`
varType: string
- name: certificate
description: Content of the SSL certificate. Requires `ssl` to be set to `true` and `create_ssl_certificate` set to `true`
varType: string
- name: managed_ssl_certificate_domains
description: Create Google-managed SSL certificates for specified domains. Requires `ssl` to be set to `true`
varType: list(string)
defaultValue: []
- name: certificate_map
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`
varType: string
- name: ssl_policy
description: Selfink to SSL Policy
varType: string
- name: quic
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.
varType: bool
defaultValue: true
- name: edge_security_policy
description: The resource URL for the edge security policy to associate with the backend service
varType: string
- name: enable_ipv6
description: Enable IPv6 address on the CDN load-balancer
varType: bool
defaultValue: false
- name: firewall_networks
description: Names of the networks to create firewall rules in
varType: list(string)
defaultValue:
- default
- name: firewall_projects
description: Names of the projects to create firewall rules in
varType: list(string)
defaultValue:
- default
- name: http_forward
description: Set to `false` to disable HTTP port 80 forward
varType: bool
defaultValue: true
- name: http_keep_alive_timeout_sec
description: Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds).
varType: number
- name: http_port
description: The port for the HTTP load balancer
varType: number
defaultValue: 80
- name: https_port
description: The port for the HTTPS load balancer
varType: number
defaultValue: 443
- name: security_policy
description: The resource URL for the security policy to associate with the backend service
varType: string
- name: https_redirect
description: Set to `true` to enable https redirect on the lb.
varType: bool
defaultValue: false
- name: ipv6_address
description: An existing IPv6 address to use (the actual IP address value)
varType: string
- name: random_certificate_suffix
description: Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert.
varType: bool
defaultValue: false
- name: labels
description: The labels to attach to resources created by this module
varType: map(string)
Expand All @@ -255,60 +291,24 @@ spec:
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)
varType: string
defaultValue: EXTERNAL
- name: managed_ssl_certificate_domains
description: Create Google-managed SSL certificates for specified domains. Requires `ssl` to be set to `true`
varType: list(string)
defaultValue: []
- name: name
description: Name for the forwarding rule and prefix for supporting resources
varType: string
required: true
- name: network
description: Network for INTERNAL_SELF_MANAGED load balancing scheme
varType: string
defaultValue: default
- name: private_key
description: Content of the private SSL key. Requires `ssl` to be set to `true` and `create_ssl_certificate` set to `true`
varType: string
- name: project
description: The project to deploy to, if not set the default provider project is used.
varType: string
required: true
- name: quic
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.
varType: bool
- name: random_certificate_suffix
description: Bool to enable/disable random certificate name generation. Set and keep this to true if you need to change the SSL cert.
varType: bool
defaultValue: false
- name: security_policy
description: The resource URL for the security policy to associate with the backend service
varType: string
- name: server_tls_policy
description: The resource URL for the server TLS policy to associate with the https proxy service
varType: string
- name: ssl
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`"
varType: bool
defaultValue: false
- name: ssl_certificates
description: SSL cert self_link list. Requires `ssl` to be set to `true`
varType: list(string)
defaultValue: []
- name: ssl_policy
description: Selfink to SSL Policy
varType: string
- name: target_service_accounts
description: List of target service accounts for health check firewall rule. Exactly one of target_tags or target_service_accounts should be specified.
varType: list(string)
defaultValue: []
- name: target_tags
description: List of target tags for health check firewall rule. Exactly one of target_tags or target_service_accounts should be specified.
varType: list(string)
defaultValue: []
- name: url_map
description: The url_map resource to use. Default is to send all traffic to first backend.
varType: string
- name: http_port
description: The port for the HTTP load balancer
varType: number
defaultValue: 80
- name: https_port
description: The port for the HTTPS load balancer
varType: number
defaultValue: 443
- name: http_keep_alive_timeout_sec
description: Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds).
varType: number
outputs:
- name: backend_services
description: The backend service resources.
Expand Down Expand Up @@ -343,3 +343,10 @@ spec:
- run.googleapis.com
- iam.googleapis.com
- certificatemanager.googleapis.com
providerVersions:
- source: hashicorp/google
version: ">= 6.0, < 7"
- source: hashicorp/google-beta
version: ">= 6.0, < 7"
- source: hashicorp/random
version: ">= 2.1"
32 changes: 16 additions & 16 deletions modules/backend/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -151,11 +151,11 @@ spec:
}))
defaultValue: []
connections:
- source:
source: github.com/terraform-google-modules/terraform-google-vm//modules/mig
version: ~> 12.0
spec:
outputExpr: '{"group": instance_group}'
- source:
source: github.com/terraform-google-modules/terraform-google-vm//modules/mig
version: ">= 12.0"
spec:
outputExpr: "{\"group\": instance_group, \"description\": \"Input created by connection\", \"balancing_mode\": \"UTILIZATION\", \"capacity_scaler\": 1.0, \"max_connections\": 1000, \"max_connections_per_instance\": 1000, \"max_connections_per_endpoint\": 1000, \"max_rate\": 1000, \"max_rate_per_instance\": 100, \"max_rate_per_endpoint\": 100, \"max_utilization\": 0.8}"
- name: serverless_neg_backends
description: The list of serverless backend which serves the traffic.
varType: |-
Expand All @@ -167,11 +167,11 @@ spec:
}))
defaultValue: []
connections:
- source:
source: github.com/GoogleCloudPlatform/terraform-google-cloud-run//modules/v2
version: ~> 0.13
spec:
outputExpr: '{"region": location, "service_name": service_name, "type": "cloud-run", "service_version": ""}'
- source:
source: github.com/GoogleCloudPlatform/terraform-google-cloud-run//modules/v2
version: ">= 0.13"
spec:
outputExpr: "{\"region\": location, \"service_name\": service_name, \"type\": \"cloud-run\", \"service_version\": \"\"}"
- name: iap_config
description: Settings for enabling Cloud Identity Aware Proxy Structure.
varType: |-
Expand Down Expand Up @@ -290,18 +290,18 @@ spec:
type:
- list
- - object
- host: string
- backend_service: string
host: string
path: string
backend_service: string
requirements:
roles:
- level: Project
roles:
- roles/owner
- roles/storage.admin
- roles/compute.xpnAdmin
- level: Project
roles:
- roles/compute.xpnAdmin
- roles/owner
- roles/storage.admin
services:
- cloudresourcemanager.googleapis.com
- storage-api.googleapis.com
Expand Down
Loading
Loading