SWP: remove condition on IP addresses variable and make them null by default (#2668)
This commit is contained in:
@@ -240,21 +240,21 @@ module "secure-web-proxy" {
|
||||
|
||||
| name | description | type | required | default |
|
||||
|---|---|:---:|:---:|:---:|
|
||||
| [addresses](variables.tf#L17) | One or more IP addresses to be used for Secure Web Proxy. | <code>list(string)</code> | ✓ | |
|
||||
| [certificates](variables.tf#L26) | List of certificates to be used for Secure Web Proxy. | <code>list(string)</code> | ✓ | |
|
||||
| [name](variables.tf#L49) | Name of the Secure Web Proxy resource. | <code>string</code> | ✓ | |
|
||||
| [network](variables.tf#L54) | Name of the network the Secure Web Proxy is deployed into. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L118) | Project id of the project that holds the network. | <code>string</code> | ✓ | |
|
||||
| [region](variables.tf#L123) | Region where resources will be created. | <code>string</code> | ✓ | |
|
||||
| [subnetwork](variables.tf#L149) | Name of the subnetwork the Secure Web Proxy is deployed into. | <code>string</code> | ✓ | |
|
||||
| [delete_swg_autogen_router_on_destroy](variables.tf#L31) | Delete automatically provisioned Cloud Router on destroy. | <code>bool</code> | | <code>true</code> |
|
||||
| [description](variables.tf#L37) | Optional description for the created resources. | <code>string</code> | | <code>"Managed by Terraform."</code> |
|
||||
| [labels](variables.tf#L43) | Resource labels. | <code>map(string)</code> | | <code>{}</code> |
|
||||
| [policy_rules](variables.tf#L59) | List of policy rule definitions, default to allow action. Available keys: secure_tags, url_lists, custom. URL lists that only have values set will be created. | <code title="object({ secure_tags = optional(map(object({ tag = string session_matcher = optional(string) application_matcher = optional(string) priority = number action = optional(string, "ALLOW") enabled = optional(bool, true) tls_inspection_enabled = optional(bool, false) description = optional(string) })), {}) url_lists = optional(map(object({ url_list = string values = optional(list(string)) session_matcher = optional(string) application_matcher = optional(string) priority = number action = optional(string, "ALLOW") enabled = optional(bool, true) tls_inspection_enabled = optional(bool, false) description = optional(string) })), {}) custom = optional(map(object({ session_matcher = optional(string) application_matcher = optional(string) priority = number action = optional(string, "ALLOW") enabled = optional(bool, true) tls_inspection_enabled = optional(bool, false) description = optional(string) })), {}) })">object({…})</code> | | <code>{}</code> |
|
||||
| [ports](variables.tf#L112) | Ports to use for Secure Web Proxy. | <code>list(number)</code> | | <code>[443]</code> |
|
||||
| [scope](variables.tf#L128) | Scope determines how configuration across multiple Gateway instances are merged. | <code>string</code> | | <code>null</code> |
|
||||
| [service_attachment](variables.tf#L134) | PSC service attachment configuration. | <code title="object({ nat_subnets = list(string) automatic_connection = optional(bool, false) consumer_accept_lists = optional(map(string), {}) consumer_reject_lists = optional(list(string)) description = optional(string) domain_name = optional(string) enable_proxy_protocol = optional(bool, false) reconcile_connections = optional(bool) })">object({…})</code> | | <code>null</code> |
|
||||
| [tls_inspection_config](variables.tf#L154) | TLS inspection configuration. | <code title="object({ create_config = optional(object({ ca_pool = optional(string, null) description = optional(string, null) exclude_public_ca_set = optional(bool, false) }), null) id = optional(string, null) })">object({…})</code> | | <code>{}</code> |
|
||||
| [certificates](variables.tf#L23) | List of certificates to be used for Secure Web Proxy. | <code>list(string)</code> | ✓ | |
|
||||
| [name](variables.tf#L46) | Name of the Secure Web Proxy resource. | <code>string</code> | ✓ | |
|
||||
| [network](variables.tf#L51) | Name of the network the Secure Web Proxy is deployed into. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L115) | Project id of the project that holds the network. | <code>string</code> | ✓ | |
|
||||
| [region](variables.tf#L120) | Region where resources will be created. | <code>string</code> | ✓ | |
|
||||
| [subnetwork](variables.tf#L146) | Name of the subnetwork the Secure Web Proxy is deployed into. | <code>string</code> | ✓ | |
|
||||
| [addresses](variables.tf#L17) | Optional IP addresses to be used for Secure Web Proxy. | <code>list(string)</code> | | <code>null</code> |
|
||||
| [delete_swg_autogen_router_on_destroy](variables.tf#L28) | Delete automatically provisioned Cloud Router on destroy. | <code>bool</code> | | <code>true</code> |
|
||||
| [description](variables.tf#L34) | Optional description for the created resources. | <code>string</code> | | <code>"Managed by Terraform."</code> |
|
||||
| [labels](variables.tf#L40) | Resource labels. | <code>map(string)</code> | | <code>{}</code> |
|
||||
| [policy_rules](variables.tf#L56) | List of policy rule definitions, default to allow action. Available keys: secure_tags, url_lists, custom. URL lists that only have values set will be created. | <code title="object({ secure_tags = optional(map(object({ tag = string session_matcher = optional(string) application_matcher = optional(string) priority = number action = optional(string, "ALLOW") enabled = optional(bool, true) tls_inspection_enabled = optional(bool, false) description = optional(string) })), {}) url_lists = optional(map(object({ url_list = string values = optional(list(string)) session_matcher = optional(string) application_matcher = optional(string) priority = number action = optional(string, "ALLOW") enabled = optional(bool, true) tls_inspection_enabled = optional(bool, false) description = optional(string) })), {}) custom = optional(map(object({ session_matcher = optional(string) application_matcher = optional(string) priority = number action = optional(string, "ALLOW") enabled = optional(bool, true) tls_inspection_enabled = optional(bool, false) description = optional(string) })), {}) })">object({…})</code> | | <code>{}</code> |
|
||||
| [ports](variables.tf#L109) | Ports to use for Secure Web Proxy. | <code>list(number)</code> | | <code>[443]</code> |
|
||||
| [scope](variables.tf#L125) | Scope determines how configuration across multiple Gateway instances are merged. | <code>string</code> | | <code>null</code> |
|
||||
| [service_attachment](variables.tf#L131) | PSC service attachment configuration. | <code title="object({ nat_subnets = list(string) automatic_connection = optional(bool, false) consumer_accept_lists = optional(map(string), {}) consumer_reject_lists = optional(list(string)) description = optional(string) domain_name = optional(string) enable_proxy_protocol = optional(bool, false) reconcile_connections = optional(bool) })">object({…})</code> | | <code>null</code> |
|
||||
| [tls_inspection_config](variables.tf#L151) | TLS inspection configuration. | <code title="object({ create_config = optional(object({ ca_pool = optional(string, null) description = optional(string, null) exclude_public_ca_set = optional(bool, false) }), null) id = optional(string, null) })">object({…})</code> | | <code>{}</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
||||
@@ -15,12 +15,9 @@
|
||||
*/
|
||||
|
||||
variable "addresses" {
|
||||
description = "One or more IP addresses to be used for Secure Web Proxy."
|
||||
description = "Optional IP addresses to be used for Secure Web Proxy."
|
||||
type = list(string)
|
||||
validation {
|
||||
condition = length(var.addresses) > 0
|
||||
error_message = "Must specify at least one IP address."
|
||||
}
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "certificates" {
|
||||
|
||||
Reference in New Issue
Block a user