Repository navigation
Make grok-bot read-only for pulumi preview - #16
Merged
Merged
Conversation
Co-authored-by: Leonid Dubinsky <dub@podval.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
grok-botcan runpulumi previewandpreview --refresh. Its organization roles are no longer the terraform list, and it is no longer a key admin of its own key.grokBotServiceAccountOrganizationRoles, which a stack can override the same way asterraformServiceAccountOrganizationRoles. The default isbrowser,iam.securityReviewer,iam.serviceAccountViewer,serviceusage.serviceUsageViewer,billing.viewer, andstorage.bucketViewer. Terraform's role list is unchanged.terraformkeepsiam.serviceAccountKeyAdminongrok-bot(keyAdmin:terraform).grok-botdoes not grant that role to itself.iam.serviceAccountViewercoverskeys.get.storage.objectVieweris granted on the state bucket only, through the existingBucketIamhelper.storage.bucketVieweron the organization covers bucket metadata.Read-only service account for Grok Bot previews.Logical names of retained resources stay the same: the service account, the key (
serviceAccount:grok-bot@<project>-key),keyAdmin:terraform, and terraform's organization members. Version literals9.0.0and6.20.0stay inline. The new bucket binding is a siblingBucketIam, the same Output depth as the existing helper../gradlew buildand./gradlew -p domain-infra/besom compileScalapass. This does not publish.Expected per-stack preview diff
<project>is that stack's infra project id.<domain>is the stack domain. Write roles are whatever the stack currently passes asterraformServiceAccountOrganizationRoles.Deletes
gcp:organizations/iAMMember:IAMMemberserviceAccount:grok-bot@<project>/role:<write-role>— one per write rolegrok-botcurrently shares withterraform. Terraform's own members stay.gcp:serviceaccount/iAMMember:IAMMemberserviceAccount:grok-bot@<project>/keyAdmin:grok-botCreates
gcp:organizations/iAMMember:IAMMember, one per default read-only role (a stack that overridesgrokBotServiceAccountOrganizationRolescreates that list instead):serviceAccount:grok-bot@<project>/role:browserserviceAccount:grok-bot@<project>/role:iam.securityReviewerserviceAccount:grok-bot@<project>/role:iam.serviceAccountViewerserviceAccount:grok-bot@<project>/role:serviceusage.serviceUsageViewerserviceAccount:grok-bot@<project>/role:billing.viewerserviceAccount:grok-bot@<project>/role:storage.bucketViewergcp:storage/bucketIAMMember:BucketIAMMemberstate.<domain>/serviceAccount:grok-bot@<project>/role:storage.objectViewerUpdate
gcp:serviceaccount/account:AccountserviceAccount:grok-bot@<project>— description becomesRead-only service account for Grok Bot previews.Unchanged
gcp:serviceaccount/key:KeyserviceAccount:grok-bot@<project>-key. Key inputs (serviceAccountId,privateKeyType) are unchanged.dependsOnonly drops the deleted key-admin member.gcp:serviceaccount/iAMMember:IAMMemberserviceAccount:grok-bot@<project>/keyAdmin:terraformterraformservice account and its organization roles