From 6dd56261bf460bd736ae8f65d62713635bf0e20d Mon Sep 17 00:00:00 2001 From: David Gleich Date: Fri, 27 Sep 2024 09:43:32 +0000 Subject: [PATCH] Add include export ranges to ncc module --- modules/network-connectivity-center/README.md | 2 +- modules/network-connectivity-center/main.tf | 1 + modules/network-connectivity-center/variables.tf | 3 ++- modules/network-connectivity-center/versions.tf | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/network-connectivity-center/README.md b/modules/network-connectivity-center/README.md index b857a0cc..3b1e5b6b 100644 --- a/modules/network-connectivity-center/README.md +++ b/modules/network-connectivity-center/README.md @@ -30,7 +30,7 @@ An extensive example that also contains the creation and attachment of multiple | project\_id | Project ID of the project that holds the network. | `string` | n/a | yes | | router\_appliance\_spokes | Router appliance instances that are associated with the spoke. |
map(object({
instances = set(object({
virtual_machine = string
ip_address = string
}))
location = string
site_to_site_data_transfer = optional(bool, false)
description = optional(string)
labels = optional(map(string))
}))
| `{}` | no | | spoke\_labels | These labels will be added to all NCC spokes | `map(string)` | `{}` | no | -| vpc\_spokes | VPC network that is associated with the spoke |
map(object({
uri = string
exclude_export_ranges = optional(set(string))
description = optional(string)
labels = optional(map(string))
}))
| `{}` | no | +| vpc\_spokes | VPC network that is associated with the spoke |
map(object({
uri = string
exclude_export_ranges = optional(set(string), [])
include_export_ranges = optional(set(string), [])
description = optional(string)
labels = optional(map(string))
}))
| `{}` | no | ## Outputs diff --git a/modules/network-connectivity-center/main.tf b/modules/network-connectivity-center/main.tf index bbf8ff7f..8f68618e 100644 --- a/modules/network-connectivity-center/main.tf +++ b/modules/network-connectivity-center/main.tf @@ -50,6 +50,7 @@ resource "google_network_connectivity_spoke" "vpc_spoke" { linked_vpc_network { uri = each.value.uri exclude_export_ranges = each.value.exclude_export_ranges + include_export_ranges = each.value.include_export_ranges } } diff --git a/modules/network-connectivity-center/variables.tf b/modules/network-connectivity-center/variables.tf index 4ce08715..26612b3b 100644 --- a/modules/network-connectivity-center/variables.tf +++ b/modules/network-connectivity-center/variables.tf @@ -45,7 +45,8 @@ variable "vpc_spokes" { description = "VPC network that is associated with the spoke" type = map(object({ uri = string - exclude_export_ranges = optional(set(string)) + exclude_export_ranges = optional(set(string), []) + include_export_ranges = optional(set(string), []) description = optional(string) labels = optional(map(string)) })) diff --git a/modules/network-connectivity-center/versions.tf b/modules/network-connectivity-center/versions.tf index ab114a30..de82dd4a 100644 --- a/modules/network-connectivity-center/versions.tf +++ b/modules/network-connectivity-center/versions.tf @@ -20,7 +20,7 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = ">= 5.40.0, < 7" + version = ">= 6.2.0, < 7" } }