Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
369 stars 166 forks source link

[Issue] Support secretOrRandomPassword in terraform deployments #3832

Closed adrianhall closed 1 day ago

adrianhall commented 2 weeks ago

The current (1.8.1) version of azd with the terraform provider does not provide a similar capability as secretOrRandomPassword.

Can you please provide some guidance on how we can get the similar functionality within Terraform.

ellismg commented 2 weeks ago

Instead of adding native support for this to azd, I would consider trying to use the random_string resource in Terraform.

This will allow a random value to be created and the value will be stored in the state file and re-used across deployments. If you need this stored in KeyVault as well, as secretOrRandomPassword would do, you can use terraform to create that resource.

We built secretOrRandomPassword to address the fact that bicep has nothing like the random_string resource, so we needed something that behaved like this resource and stored the state somewhere.

microsoft-github-policy-service[bot] commented 1 week ago

Hi @adrianhall. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

microsoft-github-policy-service[bot] commented 1 day ago

Hi @adrianhall, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.