Fix vpc name and tests

This commit is contained in:
Lorenzo Caggioni 2022-02-10 09:48:51 +01:00
parent 3617c3abf8
commit 2d9d52fd8d
5 changed files with 8 additions and 50 deletions

View File

@ -119,7 +119,7 @@ module "load-vpc" {
source = "../../../modules/net-vpc" source = "../../../modules/net-vpc"
count = local.use_shared_vpc ? 0 : 1 count = local.use_shared_vpc ? 0 : 1
project_id = module.load-project.project_id project_id = module.load-project.project_id
name = "{var.prefix}-default" name = "${var.prefix}-default"
subnets = [ subnets = [
{ {
ip_cidr_range = "10.10.0.0/24" ip_cidr_range = "10.10.0.0/24"

View File

@ -138,7 +138,7 @@ module "transf-vpc" {
source = "../../../modules/net-vpc" source = "../../../modules/net-vpc"
count = local.use_shared_vpc ? 0 : 1 count = local.use_shared_vpc ? 0 : 1
project_id = module.transf-project.project_id project_id = module.transf-project.project_id
name = "{var.prefix}-default" name = "${var.prefix}-default"
subnets = [ subnets = [
{ {
ip_cidr_range = "10.10.0.0/24" ip_cidr_range = "10.10.0.0/24"

View File

@ -16,10 +16,8 @@
module "test" { module "test" {
source = "../../../../../examples/data-solutions/data-platform-foundations/" source = "../../../../../examples/data-solutions/data-platform-foundations/"
organization = { domain : "example.com" } organization_domain = "example.com"
project_create = {
billing_account_id = "123456-123456-123456" billing_account_id = "123456-123456-123456"
parent = "folders/12345678" folder_id = "folders/12345678"
}
prefix = "prefix" prefix = "prefix"
} }

View File

@ -1,40 +0,0 @@
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
variable "organization" {
type = object({
domain = string
})
default = {
domain = "example.com"
}
}
variable "prefix" {
type = string
default = "prefix"
}
variable "project_create" {
type = object({
billing_account_id = string
parent = string
})
default = {
billing_account_id = "123456-123456-123456"
parent = "folders/12345678"
}
}

View File

@ -24,4 +24,4 @@ def test_resources(e2e_plan_runner):
"Test that plan works and the numbers of resources is as expected." "Test that plan works and the numbers of resources is as expected."
modules, resources = e2e_plan_runner(FIXTURES_DIR) modules, resources = e2e_plan_runner(FIXTURES_DIR)
assert len(modules) == 40 assert len(modules) == 40
assert len(resources) == 290 assert len(resources) == 287