Data Source: azurerm_client_config
Use this data source to access the configuration of the Azure Resource Manager provider.
Example Usage
data "azurerm_client_config" "current" {} output "account_id" { value = "${data.azurerm_client_config.current.service_principal_application_id}" }
Argument Reference
There are no arguments available for this data source.
Attributes Reference
-
client_id
is set to the Azure Client ID (Application Object ID). -
tenant_id
is set to the Azure Tenant ID. -
subscription_id
is set to the Azure Subscription ID.
Note: the following fields are only available when authenticating via a Service Principal (as opposed to using the Azure CLI):
-
service_principal_application_id
is the Service Principal Application ID. -
service_principal_object_id
is the Service Principal Object ID.
Note: To better understand "application" and "service principal", please read Application and service principal objects in Azure Active Directory.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/azurerm/d/client_config.html