Skip to content

Commit

Permalink
chore: update connection metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
q2w committed Nov 25, 2024
1 parent 279c8e8 commit 1c86f6a
Show file tree
Hide file tree
Showing 5 changed files with 303 additions and 273 deletions.
189 changes: 98 additions & 91 deletions metadata.yaml
Original file line number Diff line number Diff line change
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"
30 changes: 15 additions & 15 deletions modules/backend/metadata.yaml
Original file line number Diff line number Diff line change
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

0 comments on commit 1c86f6a

Please sign in to comment.