Where to find the values to subscription id, client id, secret and tenant id?

↘锁芯ラ 提交于 2020-01-16 08:41:49

问题


Actually I am trying to create an infrastructure in azure using terraform so I wanted these keys for programmatic access.


回答1:


SubscriptionId and TenantId belongs to your azure subscription which you can either get from azure portal directly or from powershell.

ClientId and Client Secret are related to the application registered where you will be providing access[role] to your application to perform certain functionality for you. You can convert the secure string password to plain string as below:

When you will register any application in your Azure Active Directory you can have all the details, after creating it- ClientId, Secret, Subscription Id and Tenant Id.

See more details on doing it from Azure Portal.




回答2:


Azure Active Directory whose authentication tokens can be used as the client_id, client_secret, and tenant_id fields needed by Terraform (subscription_id can be independently recovered from your Azure account details).

It's possible to complete this task in either the Azure CLI or in the Azure Portal - in both we'll create a Service Principal which has Contributor rights to the subscription. It's also possible to assign other rights depending on your configuration.

Go Portal -->click on Active Directory-->App registration--> There you will be able to find Application client Id and Directory tenant. For Secrets and click on that option.



来源:https://stackoverflow.com/questions/57849090/where-to-find-the-values-to-subscription-id-client-id-secret-and-tenant-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!