Azure CLI Service Principal Terraform Env Variable Authentication

Zhao, Jordan 1 Reputation point
2022-11-02T16:36:16.033+00:00

In response to: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/service_principal_client_secret

I'm wondering if there are any work arounds to storing credentials as environment variables when configuring the service principal in terraform using the Azure Cloud Shell. It seems to be a redundant process for each session especially when the attempt is to automate more of the process for clients. Alternatives already include using a bash script.

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
677 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 26,021 Reputation points
    2022-11-03T16:20:51.153+00:00

    @Zhao, Jordan

    Thanks for reaching out on Microsoft Q&A Platform.

    From this document, there are notes about authenticating using the Azure CLI. can you please check this once.

    256810-image.png

    Hope this helps.
    If you need further help on this, tag me in a comment.
    If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.

    0 comments No comments