Add ip_range variable to apigee-x-instance module (#485)
* Add ip_range variable for apigee-x-instance module * Add variable definition and validation for ip_range * Update the validation rule for ip_range variable
This commit is contained in:
committed by
GitHub
parent
e279818b55
commit
4e86fbcd04
@@ -15,10 +15,10 @@
|
||||
*/
|
||||
|
||||
module "apigee-x-instance" {
|
||||
source = "../../../../modules/apigee-x-instance"
|
||||
name = var.name
|
||||
region = var.region
|
||||
cidr_mask = 22
|
||||
source = "../../../../modules/apigee-x-instance"
|
||||
name = var.name
|
||||
region = var.region
|
||||
ip_range = var.ip_range
|
||||
|
||||
apigee_org_id = "my-project"
|
||||
apigee_environments = [
|
||||
|
||||
@@ -23,3 +23,8 @@ variable "region" {
|
||||
type = string
|
||||
default = "europe-west1"
|
||||
}
|
||||
|
||||
variable "ip_range" {
|
||||
type = string
|
||||
default = "10.0.0.0/22"
|
||||
}
|
||||
@@ -39,6 +39,6 @@ def test_instance(resources):
|
||||
instances = [r['values'] for r in resources if r['type']
|
||||
== 'google_apigee_instance']
|
||||
assert len(instances) == 1
|
||||
assert instances[0]['peering_cidr_range'] == 'SLASH_22'
|
||||
assert instances[0]['ip_range'] == '10.0.0.0/22'
|
||||
assert instances[0]['name'] == 'my-test-instance'
|
||||
assert instances[0]['location'] == 'europe-west1'
|
||||
|
||||
Reference in New Issue
Block a user