Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAST: fix CI/CD source repositories in stage 01 #682

Merged
merged 12 commits into from
Jun 16, 2022
3 changes: 2 additions & 1 deletion fast/stages/00-bootstrap/automation.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
ludoo marked this conversation as resolved.
Show resolved Hide resolved
]
"roles/iam.serviceAccountAdmin" = [
module.automation-tf-resman-sa.iam_email
Expand Down
4 changes: 2 additions & 2 deletions fast/stages/01-resman/cicd-data-platform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module "branch-dp-dev-cicd-repo" {
included_files = [
"**/*json", "**/*tf", "**/*yaml", ".cloudbuild/workflow.yaml"
]
service_account = module.branch-dp-dev-sa.iam_email
service_account = module.branch-dp-dev-sa-cicd.0.id
substitutions = {}
template = {
project_id = null
Expand Down Expand Up @@ -68,7 +68,7 @@ module "branch-dp-prod-cicd-repo" {
included_files = [
"**/*json", "**/*tf", "**/*yaml", ".cloudbuild/workflow.yaml"
]
service_account = module.branch-dp-prod-sa.iam_email
service_account = module.branch-dp-prod-sa-cicd.0.id
substitutions = {}
template = {
project_id = null
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/01-resman/cicd-networking.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/01-resman/cicd-security.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions fast/stages/01-resman/cicd-teams.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions fast/stages/01-resman/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down