综合技术

Setup PowerShell Azure Authentication for Pulumi

微信扫一扫,分享到朋友圈

Setup PowerShell Azure Authentication for Pulumi
0

Create an Azure service principal with Azure CLI

This can be done using the Azure CLI or the Azure Portal. Here is the “How To” Azure documentation

Setup the Environment Variables

Once created, you need to set up these PowerShell environment variables. I place these in my PowerShell $Profile
.

$env:ARM_CLIENT_ID       = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
$env:ARM_CLIENT_SECRET   = "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"
$env:ARM_TENANT_ID       = "ZZZZZZZZ-ZZZZ-ZZZZ-ZZZZ-ZZZZZZZZZZZZ"
$env:ARM_SUBSCRIPTION_ID = "SSSSSSSS-SSSS-SSSS-SSSS-SSSSSSSSSSSS"

You can use the same values in Pulumi configuration variables
, if you prefer that they be stored alongside your Pulumi stack for easy multi-user access.

$ pulumi config set azure:clientId "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
$ pulumi config set azure:clientSecret "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY" --secret
$ pulumi config set azure:tenantId "ZZZZZZZZ-ZZZZ-ZZZZ-ZZZZ-ZZZZZZZZZZZZ"

This eliminates having to do az login
, which expires.

阅读原文...


微信扫一扫,分享到朋友圈

Setup PowerShell Azure Authentication for Pulumi
0

Avatar

Léon Bottou and Olivier Bousquet win Test of Time award

上一篇

中国银行业和银行法发展40年的本土经验

下一篇

评论已经被关闭。

插入图片

热门分类

往期推荐

Setup PowerShell Azure Authentication for Pulumi

长按储存图像,分享给朋友