melodic-easter-82419
12/20/2019, 5:07 PMpulumi up
. So I get the following error
error: Error building AzureRM Client: 3 errors occurred:
* A Subscription ID must be configured when authenticating as a Service Principal using a Client Secret.
* A Client ID must be configured when authenticating as a Service Principal using a Client Secret.
* A Tenant ID must be configured when authenticating as a Service Principal using a Client Secret.
Anyone know why this wouldn't use my credentials on my local dev machine?broad-dog-22463
12/20/2019, 5:08 PMmelodic-easter-82419
12/20/2019, 5:08 PMaz login --use-device-code
broad-dog-22463
12/20/2019, 5:11 PM--use-device-code
?Code/pulumi-testing/azure-get-resources
▶ az login --use-device-code
To sign in, use a web browser to open the page <https://microsoft.com/devicelogin> and enter the code XXXXXXX to authenticate.
[
{
"cloudName": "AzureCloud",
<redacted>
}
]
Code/pulumi-testing/azure-get-resources
▶ pulumi up
Previewing update (dev):
Type Name Plan
+ pulumi:pulumi:Stack azure-get-resources-dev create
+ └─ azure:core:ResourceGroup resourceGroup create
Resources:
+ 2 to create
Do you want to perform this update? yes
Updating (dev):
Type Name Status
+ pulumi:pulumi:Stack azure-get-resources-dev created
+ └─ azure:core:ResourceGroup resourceGroup created
Resources:
+ 2 created
Duration: 12s
melodic-easter-82419
12/20/2019, 5:17 PMbroad-dog-22463
12/20/2019, 5:21 PMmelodic-easter-82419
12/20/2019, 5:24 PMimport * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
// Create an Azure Resource Group
const resourceGroup = new azure.core.ResourceGroup("resourceGroup");
// Create an Azure resource (Storage Account)
const account = new azure.storage.Account("storage", {
// The location for the storage account will be derived automatically from the resource group.
resourceGroupName: resourceGroup.name,
accountTier: "Standard",
accountReplicationType: "LRS",
});
// Export the connection string for the storage account
export const connectionString = account.primaryConnectionString;
config:
azure:environment: public
azure:location: WestUS
pulumi:template: azure-typescript
broad-dog-22463
12/20/2019, 5:36 PMmelodic-easter-82419
12/20/2019, 5:48 PMbroad-dog-22463
12/20/2019, 5:55 PMmelodic-easter-82419
12/20/2019, 6:02 PMbroad-dog-22463
12/20/2019, 6:11 PMwhite-balloon-205
12/20/2019, 6:32 PMwhen authenticating as a service principal using a Client Secret
part of the error message means you are somehow trying to use a client secret and are not actually using the az login
credentials. The most likely cause of that would be some environment variable you have set which is getting picked up.melodic-easter-82419
12/20/2019, 6:42 PMbroad-dog-22463
12/20/2019, 6:50 PM