New folder structure
|
@ -1 +0,0 @@
|
||||||
plugin_cache_dir = "/workspace/.terraform.d/plugin-cache"
|
|
|
@ -1,61 +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
|
|
||||||
#
|
|
||||||
# https://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.
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: prepare
|
|
||||||
entrypoint: sh
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
python -m pip install --user --no-warn-script-location -r /workspace/tools/REQUIREMENTS.txt &&
|
|
||||||
wget https://releases.hashicorp.com/terraform/${_TERRAFORM_VERSION}/terraform_${_TERRAFORM_VERSION}_linux_amd64.zip &&
|
|
||||||
unzip terraform_${_TERRAFORM_VERSION}_linux_amd64.zip -d /builder/home/.local/bin &&
|
|
||||||
rm terraform_${_TERRAFORM_VERSION}_linux_amd64.zip &&
|
|
||||||
chmod 755 /builder/home/.local/bin/terraform &&
|
|
||||||
mkdir -p /workspace/.terraform.d/plugin-cache
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: boilerplate
|
|
||||||
args: ["/workspace/tools/check_boilerplate.py", "/workspace"]
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: terraform-fmt-check
|
|
||||||
entrypoint: sh
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
terraform fmt -recursive -check /workspace/
|
|
||||||
env:
|
|
||||||
- PATH=/usr/local/bin:/usr/bin:/bin:/builder/home/.local/bin
|
|
||||||
- TF_CLI_CONFIG_FILE=/workspace/.ci/.terraformrc
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: documentation
|
|
||||||
args:
|
|
||||||
[
|
|
||||||
"/workspace/tools/check_documentation.py",
|
|
||||||
"cloud-operations",
|
|
||||||
"data-solutions",
|
|
||||||
"data-solutions/data-platform-foundations",
|
|
||||||
"factories",
|
|
||||||
"factories/firewall-vpc-rules",
|
|
||||||
"foundations",
|
|
||||||
"modules",
|
|
||||||
"networking",
|
|
||||||
]
|
|
||||||
|
|
||||||
substitutions:
|
|
||||||
_TERRAFORM_VERSION: 1.0.4
|
|
||||||
|
|
||||||
tags:
|
|
||||||
- ci
|
|
||||||
- lint
|
|
|
@ -1,47 +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
|
|
||||||
#
|
|
||||||
# https://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.
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: prepare
|
|
||||||
entrypoint: sh
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
python -m pip install --user --no-warn-script-location -r tests/requirements.txt &&
|
|
||||||
wget https://releases.hashicorp.com/terraform/${_TERRAFORM_VERSION}/terraform_${_TERRAFORM_VERSION}_linux_amd64.zip &&
|
|
||||||
unzip terraform_${_TERRAFORM_VERSION}_linux_amd64.zip -d /builder/home/.local/bin &&
|
|
||||||
rm terraform_${_TERRAFORM_VERSION}_linux_amd64.zip &&
|
|
||||||
chmod 755 /builder/home/.local/bin/terraform &&
|
|
||||||
mkdir -p /workspace/.terraform.d/plugin-cache
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: test-environments
|
|
||||||
entrypoint: pytest
|
|
||||||
args:
|
|
||||||
- -vv
|
|
||||||
- tests/cloud_operations
|
|
||||||
- tests/data_solutions
|
|
||||||
- tests/factories
|
|
||||||
- tests/foundations
|
|
||||||
- tests/networking
|
|
||||||
env:
|
|
||||||
- PATH=/usr/local/bin:/usr/bin:/bin:/builder/home/.local/bin
|
|
||||||
- TF_CLI_CONFIG_FILE=/workspace/.ci/.terraformrc
|
|
||||||
|
|
||||||
substitutions:
|
|
||||||
_TERRAFORM_VERSION: 1.0.4
|
|
||||||
|
|
||||||
tags:
|
|
||||||
- "ci"
|
|
||||||
- "test"
|
|
|
@ -1,47 +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
|
|
||||||
#
|
|
||||||
# https://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.
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: prepare
|
|
||||||
entrypoint: sh
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
python -m pip install --user --no-warn-script-location -r tests/requirements.txt &&
|
|
||||||
wget https://releases.hashicorp.com/terraform/${_TERRAFORM_VERSION}/terraform_${_TERRAFORM_VERSION}_linux_amd64.zip &&
|
|
||||||
unzip terraform_${_TERRAFORM_VERSION}_linux_amd64.zip -d /builder/home/.local/bin &&
|
|
||||||
rm terraform_${_TERRAFORM_VERSION}_linux_amd64.zip &&
|
|
||||||
chmod 755 /builder/home/.local/bin/terraform &&
|
|
||||||
mkdir -p /workspace/.terraform.d/plugin-cache
|
|
||||||
# TODO(ludoo): add a step that detects change files and sets tests to run
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: test-examples
|
|
||||||
entrypoint: pytest
|
|
||||||
args:
|
|
||||||
- -vv
|
|
||||||
- tests/examples
|
|
||||||
env:
|
|
||||||
- PATH=/usr/local/bin:/usr/bin:/bin:/builder/home/.local/bin
|
|
||||||
- TF_CLI_CONFIG_FILE=/workspace/.ci/.terraformrc
|
|
||||||
|
|
||||||
options:
|
|
||||||
machineType: "N1_HIGHCPU_8"
|
|
||||||
|
|
||||||
substitutions:
|
|
||||||
_TERRAFORM_VERSION: 1.0.4
|
|
||||||
|
|
||||||
tags:
|
|
||||||
- "ci"
|
|
||||||
- "test"
|
|
|
@ -1,46 +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
|
|
||||||
#
|
|
||||||
# https://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.
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: prepare
|
|
||||||
entrypoint: sh
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
python -m pip install --user --no-warn-script-location -r tests/requirements.txt &&
|
|
||||||
wget https://releases.hashicorp.com/terraform/${_TERRAFORM_VERSION}/terraform_${_TERRAFORM_VERSION}_linux_amd64.zip &&
|
|
||||||
unzip terraform_${_TERRAFORM_VERSION}_linux_amd64.zip -d /builder/home/.local/bin &&
|
|
||||||
rm terraform_${_TERRAFORM_VERSION}_linux_amd64.zip &&
|
|
||||||
chmod 755 /builder/home/.local/bin/terraform &&
|
|
||||||
mkdir -p /workspace/.terraform.d/plugin-cache
|
|
||||||
- name: python:3-alpine
|
|
||||||
id: test-modules
|
|
||||||
entrypoint: pytest
|
|
||||||
args:
|
|
||||||
- -vv
|
|
||||||
- tests/modules
|
|
||||||
env:
|
|
||||||
- PATH=/usr/local/bin:/usr/bin:/bin:/builder/home/.local/bin
|
|
||||||
- TF_CLI_CONFIG_FILE=/workspace/.ci/.terraformrc
|
|
||||||
|
|
||||||
options:
|
|
||||||
machineType: "N1_HIGHCPU_8"
|
|
||||||
|
|
||||||
substitutions:
|
|
||||||
_TERRAFORM_VERSION: 1.0.4
|
|
||||||
|
|
||||||
tags:
|
|
||||||
- "ci"
|
|
||||||
- "test"
|
|
|
@ -54,7 +54,7 @@ jobs:
|
||||||
- name: Run tests environments
|
- name: Run tests environments
|
||||||
id: test-environments
|
id: test-environments
|
||||||
run: |
|
run: |
|
||||||
pytest -vv tests/cloud_operations tests/data_solutions tests/factories tests/foundations tests/networking
|
pytest -n 4 --dist loadfile -vv tests/examples
|
||||||
|
|
||||||
tests-examples:
|
tests-examples:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -83,7 +83,7 @@ jobs:
|
||||||
- name: Run tests examples
|
- name: Run tests examples
|
||||||
id: test-examples
|
id: test-examples
|
||||||
run: |
|
run: |
|
||||||
pytest -vv tests/examples
|
pytest -n 4 --dist loadfile -vv tests/modules/examples
|
||||||
|
|
||||||
tests-modules:
|
tests-modules:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -112,4 +112,4 @@ jobs:
|
||||||
- name: Run tests modules
|
- name: Run tests modules
|
||||||
id: test-modules
|
id: test-modules
|
||||||
run: |
|
run: |
|
||||||
pytest -vv tests/modules
|
pytest -n 4 --dist loadgroup -vv --ignore=tests/modules/examples tests/modules
|
||||||
|
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
@ -20,7 +20,7 @@ locals {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project" {
|
module "project" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
name = var.project_id
|
name = var.project_id
|
||||||
project_create = var.project_create
|
project_create = var.project_create
|
||||||
services = [
|
services = [
|
||||||
|
@ -48,7 +48,7 @@ module "project" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vpc" {
|
module "vpc" {
|
||||||
source = "../../modules/net-vpc"
|
source = "../../../modules/net-vpc"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = var.name
|
name = var.name
|
||||||
subnets = [{
|
subnets = [{
|
||||||
|
@ -60,7 +60,7 @@ module "vpc" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "pubsub" {
|
module "pubsub" {
|
||||||
source = "../../modules/pubsub"
|
source = "../../../modules/pubsub"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = var.name
|
name = var.name
|
||||||
subscriptions = { "${var.name}-default" = null }
|
subscriptions = { "${var.name}-default" = null }
|
||||||
|
@ -72,14 +72,14 @@ module "pubsub" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "service-account" {
|
module "service-account" {
|
||||||
source = "../../modules/iam-service-account"
|
source = "../../../modules/iam-service-account"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = "${var.name}-cf"
|
name = "${var.name}-cf"
|
||||||
# iam_project_roles = { (module.project.project_id) = [local.role_id] }
|
# iam_project_roles = { (module.project.project_id) = [local.role_id] }
|
||||||
}
|
}
|
||||||
|
|
||||||
module "cf" {
|
module "cf" {
|
||||||
source = "../../modules/cloud-function"
|
source = "../../../modules/cloud-function"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = var.name
|
name = var.name
|
||||||
bucket_name = "${var.name}-${random_pet.random.id}"
|
bucket_name = "${var.name}-${random_pet.random.id}"
|
||||||
|
@ -101,7 +101,7 @@ module "cf" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "simple-vm-example" {
|
module "simple-vm-example" {
|
||||||
source = "../../modules/compute-vm"
|
source = "../../../modules/compute-vm"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
zone = "${var.region}-b"
|
zone = "${var.region}-b"
|
||||||
name = var.name
|
name = var.name
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
@ -22,7 +22,7 @@ locals {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project" {
|
module "project" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
name = var.project_id
|
name = var.project_id
|
||||||
project_create = var.project_create
|
project_create = var.project_create
|
||||||
services = [
|
services = [
|
||||||
|
@ -37,7 +37,7 @@ module "project" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vpc" {
|
module "vpc" {
|
||||||
source = "../../modules/net-vpc"
|
source = "../../../modules/net-vpc"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = var.name
|
name = var.name
|
||||||
subnets = [{
|
subnets = [{
|
||||||
|
@ -49,13 +49,13 @@ module "vpc" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "firewall-a" {
|
module "firewall-a" {
|
||||||
source = "../../modules/net-vpc-firewall"
|
source = "../../../modules/net-vpc-firewall"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
network = module.vpc.name
|
network = module.vpc.name
|
||||||
}
|
}
|
||||||
|
|
||||||
module "nat-a" {
|
module "nat-a" {
|
||||||
source = "../../modules/net-cloudnat"
|
source = "../../../modules/net-cloudnat"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
region = var.region
|
region = var.region
|
||||||
name = var.name
|
name = var.name
|
||||||
|
@ -63,7 +63,7 @@ module "nat-a" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "dns-service-zone" {
|
module "dns-service-zone" {
|
||||||
source = "../../modules/dns"
|
source = "../../../modules/dns"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
type = "service-directory"
|
type = "service-directory"
|
||||||
name = var.name
|
name = var.name
|
||||||
|
@ -73,7 +73,7 @@ module "dns-service-zone" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "service-directory" {
|
module "service-directory" {
|
||||||
source = "../../modules/service-directory"
|
source = "../../../modules/service-directory"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
location = var.region
|
location = var.region
|
||||||
name = var.name
|
name = var.name
|
||||||
|
@ -102,7 +102,7 @@ module "service-directory" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vm-ns-editor" {
|
module "vm-ns-editor" {
|
||||||
source = "../../modules/compute-vm"
|
source = "../../../modules/compute-vm"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
zone = "${var.region}-b"
|
zone = "${var.region}-b"
|
||||||
name = "${var.name}-ns"
|
name = "${var.name}-ns"
|
||||||
|
@ -118,7 +118,7 @@ module "vm-ns-editor" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vm-svc-editor" {
|
module "vm-svc-editor" {
|
||||||
source = "../../modules/compute-vm"
|
source = "../../../modules/compute-vm"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
zone = "${var.region}-b"
|
zone = "${var.region}-b"
|
||||||
name = "${var.name}-svc"
|
name = "${var.name}-svc"
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
@ -22,7 +22,7 @@ locals {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project" {
|
module "project" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
for_each = toset(var.teams)
|
for_each = toset(var.teams)
|
||||||
billing_account = var.billing_account_id
|
billing_account = var.billing_account_id
|
||||||
name = each.value
|
name = each.value
|
||||||
|
@ -36,14 +36,14 @@ module "project" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vpc" {
|
module "vpc" {
|
||||||
source = "../../modules/net-vpc"
|
source = "../../../modules/net-vpc"
|
||||||
for_each = local.projects
|
for_each = local.projects
|
||||||
project_id = each.value
|
project_id = each.value
|
||||||
name = "dns-vpc"
|
name = "dns-vpc"
|
||||||
}
|
}
|
||||||
|
|
||||||
module "dns-private" {
|
module "dns-private" {
|
||||||
source = "../../modules/dns"
|
source = "../../../modules/dns"
|
||||||
for_each = local.projects
|
for_each = local.projects
|
||||||
project_id = each.value
|
project_id = each.value
|
||||||
type = "private"
|
type = "private"
|
||||||
|
@ -54,7 +54,7 @@ module "dns-private" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "dns-peering" {
|
module "dns-peering" {
|
||||||
source = "../../modules/dns"
|
source = "../../../modules/dns"
|
||||||
for_each = local.projects
|
for_each = local.projects
|
||||||
project_id = local.svpc_project_id
|
project_id = local.svpc_project_id
|
||||||
name = "peering-${each.key}"
|
name = "peering-${each.key}"
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
@ -48,7 +48,7 @@ locals {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project" {
|
module "project" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
name = var.project_id
|
name = var.project_id
|
||||||
project_create = var.project_create
|
project_create = var.project_create
|
||||||
}
|
}
|
|
@ -19,14 +19,14 @@ locals {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project" {
|
module "project" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
name = var.project_id
|
name = var.project_id
|
||||||
project_create = var.project_create
|
project_create = var.project_create
|
||||||
services = var.services
|
services = var.services
|
||||||
}
|
}
|
||||||
|
|
||||||
module "integration-sa" {
|
module "integration-sa" {
|
||||||
source = "../../modules/iam-service-account"
|
source = "../../../modules/iam-service-account"
|
||||||
for_each = local.service_accounts
|
for_each = local.service_accounts
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = each.value.name
|
name = each.value.name
|
Before Width: | Height: | Size: 271 KiB After Width: | Height: | Size: 271 KiB |
|
@ -22,7 +22,7 @@ locals {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project" {
|
module "project" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
name = var.project_id
|
name = var.project_id
|
||||||
parent = var.root_node
|
parent = var.root_node
|
||||||
billing_account = var.billing_account
|
billing_account = var.billing_account
|
||||||
|
@ -37,7 +37,7 @@ module "project" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "service-account-image-builder" {
|
module "service-account-image-builder" {
|
||||||
source = "../../modules/iam-service-account"
|
source = "../../../modules/iam-service-account"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = "image-builder"
|
name = "image-builder"
|
||||||
iam_project_roles = {
|
iam_project_roles = {
|
||||||
|
@ -49,13 +49,13 @@ module "service-account-image-builder" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "service-account-image-builder-vm" {
|
module "service-account-image-builder-vm" {
|
||||||
source = "../../modules/iam-service-account"
|
source = "../../../modules/iam-service-account"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = "image-builder-vm"
|
name = "image-builder-vm"
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vpc" {
|
module "vpc" {
|
||||||
source = "../../modules/net-vpc"
|
source = "../../../modules/net-vpc"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = "image-builder"
|
name = "image-builder"
|
||||||
subnets = [
|
subnets = [
|
||||||
|
@ -69,7 +69,7 @@ module "vpc" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "firewall" {
|
module "firewall" {
|
||||||
source = "../../modules/net-vpc-firewall"
|
source = "../../../modules/net-vpc-firewall"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
network = module.vpc.name
|
network = module.vpc.name
|
||||||
custom_rules = {
|
custom_rules = {
|
||||||
|
@ -88,7 +88,7 @@ module "firewall" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "nat" {
|
module "nat" {
|
||||||
source = "../../modules/net-cloudnat"
|
source = "../../../modules/net-cloudnat"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
region = var.region
|
region = var.region
|
||||||
name = "default"
|
name = "default"
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
@ -23,7 +23,7 @@ locals {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project" {
|
module "project" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
name = var.project_id
|
name = var.project_id
|
||||||
project_create = var.project_create
|
project_create = var.project_create
|
||||||
services = [
|
services = [
|
||||||
|
@ -40,7 +40,7 @@ module "project" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "pubsub" {
|
module "pubsub" {
|
||||||
source = "../../modules/pubsub"
|
source = "../../../modules/pubsub"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = var.name
|
name = var.name
|
||||||
subscriptions = {
|
subscriptions = {
|
||||||
|
@ -51,7 +51,7 @@ module "pubsub" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "cf" {
|
module "cf" {
|
||||||
source = "../../modules/cloud-function"
|
source = "../../../modules/cloud-function"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = var.name
|
name = var.name
|
||||||
bucket_name = "${var.name}-${random_pet.random.id}"
|
bucket_name = "${var.name}-${random_pet.random.id}"
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
@ -21,7 +21,7 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "project" {
|
module "project" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
name = var.project_id
|
name = var.project_id
|
||||||
parent = var.root_node
|
parent = var.root_node
|
||||||
billing_account = try(var.billing_account, null)
|
billing_account = try(var.billing_account, null)
|
||||||
|
@ -43,7 +43,7 @@ module "project" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "service-account" {
|
module "service-account" {
|
||||||
source = "../../modules/iam-service-account"
|
source = "../../../modules/iam-service-account"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = "${var.name}-cf"
|
name = "${var.name}-cf"
|
||||||
iam_project_roles = {
|
iam_project_roles = {
|
||||||
|
@ -59,7 +59,7 @@ module "service-account" {
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "pubsub" {
|
module "pubsub" {
|
||||||
source = "../../modules/pubsub"
|
source = "../../../modules/pubsub"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = var.name
|
name = var.name
|
||||||
subscriptions = {
|
subscriptions = {
|
||||||
|
@ -70,7 +70,7 @@ module "pubsub" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "pubsub_file" {
|
module "pubsub_file" {
|
||||||
source = "../../modules/pubsub"
|
source = "../../../modules/pubsub"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
name = var.name_cffile
|
name = var.name_cffile
|
||||||
subscriptions = {
|
subscriptions = {
|
||||||
|
@ -85,7 +85,7 @@ module "pubsub_file" {
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "cf" {
|
module "cf" {
|
||||||
source = "../../modules/cloud-function"
|
source = "../../../modules/cloud-function"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
region = var.region
|
region = var.region
|
||||||
name = var.name
|
name = var.name
|
||||||
|
@ -109,7 +109,7 @@ module "cf" {
|
||||||
|
|
||||||
module "cffile" {
|
module "cffile" {
|
||||||
count = var.cai_gcs_export ? 1 : 0
|
count = var.cai_gcs_export ? 1 : 0
|
||||||
source = "../../modules/cloud-function"
|
source = "../../../modules/cloud-function"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
region = var.region
|
region = var.region
|
||||||
name = var.name_cffile
|
name = var.name_cffile
|
||||||
|
@ -193,7 +193,7 @@ resource "google_cloud_scheduler_job" "job_file" {
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "bq" {
|
module "bq" {
|
||||||
source = "../../modules/bigquery-dataset"
|
source = "../../../modules/bigquery-dataset"
|
||||||
project_id = module.project.project_id
|
project_id = module.project.project_id
|
||||||
id = var.cai_config.bq_dataset
|
id = var.cai_config.bq_dataset
|
||||||
location = var.region
|
location = var.region
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
|
@ -17,7 +17,7 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "project-service" {
|
module "project-service" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
name = var.project_service_name
|
name = var.project_service_name
|
||||||
parent = var.root_node
|
parent = var.root_node
|
||||||
billing_account = var.billing_account
|
billing_account = var.billing_account
|
||||||
|
@ -30,7 +30,7 @@ module "project-service" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project-kms" {
|
module "project-kms" {
|
||||||
source = "../../modules/project"
|
source = "../../../modules/project"
|
||||||
name = var.project_kms_name
|
name = var.project_kms_name
|
||||||
parent = var.root_node
|
parent = var.root_node
|
||||||
billing_account = var.billing_account
|
billing_account = var.billing_account
|
||||||
|
@ -46,7 +46,7 @@ module "project-kms" {
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "vpc" {
|
module "vpc" {
|
||||||
source = "../../modules/net-vpc"
|
source = "../../../modules/net-vpc"
|
||||||
project_id = module.project-service.project_id
|
project_id = module.project-service.project_id
|
||||||
name = var.vpc_name
|
name = var.vpc_name
|
||||||
subnets = [
|
subnets = [
|
||||||
|
@ -60,7 +60,7 @@ module "vpc" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vpc-firewall" {
|
module "vpc-firewall" {
|
||||||
source = "../../modules/net-vpc-firewall"
|
source = "../../../modules/net-vpc-firewall"
|
||||||
project_id = module.project-service.project_id
|
project_id = module.project-service.project_id
|
||||||
network = module.vpc.name
|
network = module.vpc.name
|
||||||
admin_ranges = [var.vpc_ip_cidr_range]
|
admin_ranges = [var.vpc_ip_cidr_range]
|
||||||
|
@ -71,7 +71,7 @@ module "vpc-firewall" {
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "kms" {
|
module "kms" {
|
||||||
source = "../../modules/kms"
|
source = "../../../modules/kms"
|
||||||
project_id = module.project-kms.project_id
|
project_id = module.project-kms.project_id
|
||||||
keyring = {
|
keyring = {
|
||||||
name = "my-keyring",
|
name = "my-keyring",
|
||||||
|
@ -97,7 +97,7 @@ module "kms" {
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "vm_example" {
|
module "vm_example" {
|
||||||
source = "../../modules/compute-vm"
|
source = "../../../modules/compute-vm"
|
||||||
project_id = module.project-service.project_id
|
project_id = module.project-service.project_id
|
||||||
zone = "${var.region}-b"
|
zone = "${var.region}-b"
|
||||||
name = "kms-vm"
|
name = "kms-vm"
|
||||||
|
@ -135,7 +135,7 @@ module "vm_example" {
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "kms-gcs" {
|
module "kms-gcs" {
|
||||||
source = "../../modules/gcs"
|
source = "../../../modules/gcs"
|
||||||
project_id = module.project-service.project_id
|
project_id = module.project-service.project_id
|
||||||
prefix = "my-bucket-001"
|
prefix = "my-bucket-001"
|
||||||
name = "kms-gcs"
|
name = "kms-gcs"
|
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 275 KiB |
|
@ -19,7 +19,7 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "project-datamart" {
|
module "project-datamart" {
|
||||||
source = "../../../modules/project"
|
source = "../../../../modules/project"
|
||||||
parent = var.root_node
|
parent = var.root_node
|
||||||
billing_account = var.billing_account_id
|
billing_account = var.billing_account_id
|
||||||
prefix = var.prefix
|
prefix = var.prefix
|
||||||
|
@ -45,7 +45,7 @@ module "project-datamart" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project-dwh" {
|
module "project-dwh" {
|
||||||
source = "../../../modules/project"
|
source = "../../../../modules/project"
|
||||||
parent = var.root_node
|
parent = var.root_node
|
||||||
billing_account = var.billing_account_id
|
billing_account = var.billing_account_id
|
||||||
prefix = var.prefix
|
prefix = var.prefix
|
||||||
|
@ -70,7 +70,7 @@ module "project-dwh" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project-landing" {
|
module "project-landing" {
|
||||||
source = "../../../modules/project"
|
source = "../../../../modules/project"
|
||||||
parent = var.root_node
|
parent = var.root_node
|
||||||
billing_account = var.billing_account_id
|
billing_account = var.billing_account_id
|
||||||
prefix = var.prefix
|
prefix = var.prefix
|
||||||
|
@ -93,7 +93,7 @@ module "project-landing" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project-services" {
|
module "project-services" {
|
||||||
source = "../../../modules/project"
|
source = "../../../../modules/project"
|
||||||
parent = var.root_node
|
parent = var.root_node
|
||||||
billing_account = var.billing_account_id
|
billing_account = var.billing_account_id
|
||||||
prefix = var.prefix
|
prefix = var.prefix
|
||||||
|
@ -122,7 +122,7 @@ module "project-services" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "project-transformation" {
|
module "project-transformation" {
|
||||||
source = "../../../modules/project"
|
source = "../../../../modules/project"
|
||||||
parent = var.root_node
|
parent = var.root_node
|
||||||
billing_account = var.billing_account_id
|
billing_account = var.billing_account_id
|
||||||
prefix = var.prefix
|
prefix = var.prefix
|
||||||
|
@ -154,7 +154,7 @@ module "project-transformation" {
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
module "sa-services-main" {
|
module "sa-services-main" {
|
||||||
source = "../../../modules/iam-service-account"
|
source = "../../../../modules/iam-service-account"
|
||||||
project_id = module.project-services.project_id
|
project_id = module.project-services.project_id
|
||||||
name = var.service_account_names.main
|
name = var.service_account_names.main
|
||||||
iam = var.admins != null ? { "roles/iam.serviceAccountTokenCreator" = var.admins } : {}
|
iam = var.admins != null ? { "roles/iam.serviceAccountTokenCreator" = var.admins } : {}
|