-
Notifications
You must be signed in to change notification settings - Fork 57
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
add use_internal_ip and omit_external_ip fields to export post-processor #211
base: main
Are you sure you want to change the base?
add use_internal_ip and omit_external_ip fields to export post-processor #211
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there apologies for the delayed review here. Our focus has been on Packer itself trying to resolve issues with plugin loading. Looking at the changes and reference issue I can understand the need for this feature.
I left a few suggestions on the change based on my understanding on how Omit and Use internal are working. Please let me know if you have any questions or if my understanding is off.
eb0bc8c
to
97d43c0
Compare
@nywilken thank you so much for taking the time to review! I initially thought of adding both fields I have identified three possible successful combinations of the above fields according to the following truth table:
All the statements you made above are
I think you might not have taken case Having said that, I do think that your suggestion is very reasonable and will prevent any potential "build-time" errors from case In the end I think the disjunction is between allowing all cases (with a the potential error case Please let me know if you agree, and/or what your suggestion would be, thanks in advance! |
97d43c0
to
4fa2ddf
Compare
@cmgsj Im no longer working on these PRs. Pinging @lbajolet-hashicorp to continue pushing this forward. Please keep in mind that his response may be slow as they work on different priorities. |
I've submitted this PR with some enhancements to the Let me know if you have any questions or need additional context. Thanks in advance for your time! |
After trying to use the
googlecompute-export
post-processor, it fails when provisioning the exporter instance because it violates the organization policyconstraints/compute.vmExternalIpAccess
.This is the
packer
code used:and a fragment of the build logs:
This happens because the provisioned export instance always has the fields
omit_external_ip
anduse_internal_ip
set tofalse
, with no way to overwrite them.This PR attempts to change that behavior, by exposing the aforementioned fields in the
googlecompute-export
post-processor config and then using them in thegooglecompute.Config
of the export instance.Example:
Please let me know if a way to circumvent this issue already exists. Any other feedback is welcome as well 🙂!