add HTTPCallbackAddress, needed when running within a kubernetes cluster #305
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.
Describe the change you are making here!
When running within a kubernetes workflow/pipelines, the http server used by the vm to communicate back completion cannot be reached directly. Instead, with kubernetes you 'expose' a pod via a LoadBalancer ip or ingress. The exposed ip is available but must be passed in somehow in order for it to be used.
This pull request implements the use of a variable HTTPCallbackAddress, which if provided, is passed along to the vm to be used upon completion when calling back to the http server.
A pull request has been submitted to the packer-plugin-sdk to add the needed variable: hashicorp/packer-plugin-sdk#268
Please include tests. Check out existent tests in the code for example.
I am open to what tests would be useful to add. The code change is very small, and it might be fair to say if there is a test for HTTPAddress, and it is passing, that might be good enough to verify this implementation as well.
If your PR resolves any open issue(s), please indicate them like this so they will be closed when your PR is merged:
Closes: #304