Fix subnet schema in net-vpc module & hybrid subnets example implementation (#2958)
* Fixed subnet schema by adding "allow_subnet_cidr_routes_overlap" field * Implemented hybrid subnets code example and test code
This commit is contained in:
committed by
GitHub
parent
9b04cb130a
commit
b50e8a16dc
@@ -95,10 +95,17 @@ module "vpc" {
|
||||
flow_sampling = 0.5
|
||||
aggregation_interval = "INTERVAL_10_MIN"
|
||||
}
|
||||
},
|
||||
# hybrid subnet
|
||||
{
|
||||
name = "hybrid"
|
||||
region = "europe-west1"
|
||||
ip_cidr_range = "10.0.4.0/24"
|
||||
allow_subnet_cidr_routes_overlap = true
|
||||
}
|
||||
]
|
||||
}
|
||||
# tftest modules=1 resources=7 inventory=subnet-options.yaml e2e
|
||||
# tftest modules=1 resources=8 inventory=subnet-options.yaml e2e
|
||||
```
|
||||
|
||||
### Subnet IAM
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
"enable_private_access": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"allow_subnet_cidr_routes_overlap": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"flow_logs_config": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -32,6 +32,15 @@ values:
|
||||
private_ip_google_access: true
|
||||
project: project-id
|
||||
region: europe-west1
|
||||
? module.vpc.google_compute_subnetwork.subnetwork["europe-west1/hybrid"]
|
||||
: description: Terraform-managed.
|
||||
ip_cidr_range: 10.0.4.0/24
|
||||
log_config: []
|
||||
name: hybrid
|
||||
private_ip_google_access: true
|
||||
project: project-id
|
||||
region: europe-west1
|
||||
allow_subnet_cidr_routes_overlap: true
|
||||
? module.vpc.google_compute_subnetwork.subnetwork["europe-west1/with-flow-logs"]
|
||||
: description: Terraform-managed.
|
||||
ip_cidr_range: 10.0.3.0/24
|
||||
@@ -64,4 +73,4 @@ values:
|
||||
|
||||
counts:
|
||||
google_compute_network: 1
|
||||
google_compute_subnetwork: 4
|
||||
google_compute_subnetwork: 5
|
||||
|
||||
Reference in New Issue
Block a user