https://pulumi.com logo
Title
i

incalculable-napkin-4298

01/19/2023, 10:34 AM
Hi team, while rolling out changes, i'm getting an error SubscriptionIsNotRegistered. subscription x does not register required resource providers, please register resource provider Microsoft.App and Microsoft.ContainerService. I was under the impression that the azure native provider should register these automatically.
I think this is because recently I observed that, when rolling out a container environment, azure rolls out some elements of an AKS cluster as well. But pulumi doesn't know this, so it just fails
l

limited-rainbow-51650

04/14/2023, 11:00 AM
@incalculable-napkin-4298 I was looking into a ConnectedCluster problem earlier today and I had to register these namespaces as well. I brew this using our Command provider:
k8s_resource_provider = local.Command(
    "k8s_resource_provider",
    create="./provider.sh register 'Microsoft.Kubernetes'",
    delete="./provider.sh unregister 'Microsoft.Kubernetes'",
)
With the attached script. Remark that registering/unregistering these providers is for your whole Azure subscription so don't run this in multiple stacks working in the same subscription.
i

incalculable-napkin-4298

04/14/2023, 11:38 AM
Thanks for the script.. will look into it