Closed fgateuil closed 2 years ago
Note that Packer seems to use a deprecated Google API for the impersonation mechanism. A PR is to come from here.
@fgateuil @azr I've just run into this issue - is there an ETA on getting this fix merged?
@fgateuil @azr I've just run into this issue - is there an ETA on getting this fix merged?
Hi @ConorNevin, I've been quite busy these days and the PR I created is just missing a little something to be complete. I'm gonna try to work on it right away in order to have something ready asap. Thanks for the reminder as well ;)
Overview of the Issue
When using Google Cloud IAM impersonation mechanism I'm getting an error stating that my user doesn't have sufficient privileges. I successfully used this mechanism with Terraform hoping it would be the same with Packer.
Reproduction Steps
First of all, in order to use the impersonation mechanism, it is necessary to configure the appropriate service accounts as described here:
roles/editor
to it;service_account_builder@your_project_id.iam.gserviceaccount.com
;service_account_doorman@your_project_id.iam.gserviceaccount.com
;service_account_doorman@your_project_id.iam.gserviceaccount.com
to impersonateservice_account_builder@your_project_id.iam.gserviceaccount.com
by granting him the roles below:Service Account Token Creator
;Service Account User
.service_account_doorman@your_project_id.iam.gserviceaccount.com
:impersonation_json_key.json
.Finally, use the JSON key to run the build.
Plugin and Packer version
Simplified Packer Buildfile
And finally, run the build:
Operating system and Environment details
Log Fragments and crash.log files
Full logs available here.