Convert legacy Packer json template to hcl2 template #247
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.
WARNING!
To merag this pr, the corresponding document also must be updated, or document's CI pipeline would be broke.
We also need to update the document. In the current document we hard coded the credential in packer's config file (though this credential is fake), this practice might be misunderstood as a recommended way to set the credential, which is not.
We'd better modify the document by using Packer var file to set the credential and warn our reader not to commit this var file into VCS. Why a var file is better than the command line flag or environment variables for our reader? Because setting a var file would not leave traceable logs in our reader's shell history.
This example includes a Packer config file so the reader could build a virtual machine image that used by the Terraform code. This pr added a testing harness setup step so we can build the vm image in our e2e test, then apply the example code.
@TomArcherMsft @grayzu WDYT?