diff --git a/modules/network/multivpc/README.md b/modules/network/multivpc/README.md index 605a6a3603..9f65c2b8ab 100644 --- a/modules/network/multivpc/README.md +++ b/modules/network/multivpc/README.md @@ -116,6 +116,7 @@ limitations under the License. | [network\_description](#input\_network\_description) | An optional description of this resource (changes will trigger resource destroy/create) | `string` | `""` | no | | [network\_interface\_defaults](#input\_network\_interface\_defaults) | The template of the network settings to be used on all vpcs. |
object({
network = optional(string)
subnetwork = optional(string)
subnetwork_project = optional(string)
network_ip = optional(string, "")
nic_type = optional(string, "GVNIC")
stack_type = optional(string, "IPV4_ONLY")
queue_count = optional(string)
access_config = optional(list(object({
nat_ip = string
network_tier = string
public_ptr_domain_name = string
})), [])
ipv6_access_config = optional(list(object({
network_tier = string
public_ptr_domain_name = string
})), [])
alias_ip_range = optional(list(object({
ip_cidr_range = string
subnetwork_range_name = string
})), [])
})
|
{
"access_config": [],
"alias_ip_range": [],
"ipv6_access_config": [],
"network": null,
"network_ip": "",
"nic_type": "GVNIC",
"queue_count": null,
"stack_type": "IPV4_ONLY",
"subnetwork": null,
"subnetwork_project": null
}
| no | | [network\_name\_prefix](#input\_network\_name\_prefix) | The base name of the vpcs and their subnets, will be appended with a sequence number | `string` | `""` | no | +| [network\_profile](#input\_network\_profile) | A full or partial URL of the network profile to apply to this network.
This field can be set only at resource creation time. For example, the
following are valid URLs:
- https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name}
- projects/{projectId}/global/networkProfiles/{network\_profile\_name}} | `string` | `null` | no | | [network\_routing\_mode](#input\_network\_routing\_mode) | The network dynamic routing mode | `string` | `"REGIONAL"` | no | | [project\_id](#input\_project\_id) | Project in which the HPC deployment will be created | `string` | n/a | yes | | [region](#input\_region) | The default region for Cloud resources | `string` | n/a | yes | diff --git a/modules/network/multivpc/main.tf b/modules/network/multivpc/main.tf index 3b04195f8a..ad06e793c1 100644 --- a/modules/network/multivpc/main.tf +++ b/modules/network/multivpc/main.tf @@ -74,4 +74,5 @@ module "vpcs" { mtu = var.mtu network_description = var.network_description network_routing_mode = var.network_routing_mode + network_profile = var.network_profile } diff --git a/modules/network/multivpc/variables.tf b/modules/network/multivpc/variables.tf index 84d301e954..f51bbde58c 100644 --- a/modules/network/multivpc/variables.tf +++ b/modules/network/multivpc/variables.tf @@ -186,3 +186,15 @@ variable "network_interface_defaults" { alias_ip_range = [] } } + +variable "network_profile" { + type = string + description = <<-EOT + A full or partial URL of the network profile to apply to this network. + This field can be set only at resource creation time. For example, the + following are valid URLs: + - https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name} + - projects/{projectId}/global/networkProfiles/{network_profile_name}} + EOT + default = null +} diff --git a/modules/network/vpc/README.md b/modules/network/vpc/README.md index 97e28d548a..dc8c10192d 100644 --- a/modules/network/vpc/README.md +++ b/modules/network/vpc/README.md @@ -173,7 +173,7 @@ No providers. |------|--------|---------| | [cloud\_router](#module\_cloud\_router) | terraform-google-modules/cloud-router/google | ~> 6.0 | | [nat\_ip\_addresses](#module\_nat\_ip\_addresses) | terraform-google-modules/address/google | ~> 4.1 | -| [vpc](#module\_vpc) | terraform-google-modules/network/google | ~> 9.0 | +| [vpc](#module\_vpc) | terraform-google-modules/network/google | ~> 10.0 | ## Resources @@ -201,6 +201,7 @@ No resources. | [network\_address\_range](#input\_network\_address\_range) | IP address range (CIDR) for global network | `string` | `"10.0.0.0/9"` | no | | [network\_description](#input\_network\_description) | An optional description of this resource (changes will trigger resource destroy/create) | `string` | `""` | no | | [network\_name](#input\_network\_name) | The name of the network to be created (if unsupplied, will default to "{deployment\_name}-net") | `string` | `null` | no | +| [network\_profile](#input\_network\_profile) | A full or partial URL of the network profile to apply to this network.
This field can be set only at resource creation time. For example, the
following are valid URLs:
- https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name}
- projects/{projectId}/global/networkProfiles/{network\_profile\_name}} | `string` | `null` | no | | [network\_routing\_mode](#input\_network\_routing\_mode) | The network routing mode (default "GLOBAL") | `string` | `"GLOBAL"` | no | | [primary\_subnetwork](#input\_primary\_subnetwork) | DEPRECATED: please see https://goo.gle/hpc-toolkit-vpc-deprecation for migration instructions | `map(string)` | `null` | no | | [project\_id](#input\_project\_id) | Project in which the HPC deployment will be created | `string` | n/a | yes | diff --git a/modules/network/vpc/main.tf b/modules/network/vpc/main.tf index 3c1ceff0d2..6fd4aaf410 100644 --- a/modules/network/vpc/main.tf +++ b/modules/network/vpc/main.tf @@ -156,7 +156,7 @@ locals { module "vpc" { source = "terraform-google-modules/network/google" - version = "~> 9.0" + version = "~> 10.0" network_name = local.network_name project_id = var.project_id @@ -169,6 +169,7 @@ module "vpc" { shared_vpc_host = var.shared_vpc_host delete_default_internet_gateway_routes = var.delete_default_internet_gateway_routes firewall_rules = local.firewall_rules + network_profile = var.network_profile } # This use of the module may appear odd when var.ips_per_nat = 0. The module diff --git a/modules/network/vpc/variables.tf b/modules/network/vpc/variables.tf index 12495b6770..9a5bd7d6fa 100644 --- a/modules/network/vpc/variables.tf +++ b/modules/network/vpc/variables.tf @@ -250,3 +250,15 @@ variable "firewall_log_config" { error_message = "var.firewall_log_config must be set to \"DISABLE_LOGGING\", or enable logging with \"INCLUDE_ALL_METADATA\" or \"EXCLUDE_ALL_METADATA\"" } } + +variable "network_profile" { + type = string + description = <<-EOT + A full or partial URL of the network profile to apply to this network. + This field can be set only at resource creation time. For example, the + following are valid URLs: + - https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name} + - projects/{projectId}/global/networkProfiles/{network_profile_name}} + EOT + default = null +}