I'm struggling to get my first Pulumi project conn...
# getting-started
e
I'm struggling to get my first Pulumi project connected to Azure GOV Have just gone through the default c# project creation, and the error I'm getting is:
Copy code
Type                                     Name             Plan       Info
 +   pulumi:pulumi:Stack                      storagetest-dev  create
     └─ azure-native:resources:ResourceGroup  resourceGroup               1 error
Diagnostics:
  azure-native:resources:ResourceGroup (resourceGroup):
    error: The configured Azure environment 'public' does not match the determined environment 'usgovernment'.
    When authenticating using the Azure CLI, the configured environment needs to match the one shown by 'az account show'.
    You can change environments using 'az cloud set --name <environment>'.


PS C:\Development\DevOps\storagetest> az account show
{
  "environmentName": "AzureUSGovernment",
What is that 'public' configured Azure environment referring to? I have the location set to:
Copy code
azure-native:location: AzureUSGovernment
h
try usgovernment
e
Thanks, but it makes no difference. In fact, I can put anything I like as the 'azure-native:location', and the error is the same. Feels like it's not being read at all
h
on the resource group component are you setting this property or are assuming it will inherit from the cli env? it worked for us - see the environment specific comments (Supported values are:
public
(default),
usgovernment
,
china)
in this link - https://www.pulumi.com/registry/packages/azure-native/installation-configuration/
e
Ah, I was setting the 'location' not the 'environment! Config needed to be:
Copy code
config:
  azure-native:environment: usgovernment
  azure-native:location: usgovarizona