Hello, I am programming in C# and using the Pulumi...
# azure
l
Hello, I am programming in C# and using the Pulumi.AzureNative.ContainerInstance package (v2.52.0) to deploy our application to Azure in china region, we have restricted the provider version to V20230501(Pulumi.AzureNative.ContainerInstance.V20230501), it worked fine until recently, but now we got the following error message. We have tried different Pulumi CLI versions (v3.147.0 and v.3.145.0), but it still didn't work. Do you have any idea why this is happening?
Copy code
No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
m
Did you change anything from the last time it worked? It says you are using version 2024-05-01-preview, not 2023-05-01. Can you share the code that is throwing this?
l
We haven't changed our code at all, the following is the logs we got from Github action, when we try to deploy our resouces.
Copy code
Setting up stack dms in environment dev-latest for region cn
Fetching Pulumi secrets from Azure Key Vault kv-raven-shared-dev from <http://vault.azure.cn|vault.azure.cn>
The following config is read from keyVault and used in configuration:
        - Subscription: CloudStorage.CN.Development
        - Storage Account: ravenpulumibackendsdev
        - Container Name: ravensharedbackend
ravenpulumibackendsdev
Doing pulumi login
Previewing update (dev-latest-cn-dms):
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  running 'dotnet build -nologo'
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms    Determining projects to restore...
@ previewing update.............
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms    Restored /home/devops/actions-runner/work/raven/raven/Raven.CloudStorage/Raven.CloudStorage.Azure.Common/Raven.CloudStorage.Azure.Common.csproj (in 9.87 sec).
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms    Restored /home/devops/actions-runner/work/raven/raven/Raven.CloudStorage/Raven.CloudStorage.Azure.DatabaseMigrationService/Raven.CloudStorage.Azure.DatabaseMigrationService.csproj (in 9.87 sec).
@ previewing update.......................
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms    Raven.CloudStorage.Azure.Common -> /home/devops/actions-runner/work/raven/raven/Raven.CloudStorage/Raven.CloudStorage.Azure.Common/bin/Debug/net8.0/ThreeShape.Raven.CloudStorage.Azure.Common.dll
@ previewing update....
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms    Raven.CloudStorage.Azure.DatabaseMigrationService -> /home/devops/actions-runner/work/raven/raven/Raven.CloudStorage/Raven.CloudStorage.Azure.DatabaseMigrationService/bin/Debug/net8.0/ThreeShape.Raven.CloudStorage.Azure.DatabaseMigrationService.dll
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  'dotnet build -nologo' completed successfully
@ previewing update.....
Downloading plugin azure-5.89.0: starting
Downloading plugin azure-native-2.52.0: starting
@ previewing update....
Downloading plugin azure-native-2.52.0: done
Installing plugin azure-native-2.52.0: starting
Installing plugin azure-native-2.52.0: done
@ previewing update....
Downloading plugin azure-5.89.0: done
Installing plugin azure-5.89.0: starting
@ previewing update....
Installing plugin azure-5.89.0: done
@ previewing update....

@ previewing update....
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms running 'dotnet build -nologo' completed successfully
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms running read pulumi:pulumi:StackReference organization/Raven.CloudStorage.Azure.Infrastructure/dev-latest-cn-infra
@ previewing update.....
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms running read pulumi:pulumi:StackReference organization/Raven.CloudStorage.Azure.Infrastructure/dev-latest-cn-infra
@ previewing update...............
 ~  azure-native:containerinstance/v20230501:ContainerGroup dms update [diff: ]
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  
Resources:
    ~ 1 to update
    2 unchanged

Updating (dev-latest-cn-dms):
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  running 'dotnet build -nologo'
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms    Determining projects to restore...
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms    All projects are up-to-date for restore.
@ updating....
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms    Raven.CloudStorage.Azure.Common -> /home/devops/actions-runner/work/raven/raven/Raven.CloudStorage/Raven.CloudStorage.Azure.Common/bin/Debug/net8.0/ThreeShape.Raven.CloudStorage.Azure.Common.dll
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms    Raven.CloudStorage.Azure.DatabaseMigrationService -> /home/devops/actions-runner/work/raven/raven/Raven.CloudStorage/Raven.CloudStorage.Azure.DatabaseMigrationService/bin/Debug/net8.0/ThreeShape.Raven.CloudStorage.Azure.DatabaseMigrationService.dll
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  Build succeeded.
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms      0 Warning(s)
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  Time Elapsed 00:00:01.22
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  'dotnet build -nologo' completed successfully
@ updating....

@ updating....
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms running 'dotnet build -nologo' completed successfully
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms running read pulumi:pulumi:StackReference organization/Raven.CloudStorage.Azure.Infrastructure/dev-latest-cn-infra
@ updating.......
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms running read pulumi:pulumi:StackReference organization/Raven.CloudStorage.Azure.Infrastructure/dev-latest-cn-infra
@ updating........................
 ~  azure-native:containerinstance/v20230501:ContainerGroup dms updating (0s) [diff: ]
@ updating........................................................................
 ~  azure-native:containerinstance/v20230501:ContainerGroup dms updated (68s) [diff: ]
@ updating.....
    pulumi:pulumi:Stack Raven.CloudStorage.Azure.DatabaseMigrationService-dev-latest-cn-dms  
Outputs:
    ContainerGroupName: "DatabaseMigrationService"
    ResourceGroupName : "rg-dms-dev-latest-dms-cn"

Resources:
    ~ 1 updated
    2 unchanged

Duration: 1m38s

ERROR: (NoRegisteredProviderFound) No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
m
I believe what is happening here is that the container group is restricted to v20230501 by azure but your code is using the 20240501 preview. I would try looking to see if there is code in your dms setup that is trying to pull the latest api version. You should also try updating the azure-native package to 2.86.0