-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Create beta access SA's for gridpath and zerolab. #3577
Conversation
9ac4c31
to
e767b70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully the comments etc. help you get a sense of how all this TF stuff works - but let me know if you want to hop on a quick call to talk about it!
} | ||
|
||
resource "google_storage_bucket_iam_binding" "binding" { | ||
bucket = "parquet.catalyst.coop" | ||
role = "roles/storage.objectViewer" | ||
members = [ | ||
"serviceAccount:rmi-beta-access@catalyst-cooperative-pudl.iam.gserviceaccount.com", | ||
"serviceAccount:dgm-github-action@dbcp-dev-350818.iam.gserviceaccount.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bendnorman FYI - one day I'll give a proper tutorial on terraform, but if we need to add other folks to the storage.objectViewer
role we can add them like this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me!
# 2024-04-18: separate from the others because this was the first one - if we | ||
# combined the two, this would delete and recreate the service account | ||
resource "google_service_account" "service_account" { | ||
account_id = "rmi-beta-access" | ||
display_name = "RMI Beta Access" | ||
display_name = "rmi_beta_access" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok so this is just renaming an existing service account?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! To be more consistent with the other display names.
|
||
# 2024-04-18: after creating a new SA you will have to also create a keypair | ||
# for the user. | ||
resource "google_service_account" "beta_access_service_accounts" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any google resources that get named: beta_access_service_accounts
or is this just the name of the terraform step/resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! This is the name of the resource in Terraform - Google sees the account_id
as the actual ID of each service account.
Overview
Testing
How did you make sure this worked?
Ran
terraform plan
and saw that we added two SA's, renamed one, and no other changes were planned.To-do list