I’m using packer with ansible provisioner to build an azure image, and terraform to set up the infrastructure with that azure image as a source
packer build pack.json completes successfully I get the output image id and URL
In my terraform variables
variables.tf I need to specify the source image id, region etc. The problem here is that I don’t want to specify them manually or multiple times. For region (that I know beforehand) it’s easy since I can use environment variables in both situations, but what about the output image? Is there a built-in way to chain these products or some not so hacky approach to do it?