Azure/azvmimagebuilder

Question: How do you handle secrets when azure image builder?

gntpet opened this issue · 0 comments

Hey Guys,

How do you handle secrets when azure image builder?

Let's say i have customization, that logins to my container register and pulls an image. How can I pass my login details in secure way?

az image builder customizer add -n $mytemplate -g $myResourceGroup  --type powershell --customizer-name pulldockerimages --defer --exit-codes 0 `
                            --inline-script `
                                'docker login myrepo.azurecr.io --username myUser--password myPassword' `
                                'docker pull myrepo.azurecr.io/imv:onprem-18.4.28601.29139-w1-10.0.17763.2300-ltsc2019' `

Now, it's just stored as plain text and could be seen on Image template Json view, and logs

image

Best Regards,
Gintautas