FAST: add 02-networking-peering stage. (#561)
* Networking with peering - initial commit * README and tests * Linter fixes * Linter fixes * Linter fixes * Update README.md * split out vpn/peering in separate files so the rest is identical * fix dns for vpn and peering * update tfdoc to support multiple outputs/variables files * add peering variables * update tfdoc for modules * make it easier to spot errored docs * fix doc * yapf * fix permadiff in firewall module source ranges * FAST: Networking: DNS Fixes * FAST: ability to toggle on-prem vpn creation * FAST: fix outputs Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
This commit is contained in:
13
tests/fast/stages/s02_networking_peering/__init__.py
Normal file
13
tests/fast/stages/s02_networking_peering/__init__.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# 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.
|
||||
44
tests/fast/stages/s02_networking_peering/fixture/main.tf
Normal file
44
tests/fast/stages/s02_networking_peering/fixture/main.tf
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
module "stage" {
|
||||
source = "../../../../../fast/stages/02-networking-peering"
|
||||
data_dir = "../../../../../fast/stages/02-networking-peering/data/"
|
||||
billing_account = {
|
||||
id = "000000-111111-222222"
|
||||
organization_id = 123456789012
|
||||
}
|
||||
custom_roles = {
|
||||
service_project_network_admin = "organizations/123456789012/roles/foo"
|
||||
}
|
||||
folder_ids = {
|
||||
networking = null
|
||||
networking-dev = null
|
||||
networking-prod = null
|
||||
}
|
||||
service_accounts = {
|
||||
data-platform-dev = "string"
|
||||
data-platform-prod = "string"
|
||||
project-factory-dev = "string"
|
||||
project-factory-prod = "string"
|
||||
}
|
||||
organization = {
|
||||
domain = "fast.example.com"
|
||||
id = 123456789012
|
||||
customer_id = "C00000000"
|
||||
}
|
||||
prefix = "fast2"
|
||||
}
|
||||
20
tests/fast/stages/s02_networking_peering/test_plan.py
Normal file
20
tests/fast/stages/s02_networking_peering/test_plan.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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.
|
||||
|
||||
|
||||
def test_counts(fast_e2e_plan_runner):
|
||||
"Test stage."
|
||||
num_modules, num_resources, _ = fast_e2e_plan_runner()
|
||||
# TODO: to re-enable per-module resource count check print _, then test
|
||||
assert num_modules > 0 and num_resources > 0
|
||||
@@ -14,22 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
# module "stage" {
|
||||
# source = "../../../../../fast/stages/02-networking-vpn"
|
||||
# billing_account_id = "000000-111111-222222"
|
||||
# organization = {
|
||||
# domain = "gcp-pso-italy.net"
|
||||
# id = 856933387836
|
||||
# customer_id = "C01lmug8b"
|
||||
# }
|
||||
# prefix = "fast"
|
||||
# project_factory_sa = {
|
||||
# dev = "foo@iam"
|
||||
# prod = "bar@iam"
|
||||
# }
|
||||
# data_dir = "../../../../../fast/stages/02-networking-vpn/data/"
|
||||
# }
|
||||
|
||||
module "stage" {
|
||||
source = "../../../../../fast/stages/02-networking-vpn"
|
||||
data_dir = "../../../../../fast/stages/02-networking-vpn/data/"
|
||||
|
||||
Reference in New Issue
Block a user