Rename to `create_googleapis_routes`
This commit is contained in:
parent
cecbd2072c
commit
0888cce3a5
|
@ -51,7 +51,7 @@ module "landing-vpc" {
|
|||
inbound = true
|
||||
}
|
||||
# set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ module "dev-spoke-vpc" {
|
|||
data_folder = "${var.factories_config.data_dir}/subnets/dev"
|
||||
psa_config = try(var.psa_ranges.dev, null)
|
||||
# set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ module "prod-spoke-vpc" {
|
|||
data_folder = "${var.factories_config.data_dir}/subnets/prod"
|
||||
psa_config = try(var.psa_ranges.prod, null)
|
||||
# set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ module "landing-vpc" {
|
|||
inbound = true
|
||||
}
|
||||
# set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ module "dev-spoke-vpc" {
|
|||
data_folder = "${var.factories_config.data_dir}/subnets/dev"
|
||||
psa_config = try(var.psa_ranges.dev, null)
|
||||
# set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ module "prod-spoke-vpc" {
|
|||
data_folder = "${var.factories_config.data_dir}/subnets/prod"
|
||||
psa_config = try(var.psa_ranges.prod, null)
|
||||
# set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ module "landing-trusted-vpc" {
|
|||
inbound = true
|
||||
}
|
||||
# Set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ module "dev-spoke-vpc" {
|
|||
delete_default_routes_on_create = true
|
||||
psa_config = try(var.psa_ranges.dev, null)
|
||||
# Set explicit routes for googleapis; send everything else to NVAs
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ module "prod-spoke-vpc" {
|
|||
delete_default_routes_on_create = true
|
||||
psa_config = try(var.psa_ranges.prod, null)
|
||||
# Set explicit routes for googleapis; send everything else to NVAs
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ module "dev-spoke-vpc" {
|
|||
data_folder = "${var.factories_config.data_dir}/subnets/dev"
|
||||
psa_config = try(var.psa_ranges.dev, null)
|
||||
# set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ module "prod-spoke-vpc" {
|
|||
data_folder = "${var.factories_config.data_dir}/subnets/prod"
|
||||
psa_config = try(var.psa_ranges.prod, null)
|
||||
# set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ module "landing-trusted-vpc" {
|
|||
inbound = true
|
||||
}
|
||||
# Set explicit routes for googleapis in case the default route is deleted
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ module "dev-spoke-vpc" {
|
|||
delete_default_routes_on_create = true
|
||||
psa_config = try(var.psa_ranges.dev, null)
|
||||
# Set explicit routes for googleapis; send everything else to NVAs
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ module "prod-spoke-vpc" {
|
|||
delete_default_routes_on_create = true
|
||||
psa_config = try(var.psa_ranges.prod, null)
|
||||
# Set explicit routes for googleapis; send everything else to NVAs
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
private = true
|
||||
restricted = true
|
||||
}
|
||||
|
|
|
@ -422,7 +422,7 @@ module "vpc" {
|
|||
next_hop = "global/gateways/default-internet-gateway"
|
||||
}
|
||||
}
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
restricted = false
|
||||
restricted-6 = false
|
||||
private = false
|
||||
|
@ -434,14 +434,14 @@ module "vpc" {
|
|||
|
||||
### Private Google Access routes
|
||||
|
||||
By default the VPC module creates IPv4 routes for the [Private Google Access ranges](https://cloud.google.com/vpc/docs/configure-private-google-access#config-routing). This behavior can be controlled through the `create_default_routes` variable:
|
||||
By default the VPC module creates IPv4 routes for the [Private Google Access ranges](https://cloud.google.com/vpc/docs/configure-private-google-access#config-routing). This behavior can be controlled through the `create_googleapis_routes` variable:
|
||||
|
||||
```hcl
|
||||
module "vpc" {
|
||||
source = "./fabric/modules/net-vpc"
|
||||
project_id = "my-project"
|
||||
name = "my-vpc"
|
||||
create_default_routes = {
|
||||
create_googleapis_routes = {
|
||||
restricted = false
|
||||
restricted-6 = true
|
||||
private = false
|
||||
|
@ -488,7 +488,7 @@ module "vpc" {
|
|||
| [name](variables.tf#L84) | The name of the network being created. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L100) | The ID of the project where this VPC will be created. | <code>string</code> | ✓ | |
|
||||
| [auto_create_subnetworks](variables.tf#L17) | Set to true to create an auto mode subnet, defaults to custom mode. | <code>bool</code> | | <code>false</code> |
|
||||
| [create_default_routes](variables.tf#L23) | Toggle creation of googleapis private/restricted routes. | <code title="object({ private = optional(bool, true) private-6 = optional(bool, false) restricted = optional(bool, true) restricted-6 = optional(bool, false) })">object({…})</code> | | <code>{}</code> |
|
||||
| [create_googleapis_routes](variables.tf#L23) | Toggle creation of googleapis private/restricted routes. | <code title="object({ private = optional(bool, true) private-6 = optional(bool, false) restricted = optional(bool, true) restricted-6 = optional(bool, false) })">object({…})</code> | | <code>{}</code> |
|
||||
| [data_folder](variables.tf#L35) | An optional folder containing the subnet configurations in YaML format. | <code>string</code> | | <code>null</code> |
|
||||
| [delete_default_routes_on_create](variables.tf#L41) | Set to true to delete the default routes at creation time. | <code>bool</code> | | <code>false</code> |
|
||||
| [description](variables.tf#L47) | An optional description of this resource (triggers recreation on change). | <code>string</code> | | <code>"Terraform-managed."</code> |
|
||||
|
|
|
@ -31,7 +31,7 @@ locals {
|
|||
priority = 1000
|
||||
tags = null
|
||||
}
|
||||
if var.create_default_routes[k]
|
||||
if var.create_googleapis_routes[k]
|
||||
}
|
||||
_routes = merge(local._googleapis_routes, coalesce(var.routes, {}))
|
||||
routes = {
|
||||
|
|
|
@ -20,7 +20,7 @@ variable "auto_create_subnetworks" {
|
|||
default = false
|
||||
}
|
||||
|
||||
variable "create_default_routes" {
|
||||
variable "create_googleapis_routes" {
|
||||
description = "Toggle creation of googleapis private/restricted routes."
|
||||
type = object({
|
||||
private = optional(bool, true)
|
||||
|
|
Loading…
Reference in New Issue