Add Service Usage Consumer role to GitHub Actions service account #6895
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.
Description
Adresses #6828
Grant the Service Account the
roles/serviceusage.serviceUsageConsumer
role to grant permission to use enabled Google Cloud services on the quota project.My guess is that the since we specified in #6819 to use the user project for the quota, the service account makes a request against the user project. Granting the service account the permission to use the quota project should allow it to make requests against the quota project.
Scenarios Tested
Test case used: https://github.com/aalej/issues-6828-attempt-1
Manual - Verify if adding the role lets the pull requests automatically add the hosting preview domain to the Auth domain
roles/serviceusage.serviceUsageConsumer
to the service accountVia
firebase init
- Verify if the changes made will automatically add the Service Usage Consumer role by default on setupfirebase init hosting:github
roles/serviceusage.serviceUsageConsumer
) roleNotes
This will not fix issues if the GitHub action service account was created using
firebase-tools
v13.4.0 onwards and prior to this. Users would need to manually add theroles/serviceusage.serviceUsageConsumer
to the service Account