sourcerepo and cloudbuild at 01-resman

This commit is contained in:
agusramirez@google.com 2022-06-15 19:12:11 -05:00
parent 6c63c6aed8
commit 2eb996d33d
5 changed files with 11 additions and 8 deletions

View File

@ -36,7 +36,8 @@ module "automation-project" {
# machine (service accounts) IAM bindings
iam = {
"roles/owner" = [
module.automation-tf-bootstrap-sa.iam_email
module.automation-tf-bootstrap-sa.iam_email,
module.automation-tf-resman-sa.iam_email
]
"roles/iam.serviceAccountAdmin" = [
module.automation-tf-resman-sa.iam_email

View File

@ -35,7 +35,7 @@ module "branch-network-cicd-repo" {
fast-02-networking = {
filename = ".cloudbuild/workflow.yaml"
included_files = ["**/*tf", ".cloudbuild/workflow.yaml"]
service_account = module.branch-network-sa.id
service_account = module.branch-network-sa-cicd.0.id
substitutions = {}
template = {
project_id = null

View File

@ -35,7 +35,7 @@ module "branch-security-cicd-repo" {
fast-02-security = {
filename = ".cloudbuild/workflow.yaml"
included_files = ["**/*tf", ".cloudbuild/workflow.yaml"]
service_account = module.branch-security-sa.id
service_account = module.branch-security-sa-cicd.0.id
substitutions = {}
template = {
project_id = null

View File

@ -37,7 +37,7 @@ module "branch-teams-dev-pf-cicd-repo" {
included_files = [
"**/*json", "**/*tf", "**/*yaml", ".cloudbuild/workflow.yaml"
]
service_account = module.branch-teams-dev-pf-sa.iam_email
service_account = module.branch-teams-dev-pf-sa-cicd.0.id
substitutions = {}
template = {
project_id = null
@ -68,7 +68,7 @@ module "branch-teams-prod-pf-cicd-repo" {
included_files = [
"**/*json", "**/*tf", "**/*yaml", ".cloudbuild/workflow.yaml"
]
service_account = module.branch-teams-prod-pf-sa.iam_email
service_account = module.branch-teams-prod-pf-sa-cicd.0.id
substitutions = {}
template = {
project_id = null

View File

@ -144,9 +144,11 @@ 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
branch = v.branch
name = v.name
provider = try(
local.identity_providers[v.identity_provider].name, null
)
service_account = local.cicd_workflow_attrs[k].service_account
} if v != null
}