Neither; I assume after sysprep you're using Packer's provisioners? At the very end of your provisioning section, add a powershell provisioner to delete the folder; that way it's there while the machine is being provisioned but any sensitive information generated during the provisioning will be gone before the vm is saved into a golden image.
On Tue, Feb 26, 2019 at 1:31 PM goffries <[email protected]> wrote: > As in after the sysprep step, Or right before? > > On Tuesday, February 26, 2019 at 11:50:56 AM UTC-8, Megan Marsh wrote: >> >> You could have a provisioner delete the temp folder as the last step in >> the build process. >> >> On Tue, Feb 26, 2019 at 11:49 AM goffries <[email protected]> wrote: >> >>> My primary concern is files being left over with secrets left behind. Is >>> there a way to safely guarantee everything gets cleaned up properly? >>> >>> On Tuesday, February 26, 2019 at 9:40:59 AM UTC-8, Megan Marsh wrote: >>>> >>>> I'm pretty sure we expect $TEMP to be there, yes. We upload our >>>> powershell files to it. If you delete that folder, you can _probably_ work >>>> around this by updating the value of $TEMP so that Packer has somewhere to >>>> upload files to. >>>> >>> -- >>> This mailing list is governed under the HashiCorp Community Guidelines - >>> https://www.hashicorp.com/community-guidelines.html. Behavior in >>> violation of those guidelines may result in your removal from this mailing >>> list. >>> >>> GitHub Issues: https://github.com/mitchellh/packer/issues >>> IRC: #packer-tool on Freenode >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Packer" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/packer-tool/8b8441f7-cc69-46b3-8ffa-a3ba8fabd77b%40googlegroups.com >>> <https://groups.google.com/d/msgid/packer-tool/8b8441f7-cc69-46b3-8ffa-a3ba8fabd77b%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/packer/issues > IRC: #packer-tool on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Packer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/packer-tool/455eec85-d1bb-42df-8de3-17fb3cf677e7%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/455eec85-d1bb-42df-8de3-17fb3cf677e7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAGPV1uq%3DS8Mfz0u8bCYLjiiVDGwq2vxyy2rUEvU-N8mTkOqkdQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
