Allow multiple PSA service providers in net-vpc module (#2218)
* allowing multiple PSA service providers in net-vpc module * tfdoc * tfdoc * Add tfvars/yaml tests * fix module and tests * re-enable inventory * merge fix * Add multiple PSA test case * fix cloudsql example --------- Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
This commit is contained in:
committed by
GitHub
parent
b4b926a56e
commit
9414779cc2
@@ -65,14 +65,14 @@ module "vpc" {
|
||||
name = "subnet-psc-${k}"
|
||||
region = k
|
||||
}]
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
ranges = merge({ for k, v in var.instances :
|
||||
"apigee-runtime-${k}" => v.runtime_ip_cidr_range
|
||||
}, { for k, v in var.instances :
|
||||
"apigee-troubleshooting-${k}" => v.troubleshooting_ip_cidr_range
|
||||
}
|
||||
)
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
module "apigee" {
|
||||
|
||||
@@ -55,12 +55,12 @@ module "apigee_vpc" {
|
||||
name = "subnet-psc"
|
||||
region = var.region
|
||||
}]
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
ranges = {
|
||||
"apigee-runtime" = var.apigee_runtime_ip_cidr_range
|
||||
"apigee-troubleshooting" = var.apigee_troubleshooting_ip_cidr_range
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
module "apigee" {
|
||||
|
||||
@@ -19,9 +19,9 @@ module "db" {
|
||||
encryption_key_name = var.service_encryption_keys != null ? try(var.service_encryption_keys[var.regions.primary], null) : null
|
||||
network_config = {
|
||||
connectivity = {
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
private_network = local.vpc_self_link
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
name = "${var.prefix}-db"
|
||||
|
||||
@@ -108,10 +108,10 @@ module "vpc" {
|
||||
region = var.regions.primary
|
||||
}
|
||||
]
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
ranges = { cloud-sql = var.sql_configuration.psa_range }
|
||||
routes = null
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
module "firewall" {
|
||||
|
||||
@@ -147,12 +147,12 @@ module "vpc-local" {
|
||||
"secondary_ip_range" : null
|
||||
}
|
||||
]
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
ranges = {
|
||||
"vertex" : "10.13.0.0/18"
|
||||
}
|
||||
routes = null
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
module "firewall" {
|
||||
|
||||
@@ -37,9 +37,9 @@ module "db" {
|
||||
network_config = {
|
||||
authorized_networks = {}
|
||||
connectivity = {
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
private_network = var.network_config.network_self_link
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
database_version = var.cloudsql_config.database_version
|
||||
|
||||
@@ -25,9 +25,9 @@ module "cloudsql" {
|
||||
databases = [local.cloudsql_conf.db]
|
||||
network_config = {
|
||||
connectivity = {
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
private_network = local.network
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
prefix = var.prefix
|
||||
|
||||
@@ -75,12 +75,11 @@ module "vpc" {
|
||||
count = var.vpc_config == null ? 1 : 0
|
||||
project_id = module.project.project_id
|
||||
name = "${var.prefix}-sql-vpc"
|
||||
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
ranges = {
|
||||
cloud-sql = var.ip_ranges.psa
|
||||
}
|
||||
}
|
||||
}]
|
||||
subnets = [
|
||||
{
|
||||
ip_cidr_range = var.ip_ranges.ilb
|
||||
|
||||
@@ -31,11 +31,11 @@ module "vpc" {
|
||||
region = var.region
|
||||
}
|
||||
]
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
ranges = {
|
||||
cloud-sql = var.ip_ranges.psa
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
|
||||
@@ -56,9 +56,9 @@ module "cloudsql" {
|
||||
project_id = module.project.project_id
|
||||
network_config = {
|
||||
connectivity = {
|
||||
psa_config = {
|
||||
psa_configs = [{
|
||||
private_network = module.vpc.self_link
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
name = "${var.prefix}-mysql"
|
||||
|
||||
Reference in New Issue
Block a user