An organization recently completed the acquisition of a startup and is integrating its standalone Google Cloud project (`analytics-pipeline-prod`) into the corporate environment. An SRE engineer has been tasked with unlinking this project from the startup's legacy credit card billing account and linking it to the parent company's primary corporate Cloud Billing account (`01A2B3-4C5D6E-7F8901`). Following Google Cloud least-privilege best practices, which minimal pair of predefined IAM roles must be granted to the SRE engineer to complete this billing link operation?
- Billing Account User (`roles/billing.user`) on the target Cloud Billing account and Project Billing Manager (`roles/resourcemanager.projectBillingManager`) on the projectCevap
- BBilling Account Administrator (`roles/billing.admin`) on the target Cloud Billing account and Project Billing Manager (`roles/resourcemanager.projectBillingManager`) on the project
- CBilling Account User (`roles/billing.user`) on the target Cloud Billing account and Project Owner (`roles/owner`) on the project
- DBilling Account Viewer (`roles/billing.viewer`) on the target Cloud Billing account and Project Billing Manager (`roles/resourcemanager.projectBillingManager`) on the project
Cevap
Granting Billing Account User (`roles/billing.user`) on the target Cloud Billing account and Project Billing Manager (`roles/resourcemanager.projectBillingManager`) on the target project.
Linking a Google Cloud project to a Cloud Billing account requires permissions on both resources simultaneously. The Billing Account User (`roles/billing.user`) role grants permission to link projects to the billing account (`billing.resourceAssociations.create`). The Project Billing Manager (`roles/resourcemanager.projectBillingManager`) role grants permission to attach or detach billing accounts on the specified project (`resourcemanager.projects.createBillingAssignment`). This combination satisfies least privilege.
Adım Adım Çözüm
Anahtar Kavram
Dual-sided IAM requirements for linking GCP Billing Accounts to Projects under Least Privilege
Tahmini Süre:2m 0s