Google Compute help

19 views
Skip to first unread message

Morgan Andrew Davis

unread,
Apr 3, 2019, 10:46:24 AM4/3/19
to Packer
I am currently attempting to use the packer google compute builder to create images for my company. Currently, whenever I run the build I get the message: googlecompute: error creating the instance: googleapi: error 403: required 'compute.zones.get' permission for 'projects/oceanic-muse-200813/zones/us-east4-a', forbidden. I have messed around with the I am settings and thought I might have fixed it but apparently not. The following is my json file: {
"builders": [{
"type": "googlecompute",
"account_file": "C:/Users/Morgan Davis/google-account.json",
                "project_id": "oceanic-muse-200813",
"source_image": "centos-7-v20190326",
                "zone": "us-east4-a",
                "image_name": "asl-hub-{{timestamp}}",
"ssh_username": "<temp>"
}]
}

Thank you for your time.

Sincerely,
Morgan Davis

Rickard von Essen

unread,
Apr 3, 2019, 3:33:44 PM4/3/19
to packe...@googlegroups.com
So the user in the account file don't have the mentioned permission. Check which role it has and then what permissions it has. 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/53e12216-7ed3-4c1a-8691-81d999e7a91b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Morgan Andrew Davis

unread,
Apr 3, 2019, 4:28:00 PM4/3/19
to Packer
Alright. I made a new service account and got its account file instead. I now get a different error concerning the ssh handshake. It says something to the effect of: handshake failed unable to authenticate attempted methods [public key none] no supported methods remain. Any thoughts? Thank you for the advice earlier as well.

On Wednesday, April 3, 2019 at 3:33:44 PM UTC-4, Rickard von Essen wrote:
So the user in the account file don't have the mentioned permission. Check which role it has and then what permissions it has. 

On Wed, Apr 3, 2019, 16:46 Morgan Andrew Davis <morgana...@gmail.com> wrote:
I am currently attempting to use the packer google compute builder to create images for my company. Currently, whenever I run the build I get the message: googlecompute: error creating the instance: googleapi: error 403: required 'compute.zones.get' permission for 'projects/oceanic-muse-200813/zones/us-east4-a', forbidden. I have messed around with the I am settings and thought I might have fixed it but apparently not. The following is my json file: {
"builders": [{
"type": "googlecompute",
"account_file": "C:/Users/Morgan Davis/google-account.json",
                "project_id": "oceanic-muse-200813",
"source_image": "centos-7-v20190326",
                "zone": "us-east4-a",
                "image_name": "asl-hub-{{timestamp}}",
"ssh_username": "<temp>"
}]
}

Thank you for your time.

Sincerely,
Morgan Davis

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packe...@googlegroups.com.

Morgan Andrew Davis

unread,
Apr 4, 2019, 11:11:33 AM4/4/19
to Packer
Nevermind, I got past that error. Forgot I had to specify a ssh username other than root.


On Wednesday, April 3, 2019 at 3:33:44 PM UTC-4, Rickard von Essen wrote:
So the user in the account file don't have the mentioned permission. Check which role it has and then what permissions it has. 

On Wed, Apr 3, 2019, 16:46 Morgan Andrew Davis <morgana...@gmail.com> wrote:
I am currently attempting to use the packer google compute builder to create images for my company. Currently, whenever I run the build I get the message: googlecompute: error creating the instance: googleapi: error 403: required 'compute.zones.get' permission for 'projects/oceanic-muse-200813/zones/us-east4-a', forbidden. I have messed around with the I am settings and thought I might have fixed it but apparently not. The following is my json file: {
"builders": [{
"type": "googlecompute",
"account_file": "C:/Users/Morgan Davis/google-account.json",
                "project_id": "oceanic-muse-200813",
"source_image": "centos-7-v20190326",
                "zone": "us-east4-a",
                "image_name": "asl-hub-{{timestamp}}",
"ssh_username": "<temp>"
}]
}

Thank you for your time.

Sincerely,
Morgan Davis

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages