go-acme / lego

Let's Encrypt/ACME client and library written in Go
https://go-acme.github.io/lego/
MIT License
7.44k stars 985 forks source link

azuredns: CLI authentication doesn't respect tenant setting #2178

Closed orgads closed 1 month ago

orgads commented 1 month ago

Welcome

What did you expect to see?

I'm using terraform acme provider. I set AZURE_AUTH_METHOD to cli, and AZURE_TENANT_ID to a tenant which is not my primary. I expect it to work and use the specified tenant.

What did you see instead?

The tenant is not respected, and authentication fails.

How do you use lego?

Library

Reproduction steps

resource "acme_certificate" "certificate" {
  # ...
  dns_challenge {
    provider = "azuredns"

    config = {
      AZURE_AUTH_METHOD     = "cli"
      AZURE_TENANT_ID       = "<my-non-primary-tenant>"
      AZURE_RESOURCE_GROUP  = "dns-rg"
      AZURE_ZONE_NAME       = local.root_domain
    }
}

Version of lego

v4.16.1

Logs

Go environment (if applicable)

```console $ go version && go env # paste output here ```