Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

eeaton
Copy link
Collaborator

@eeaton eeaton commented Jun 27, 2024

to address #1269.

I haven't been able to test it because our CI test org was not impacted by the default changes to cloud build SA, and has not encountered the permissions error.

@eeaton eeaton requested review from a team, gtsorbo, rjerrems and sleighton2022 as code owners June 27, 2024 09:43
@eeaton eeaton changed the title chore(functions: update cloud functions to specify build SA chore(functions): update cloud functions to specify build SA Jun 27, 2024
Copy link
Contributor

@daniel-cit daniel-cit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the build service account need to be in the full format projects/{{project}}/serviceAccounts/{{email}}

1-org/envs/shared/remote.tf Outdated Show resolved Hide resolved
1-org/envs/shared/cai_monitoring.tf Outdated Show resolved Hide resolved
@daniel-cit
Copy link
Contributor

maybe a new service account created in the SCC project would provide a better separation of concerns.
the org step service account has some org level roles that would not be need for the cloud build process of the CAI function

@daniel-cit
Copy link
Contributor

@eeaton
A quick ix for the build failure would be changing

from

    runtime_env_variables = {
      ROLES     = join(",", var.roles_to_monitor)
      SOURCE_ID = google_scc_source.cai_monitoring.id
    }

to

    runtime_env_variables = {
      ROLES            = join(",", var.roles_to_monitor)
      SOURCE_ID        = google_scc_source.cai_monitoring.id
      LOG_EXECUTION_ID = "true"
    }

here
https://github.com/eeaton/terraform-example-foundation/blob/eeaton-fix-cloudfuncitons-build-default-sa/1-org/modules/cai-monitoring/main.tf#L164C5-L167C6

Change tested locally.
It does not list changes in the plan after this fix

@eeaton
Copy link
Collaborator Author

eeaton commented Jul 3, 2024

The failing CI related to LOG_EXECUTION_ID will be fixed in #1210. Once PR 1210 is merged, I expect the tests here will pass

Copy link
Contributor

@daniel-cit daniel-cit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daniel-cit
Copy link
Contributor

@eeaton @apeabody The build is green 💚

@eeaton eeaton enabled auto-merge (squash) July 5, 2024 11:13
Copy link
Contributor

@apeabody apeabody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @eeaton!

reviewed/approved by @daniel-cit

@eeaton eeaton merged commit 5ba5380 into terraform-google-modules:master Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.