Skip to content

Commit

Permalink
Not an array, but does need a full object reference
Browse files Browse the repository at this point in the history
  • Loading branch information
tomseago committed Jan 31, 2024
1 parent 0748300 commit a9a6aa8
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions devops/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -153,22 +153,20 @@ resource "google_storage_bucket_iam_binding" "buckets_public" {

# Handle static differently because it needs the extra thing stacked on
data "google_iam_policy" "static" {
binding = [
{
role = "roles/storage.objectViewer"
members = [ "allUsers" ]
},

{
role = "roles/storage.objectAdmin"
members = [ "group:gcp-static-bucket@baaahs.org" ]
}
]
binding {
role = "roles/storage.objectViewer"
members = [ "allUsers" ]
}

binding {
role = "roles/storage.objectAdmin"
members = [ "group:gcp-static-bucket@baaahs.org" ]
}
}

resource "google_storage_bucket_iam_policy" "static" {
bucket = google_storage_bucket.static.name
policy_data = data.google_iam_policy.static
policy_data = data.google_iam_policy.static.policy_data
}

# This bucket needs to be writable to devs
Expand Down

0 comments on commit a9a6aa8

Please sign in to comment.