Azure / terraform

Source code for the Azure Marketplace Terraform development VM package.
MIT License
718 stars 804 forks source link

Convert legacy Packer json template to hcl2 template #247

Closed lonegunmanb closed 1 year ago

lonegunmanb commented 1 year ago

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?