2022-01-19 05:17:20 -08:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
locals {
|
2022-04-11 23:17:27 -07:00
|
|
|
_tpl_providers = "${path.module}/templates/providers.tf.tpl"
|
|
|
|
cicd_workflow_attrs = {
|
|
|
|
data_platform_dev = {
|
|
|
|
service_account = try(module.branch-dp-dev-sa-cicd.0.email, null)
|
|
|
|
tf_providers_file = "03-data-platform-dev-providers.tf"
|
2022-06-08 02:34:08 -07:00
|
|
|
tf_var_files = local.cicd_workflow_var_files.stage_3
|
2022-04-11 23:17:27 -07:00
|
|
|
}
|
|
|
|
data_platform_prod = {
|
|
|
|
service_account = try(module.branch-dp-prod-sa-cicd.0.email, null)
|
|
|
|
tf_providers_file = "03-data-platform-prod-providers.tf"
|
2022-06-08 02:34:08 -07:00
|
|
|
tf_var_files = local.cicd_workflow_var_files.stage_3
|
2022-04-11 23:17:27 -07:00
|
|
|
}
|
|
|
|
networking = {
|
|
|
|
service_account = try(module.branch-network-sa-cicd.0.email, null)
|
|
|
|
tf_providers_file = "02-networking-providers.tf"
|
2022-06-08 02:34:08 -07:00
|
|
|
tf_var_files = local.cicd_workflow_var_files.stage_2
|
2022-04-11 23:17:27 -07:00
|
|
|
}
|
|
|
|
project_factory_dev = {
|
2022-06-08 02:34:08 -07:00
|
|
|
service_account = try(module.branch-teams-dev-pf-sa-cicd.0.email, null)
|
2022-04-11 23:17:27 -07:00
|
|
|
tf_providers_file = "03-project-factory-dev-providers.tf"
|
2022-06-08 02:34:08 -07:00
|
|
|
tf_var_files = local.cicd_workflow_var_files.stage_3
|
2022-04-11 23:17:27 -07:00
|
|
|
}
|
|
|
|
project_factory_prod = {
|
2022-06-08 02:34:08 -07:00
|
|
|
service_account = try(module.branch-teams-prod-pf-sa-cicd.0.email, null)
|
2022-04-11 23:17:27 -07:00
|
|
|
tf_providers_file = "03-project-factory-prod-providers.tf"
|
2022-06-08 02:34:08 -07:00
|
|
|
tf_var_files = local.cicd_workflow_var_files.stage_3
|
2022-04-11 23:17:27 -07:00
|
|
|
}
|
|
|
|
security = {
|
|
|
|
service_account = try(module.branch-security-sa-cicd.0.email, null)
|
|
|
|
tf_providers_file = "02-security-providers.tf"
|
2022-06-08 02:34:08 -07:00
|
|
|
tf_var_files = local.cicd_workflow_var_files.stage_2
|
2022-04-11 23:17:27 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cicd_workflows = {
|
|
|
|
for k, v in local.cicd_repositories : k => templatefile(
|
|
|
|
"${path.module}/templates/workflow-${v.type}.yaml",
|
|
|
|
merge(local.cicd_workflow_attrs[k], {
|
|
|
|
identity_provider = local.identity_providers[v.identity_provider].name
|
|
|
|
outputs_bucket = var.automation.outputs_bucket
|
|
|
|
stage_name = k
|
|
|
|
})
|
|
|
|
)
|
|
|
|
}
|
2022-02-15 15:35:50 -08:00
|
|
|
folder_ids = merge(
|
|
|
|
{
|
2022-02-16 03:47:41 -08:00
|
|
|
data-platform = module.branch-dp-dev-folder.id
|
2022-02-15 22:52:20 -08:00
|
|
|
networking = module.branch-network-folder.id
|
|
|
|
networking-dev = module.branch-network-dev-folder.id
|
|
|
|
networking-prod = module.branch-network-prod-folder.id
|
|
|
|
sandbox = module.branch-sandbox-folder.id
|
|
|
|
security = module.branch-security-folder.id
|
|
|
|
teams = module.branch-teams-folder.id
|
2022-02-15 15:35:50 -08:00
|
|
|
},
|
|
|
|
{
|
2022-04-11 23:17:27 -07:00
|
|
|
for k, v in module.branch-teams-team-folder :
|
|
|
|
"team-${k}" => v.id
|
2022-02-15 15:35:50 -08:00
|
|
|
},
|
|
|
|
{
|
2022-04-11 23:17:27 -07:00
|
|
|
for k, v in module.branch-teams-team-dev-folder :
|
|
|
|
"team-${k}-dev" => v.id
|
2022-02-15 15:35:50 -08:00
|
|
|
},
|
|
|
|
{
|
2022-04-11 23:17:27 -07:00
|
|
|
for k, v in module.branch-teams-team-prod-folder :
|
|
|
|
"team-${k}-prod" => v.id
|
2022-02-15 15:35:50 -08:00
|
|
|
}
|
|
|
|
)
|
2022-01-19 05:17:20 -08:00
|
|
|
providers = {
|
2022-04-11 23:17:27 -07:00
|
|
|
"02-networking" = templatefile(local._tpl_providers, {
|
2022-01-19 05:17:20 -08:00
|
|
|
bucket = module.branch-network-gcs.name
|
|
|
|
name = "networking"
|
|
|
|
sa = module.branch-network-sa.email
|
|
|
|
})
|
2022-04-11 23:17:27 -07:00
|
|
|
"02-security" = templatefile(local._tpl_providers, {
|
2022-01-19 05:17:20 -08:00
|
|
|
bucket = module.branch-security-gcs.name
|
|
|
|
name = "security"
|
|
|
|
sa = module.branch-security-sa.email
|
|
|
|
})
|
2022-04-11 23:17:27 -07:00
|
|
|
"03-data-platform-dev" = templatefile(local._tpl_providers, {
|
Add Data Platform to FAST (#510)
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* merge tools changes
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* add bolierplate to validate_schema
Co-authored-by: Julio Castillo <juliocc@users.noreply.github.com>
* stage 02-security
* Import Fast from dev repository.
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* Copy FAST top level README
* Copy FAST top level README
* TODO list
* TODO list
* fix linting action to account for fast
* remove providers file
* add missing boilerplate
* update factory README
* align examples tfdoc
* fast readmes tfdoc
* disable markdown link check
* really disable markdown link check
* update TODO
* switch to local module refs in stage0
* replace module refs in 02-sec
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* merge tools changes
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* add bolierplate to validate_schema
Co-authored-by: Julio Castillo <juliocc@users.noreply.github.com>
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* stage 02-security
* Import Fast from dev repository.
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* Copy FAST top level README
* Copy FAST top level README
* TODO list
* TODO list
* fix linting action to account for fast
* remove providers file
* add missing boilerplate
* update factory README
* align examples tfdoc
* fast readmes tfdoc
* disable markdown link check
* really disable markdown link check
* update TODO
* switch to local module refs in stage0
* replace module refs in 02-sec
* Move first draft to fast branch
* Fix roles and variables. Add e2e DAG example!
* Fix example
* Fix KMS
* First draft: README
* Update README
* Add DLP, update README
* Update Readme
* README
* Add todos
* Merge master
* Merge master
* Merge master
* Fix and test KMS, Fix and test existing prj (it works also with single prj), Update README
* Fix READM and Demo
* add on TF files
* Remove block comments
* simplify service_encryption_keys logic
* fix README
* Fix TODOs
* fix tfdoc description
* fix demo README
* fix sample files
* rename tf files
* Fix outputs file name, fix README, remove dependeces on composer resource
* Add test.
* Fix README.
* Initial README update
* README review
* Fix issues & readme
* Fix README
* Fix README
* Fix test error
* Fix test error
* Add datacatalog
* Fix test, for real? :-)
* fix readme
* support policy_boolean
* split Cloud NAT flag
* Fix README.
* Fix Shared VPC, first try :-)
* Fix tests and resource name
* fix tests
* fix tests
* README refactor
* Fix secondary range logic
* First commit
* Replace existing data platform
* Fix secondary range logic
* Fix README
* Replace DP example tests with the new one.
* Fix test module location.
* Fix test module location, for real.
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Add TODO, VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Add TODO
* Fix module path
* Initial fix for KMS
* Add PubSub encryption
* Fix secondary range logic
* First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Add TODO, VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Add TODO
* Fix module path
* Initial fix for KMS
* Update READMEs
* Update README
* Fix composer roles and README.
* Fix test.
* Fixes.
* Add DLP documentation link.
* Temp commit with errors
* Refactor variables
* Fix secondary range logic
* First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Add TODO, VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Add TODO
* Fix module path
* Initial fix for KMS
* rebase
* rebase
* rebase
* Rebase
* rebase
* Update READMEs
* Fixes.
* Fix new variables
* Fix misconfiguration and tests.
* Fix secondary range logic
* First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Add TODO, VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Add TODO
* Fix module path
* Initial fix for KMS
* rebase
* rebase
* rebase
* Rebase
* rebase
* Update READMEs
* Fixes.
* Rebase - Fix secondary range logic
* Rebase - First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Initial fix for KMS
* Fix secondary range logic
* First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Fix module path
* Initial fix for KMS
* Update READMEs
* Fixes.
* Fix new variables
* Revert VPC-SC logic
* Fix variable typos
* README fixes
* Fix Project Name logic
* Fix Linting
* READEME
* update READEME
* update READEME
* update README
* mandatory project creation, refactor
* formatting
* add TODO for service accounts descriptive name
* use project module to assign shared vpc roles
* Fix shared-vpc-project module
* Fix vpc name and tests
* README
* update to newer version
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
Co-authored-by: Julio Castillo <juliocc@users.noreply.github.com>
Co-authored-by: Julio Castillo <jccb@google.com>
2022-02-11 08:32:16 -08:00
|
|
|
bucket = module.branch-dp-dev-gcs.name
|
|
|
|
name = "dp-dev"
|
|
|
|
sa = module.branch-dp-dev-sa.email
|
|
|
|
})
|
2022-04-11 23:17:27 -07:00
|
|
|
"03-data-platform-prod" = templatefile(local._tpl_providers, {
|
Add Data Platform to FAST (#510)
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* merge tools changes
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* add bolierplate to validate_schema
Co-authored-by: Julio Castillo <juliocc@users.noreply.github.com>
* stage 02-security
* Import Fast from dev repository.
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* Copy FAST top level README
* Copy FAST top level README
* TODO list
* TODO list
* fix linting action to account for fast
* remove providers file
* add missing boilerplate
* update factory README
* align examples tfdoc
* fast readmes tfdoc
* disable markdown link check
* really disable markdown link check
* update TODO
* switch to local module refs in stage0
* replace module refs in 02-sec
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* merge tools changes
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* add bolierplate to validate_schema
Co-authored-by: Julio Castillo <juliocc@users.noreply.github.com>
* Import Fast from dev repository.
>
>
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* stage 02-security
* Import Fast from dev repository.
Co-authored-by: Julio Castillo <jccb@google.com>
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
* Copy FAST top level README
* Copy FAST top level README
* TODO list
* TODO list
* fix linting action to account for fast
* remove providers file
* add missing boilerplate
* update factory README
* align examples tfdoc
* fast readmes tfdoc
* disable markdown link check
* really disable markdown link check
* update TODO
* switch to local module refs in stage0
* replace module refs in 02-sec
* Move first draft to fast branch
* Fix roles and variables. Add e2e DAG example!
* Fix example
* Fix KMS
* First draft: README
* Update README
* Add DLP, update README
* Update Readme
* README
* Add todos
* Merge master
* Merge master
* Merge master
* Fix and test KMS, Fix and test existing prj (it works also with single prj), Update README
* Fix READM and Demo
* add on TF files
* Remove block comments
* simplify service_encryption_keys logic
* fix README
* Fix TODOs
* fix tfdoc description
* fix demo README
* fix sample files
* rename tf files
* Fix outputs file name, fix README, remove dependeces on composer resource
* Add test.
* Fix README.
* Initial README update
* README review
* Fix issues & readme
* Fix README
* Fix README
* Fix test error
* Fix test error
* Add datacatalog
* Fix test, for real? :-)
* fix readme
* support policy_boolean
* split Cloud NAT flag
* Fix README.
* Fix Shared VPC, first try :-)
* Fix tests and resource name
* fix tests
* fix tests
* README refactor
* Fix secondary range logic
* First commit
* Replace existing data platform
* Fix secondary range logic
* Fix README
* Replace DP example tests with the new one.
* Fix test module location.
* Fix test module location, for real.
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Add TODO, VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Add TODO
* Fix module path
* Initial fix for KMS
* Add PubSub encryption
* Fix secondary range logic
* First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Add TODO, VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Add TODO
* Fix module path
* Initial fix for KMS
* Update READMEs
* Update README
* Fix composer roles and README.
* Fix test.
* Fixes.
* Add DLP documentation link.
* Temp commit with errors
* Refactor variables
* Fix secondary range logic
* First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Add TODO, VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Add TODO
* Fix module path
* Initial fix for KMS
* rebase
* rebase
* rebase
* Rebase
* rebase
* Update READMEs
* Fixes.
* Fix new variables
* Fix misconfiguration and tests.
* Fix secondary range logic
* First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Add TODO, VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Add TODO
* Fix module path
* Initial fix for KMS
* rebase
* rebase
* rebase
* Rebase
* rebase
* Update READMEs
* Fixes.
* Rebase - Fix secondary range logic
* Rebase - First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Possible improvement to handle VPC-SC perimeter projects with folder as variable
* Initial fix for KMS
* Fix secondary range logic
* First commit
* Support DataPlatform project in VPC-SC
* Fix VPC-SC
* Fix module path
* Initial fix for KMS
* Update READMEs
* Fixes.
* Fix new variables
* Revert VPC-SC logic
* Fix variable typos
* README fixes
* Fix Project Name logic
* Fix Linting
* READEME
* update READEME
* update READEME
* update README
* mandatory project creation, refactor
* formatting
* add TODO for service accounts descriptive name
* use project module to assign shared vpc roles
* Fix shared-vpc-project module
* Fix vpc name and tests
* README
* update to newer version
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Simone Ruffilli <sruffilli@google.com>
Co-authored-by: Julio Castillo <juliocc@users.noreply.github.com>
Co-authored-by: Julio Castillo <jccb@google.com>
2022-02-11 08:32:16 -08:00
|
|
|
bucket = module.branch-dp-prod-gcs.name
|
|
|
|
name = "dp-prod"
|
|
|
|
sa = module.branch-dp-prod-sa.email
|
|
|
|
})
|
2022-04-11 23:17:27 -07:00
|
|
|
"03-project-factory-dev" = templatefile(local._tpl_providers, {
|
2022-02-20 02:26:30 -08:00
|
|
|
bucket = module.branch-teams-dev-pf-gcs.name
|
2022-01-19 05:17:20 -08:00
|
|
|
name = "team-dev"
|
2022-02-20 02:26:30 -08:00
|
|
|
sa = module.branch-teams-dev-pf-sa.email
|
2022-01-19 05:17:20 -08:00
|
|
|
})
|
2022-04-11 23:17:27 -07:00
|
|
|
"03-project-factory-prod" = templatefile(local._tpl_providers, {
|
2022-02-20 02:26:30 -08:00
|
|
|
bucket = module.branch-teams-prod-pf-gcs.name
|
2022-01-19 05:17:20 -08:00
|
|
|
name = "team-prod"
|
2022-02-20 02:26:30 -08:00
|
|
|
sa = module.branch-teams-prod-pf-sa.email
|
2022-01-19 05:17:20 -08:00
|
|
|
})
|
2022-04-11 23:17:27 -07:00
|
|
|
"99-sandbox" = templatefile(local._tpl_providers, {
|
2022-02-03 22:42:56 -08:00
|
|
|
bucket = module.branch-sandbox-gcs.name
|
|
|
|
name = "sandbox"
|
|
|
|
sa = module.branch-sandbox-sa.email
|
|
|
|
})
|
2022-01-19 05:17:20 -08:00
|
|
|
}
|
2022-02-15 15:35:50 -08:00
|
|
|
service_accounts = merge(
|
|
|
|
{
|
2022-02-16 05:12:39 -08:00
|
|
|
data-platform-dev = module.branch-dp-dev-sa.email
|
|
|
|
data-platform-prod = module.branch-dp-prod-sa.email
|
2022-02-15 15:35:50 -08:00
|
|
|
networking = module.branch-network-sa.email
|
2022-02-20 02:26:30 -08:00
|
|
|
project-factory-dev = module.branch-teams-dev-pf-sa.email
|
|
|
|
project-factory-prod = module.branch-teams-prod-pf-sa.email
|
2022-02-15 15:35:50 -08:00
|
|
|
sandbox = module.branch-sandbox-sa.email
|
|
|
|
security = module.branch-security-sa.email
|
|
|
|
teams = module.branch-teams-prod-sa.email
|
|
|
|
},
|
|
|
|
{
|
2022-02-16 01:57:54 -08:00
|
|
|
for k, v in module.branch-teams-team-sa : "team-${k}" => v.email
|
2022-02-15 15:35:50 -08:00
|
|
|
},
|
|
|
|
)
|
2022-01-19 05:17:20 -08:00
|
|
|
tfvars = {
|
2022-02-16 00:07:07 -08:00
|
|
|
folder_ids = local.folder_ids
|
|
|
|
service_accounts = local.service_accounts
|
2022-04-13 01:22:33 -07:00
|
|
|
tag_names = var.tag_names
|
2022-01-19 05:17:20 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-11 23:17:27 -07:00
|
|
|
output "cicd_repositories" {
|
|
|
|
description = "WIF configuration for CI/CD repositories."
|
|
|
|
value = {
|
|
|
|
for k, v in local.cicd_repositories : k => {
|
|
|
|
branch = v.branch
|
|
|
|
name = v.name
|
|
|
|
provider = local.identity_providers[v.identity_provider].name
|
|
|
|
service_account = local.cicd_workflow_attrs[k].service_account
|
|
|
|
} if v != null
|
|
|
|
}
|
2022-01-19 05:17:20 -08:00
|
|
|
}
|
|
|
|
|
2022-02-14 14:54:53 -08:00
|
|
|
output "dataplatform" {
|
|
|
|
description = "Data for the Data Platform stage."
|
|
|
|
value = {
|
|
|
|
dev = {
|
|
|
|
folder = module.branch-dp-dev-folder.id
|
|
|
|
gcs_bucket = module.branch-dp-dev-gcs.name
|
|
|
|
service_account = module.branch-dp-dev-sa.email
|
|
|
|
}
|
|
|
|
prod = {
|
|
|
|
folder = module.branch-dp-prod-folder.id
|
|
|
|
gcs_bucket = module.branch-dp-prod-gcs.name
|
|
|
|
service_account = module.branch-dp-prod-sa.email
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-19 05:17:20 -08:00
|
|
|
output "networking" {
|
|
|
|
description = "Data for the networking stage."
|
|
|
|
value = {
|
|
|
|
folder = module.branch-network-folder.id
|
|
|
|
gcs_bucket = module.branch-network-gcs.name
|
|
|
|
service_account = module.branch-network-sa.iam_email
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
output "project_factories" {
|
|
|
|
description = "Data for the project factories stage."
|
|
|
|
value = {
|
|
|
|
dev = {
|
2022-02-20 02:26:30 -08:00
|
|
|
bucket = module.branch-teams-dev-pf-gcs.name
|
|
|
|
sa = module.branch-teams-dev-pf-sa.email
|
2022-01-19 05:17:20 -08:00
|
|
|
}
|
|
|
|
prod = {
|
2022-02-20 02:26:30 -08:00
|
|
|
bucket = module.branch-teams-prod-pf-gcs.name
|
|
|
|
sa = module.branch-teams-prod-pf-sa.email
|
2022-01-19 05:17:20 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# ready to use provider configurations for subsequent stages
|
|
|
|
|
|
|
|
output "providers" {
|
2022-02-14 14:54:53 -08:00
|
|
|
# tfdoc:output:consumers 02-networking 02-security 03-dataplatform xx-sandbox xx-teams
|
2022-01-19 05:17:20 -08:00
|
|
|
description = "Terraform provider files for this stage and dependent stages."
|
|
|
|
sensitive = true
|
|
|
|
value = local.providers
|
|
|
|
}
|
|
|
|
|
|
|
|
output "sandbox" {
|
|
|
|
# tfdoc:output:consumers xx-sandbox
|
|
|
|
description = "Data for the sandbox stage."
|
|
|
|
value = {
|
|
|
|
folder = module.branch-sandbox-folder.id
|
|
|
|
gcs_bucket = module.branch-sandbox-gcs.name
|
|
|
|
service_account = module.branch-sandbox-sa.email
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
output "security" {
|
|
|
|
# tfdoc:output:consumers 02-security
|
|
|
|
description = "Data for the networking stage."
|
|
|
|
value = {
|
|
|
|
folder = module.branch-security-folder.id
|
|
|
|
gcs_bucket = module.branch-security-gcs.name
|
|
|
|
service_account = module.branch-security-sa.iam_email
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
output "teams" {
|
|
|
|
description = "Data for the teams stage."
|
|
|
|
value = {
|
|
|
|
for k, v in module.branch-teams-team-folder : k => {
|
|
|
|
folder = v.id
|
|
|
|
gcs_bucket = module.branch-teams-team-gcs[k].name
|
|
|
|
service_account = module.branch-teams-team-sa[k].email
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# ready to use variable values for subsequent stages
|
|
|
|
|
|
|
|
output "tfvars" {
|
|
|
|
description = "Terraform variable files for the following stages."
|
|
|
|
sensitive = true
|
|
|
|
value = local.tfvars
|
|
|
|
}
|