Skip to content

Instantly share code, notes, and snippets.

@Nogbit
Created May 21, 2022 19:11
Show Gist options
  • Save Nogbit/f91e8a73eaaaffb377af9cc013ea1ef7 to your computer and use it in GitHub Desktop.
Save Nogbit/f91e8a73eaaaffb377af9cc013ea1ef7 to your computer and use it in GitHub Desktop.
SCC - Article - 3
###
# Service account that will be the identity of our GCF
#
resource "google_service_account" "sa_gcf" {
account_id = "gcf-golden-image-scanner"
display_name = "Google Cloud Function that runs the golden image scanner"
}
resource "google_organization_iam_member" "org_scc_findings" {
org_id = var.org_id
role = "roles/securitycenter.findingsEditor"
member = "serviceAccount:${google_service_account.sa_gcf.email}"
}
resource "google_organization_iam_member" "org_scc_assets" {
org_id = var.org_id
role = "roles/securitycenter.assetsViewer"
member = "serviceAccount:${google_service_account.sa_gcf.email}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment