hashicorp / terraform-provider-azurestack

Terraform provider for Azure Stack
https://www.terraform.io/docs/providers/azurestack/
Mozilla Public License 2.0
40 stars 64 forks source link

Add support for loading TokenAudience from clouds.config #307

Open bicisteadm opened 1 week ago

bicisteadm commented 1 week ago

This pull request introduces the GetResourceIDFromCloudsConfig function, allowing the endpoint_active_directory_resource_id to be retrieved from the clouds.config file (~/.azure/clouds.config). If present, this value is used to set the TokenAudience in the Azure environment during client initialization.

Motivation: This resolves issues where applications in Entra ID (Azure AD) may not always have the correct Application ID URI configured. By reading the TokenAudience from clouds.config, the provider can dynamically adapt to such configurations without requiring manual intervention.

The implementation is backward-compatible, defaulting to existing behavior if the file or key is not available.

hashicorp-cla-app[bot] commented 1 week ago

CLA assistant check
All committers have signed the CLA.