delightful-fireman-31689
10/08/2021, 2:51 AMimport * as azure_native from "@pulumi/azure-native";
const b2cTenant = new azure_native.azureactivedirectory.B2CTenant("b2c", {
location: "Australia",
properties: {
countryCode: "AU",
displayName: "My Tenant",
},
resourceGroupName: "my-rg",
resourceName: "<http://mytenant123451234234523456456756789876.onmicrosoft.com|mytenant123451234234523456456756789876.onmicrosoft.com>",
sku: {
name: "PremiumP1",
tier: "A0",
},
});
and here is the log:
192-168-0-1:pulumi tuatara$ pulumi up --yes --skip-preview --debug --logflow --logtostderr
Please choose a stack, or create a new one: dev
Updating (dev)
View Live: <https://app.pulumi.com/[REDACTED]/myPulumiProject/dev/updates/2>
Type Name Status Info
pulumi:pulumi:Stack myPulumiProject-dev **failed** 1 error; 16 debugs
+ └─ azure-native:azureactivedirectory:B2CTenant b2c **creating failed** 1 error
Diagnostics:
azure-native:azureactivedirectory:B2CTenant (b2c):
error: resource partially created but read failed autorest/azure: Service returned an error. Status=404 Code="NotFound" Message="Resource with ID '[REDACTED]/my-rg/mytenant123451234234523456456756789876.onmicrosoft.com' does not exist." Target="resource": autorest/azure: Service returned an error. Status=404 Code="NotFound" Message="Resource with ID '[REDACTED]/my-rg/mytenant123451234234523456456756789876.onmicrosoft.com' does not exist." Target="resource"
pulumi:pulumi:Stack (myPulumiProject-dev):
debug: 2021/10/08 13:24:33 Testing if Service Principal / Client Certificate is applicable for Authentication..
debug: 2021/10/08 13:24:33 Testing if Multi Tenant Service Principal / Client Secret is applicable for Authentication..
debug: 2021/10/08 13:24:33 Testing if Service Principal / Client Secret is applicable for Authentication..
debug: 2021/10/08 13:24:33 Testing if Managed Service Identity is applicable for Authentication..
debug: 2021/10/08 13:24:33 Testing if Obtaining a token from the Azure CLI is applicable for Authentication..
debug: 2021/10/08 13:24:33 Using Obtaining a token from the Azure CLI for Authentication
debug: 2021/10/08 13:24:33 Getting OAuth config for endpoint <https://login.microsoftonline.com/> with tenant [REDACTED]
debug: Registering resource: t=pulumi:pulumi:Stack, name=myPulumiProject-dev, custom=false, remote=false
debug: RegisterResource RPC prepared: t=pulumi:pulumi:Stack, name=myPulumiProject-dev
debug: RegisterResource RPC finished: resource:myPulumiProject-dev[pulumi:pulumi:Stack]; err: null, resp: urn:pulumi:dev::myPulumiProject::pulumi:pulumi:Stack::myPulumiProject-dev,,,,
debug: Running program '[REDACTED]' in pwd '[REDACTED]' w/ args:
debug: Registering resource: t=azure-native:azureactivedirectory:B2CTenant, name=b2c, custom=true, remote=false
debug: RegisterResourceOutputs RPC prepared: urn=urn:pulumi:dev::myPulumiProject::pulumi:pulumi:Stack::myPulumiProject-dev
debug: RegisterResource RPC prepared: t=azure-native:azureactivedirectory:B2CTenant, name=b2c
debug: RegisterResourceOutputs RPC finished: urn=urn:pulumi:dev::myPulumiProject::pulumi:pulumi:Stack::myPulumiProject-dev; err: null, resp:
debug: RegisterResourceOutputs RPC finished: urn=urn:pulumi:dev::myPulumiProject::pulumi:pulumi:Stack::myPulumiProject-dev; err: null, resp:
error: update failed
Resources:
1 unchanged
Duration: 1m12s
witty-candle-66007
10/08/2021, 4:09 PMStatus=404 Code=“NotFound” Message=“Resource with ID ‘[REDACTED]/my-rg/mytenant123451234234523456456756789876.onmicrosoft.com’ does not exist.”
So, I would double/triple check that resource exists and is accessible.delightful-fireman-31689
10/08/2021, 9:43 PMwitty-candle-66007
10/12/2021, 1:14 PM<http://mytenant123451234234523456456756789876.onmicrosoft.com|mytenant123451234234523456456756789876.onmicrosoft.com>
, is created and then referenced here.
Is that correct?delightful-fireman-31689
10/14/2021, 8:41 AM2019-01-01-preview
as they suggest, you will get response 201. Digging deeper into error I found there is an undocumented property required in the payload: properties.tenantId
. Now if you add this property to the payload, and change the API version to 2017-01-30
(the only non-preview version), it results in response 200 and a successfully created B2C tenant.witty-candle-66007
10/14/2021, 2:34 PMproperties.tenantId
input, does it work?delightful-fireman-31689
10/14/2021, 4:58 PM