Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Identity-Aware-Proxy in GCP #134

Merged
merged 4 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ The intention here is to create a single Packer + cloud-init configuration set t
```
- You need a whole set of IAM privileges, see [here](https://www.packer.io/docs/builders/amazon.html#iam-task-or-instance-role)
- If building Google Cloud Images you should have done one of:
- run `gcloud auth application-default login` which creates `$HOME/.config/gcloud/application_default_credentials.json`
- run `gcloud auth application-default login` which creates `$HOME/.config/gcloud/application_default_credentials.json` (needed every 24 hours).
- run `gcloud auth login` which allows IAP tunnel usage (needed every 24 hours).
- Configured Service Account credentials and have a JSON file whose location is specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable.
- In either case you need `Compute Instance Admin (v1)` permissions, if using a service account you'll need `Service Account User`. See [here](https://www.packer.io/docs/builders/googlecompute.html#precedence-of-authentication-methods) for more information.

Expand Down Expand Up @@ -60,6 +61,8 @@ See `monopacker --help` for details.
You will need to know the builder or builders you want to build; `builder1 builder2` are used in the example here.

```shell
gcloud auth login # user credentials (every 24 hours)
gcloud auth application-default login # app credentails (every 24 hours)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I learned recently that you can get rid of this second line if you add --update-adc to the first one, FYI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaaah. Awesome. :)

Readme updated.

monopacker build builder1 builder2
```

Expand Down
1 change: 1 addition & 0 deletions template/builders/googlecompute.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
inside the VM with processor virtualization capabilities enabled #}
image_licenses:
- projects/vm-options/global/licenses/enable-vmx
use_iap: true
Loading