project-sunbird / sunbird-ed-installer

MIT License
1 stars 21 forks source link

Terraform is registering all the providers in Azure subscription and failing sometime #4

Open sanketnagdive opened 8 months ago

sanketnagdive commented 8 months ago

For new azure subscription we have observed that few providers needs to be register or else script will try to register all the providers/services in Azure which are not required as well. Its best practice to make sure only the required services are registered. Also, script is failing and giving the following error while registering the providers some times "Getting error after running ./install.sh ""│ More information on the ""skip_provider_registration"" flag can be found here: │ https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration │ │ Original Error: Cannot register providers: Microsoft.AVS. Errors were: waiting for Subscription Provider (Subscription: ""d9908e94-6899-4ef6-8a14-5a185b3b7254"" │ Provider Name: ""Microsoft.AVS"") to be registered: context deadline exceeded │ │ with provider[""registry.terraform.io/hashicorp/azurerm""], │ on main.tf line 1, in provider ""azurerm"": │ 1: provider ""azurerm"" {"

We can instruct the user to make sure the required services/providers are registered and update the terraform scripts to skip the registration of all the services. I have raised PR for the same https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_provider_registration

cc @gandham-santhosh @mohitga @vinukumar-vs @santhosh-tg @keshavprasadms

mohitga commented 8 months ago

Thanks @sanketnagdive @keshavprasadms can you look at it once?

beepdot commented 8 months ago

We used the Azure account provided by the sunbird team. We don't have access to any other azure account to replicate this issue. It worked without any issues in the account provided by the Sunbird team. If the team has identified some issues, its good to add that in the README document. As we wont know what would be the configurations of a customer's Azure account and it can have many permissions / restrictions, it better to address this in documentation and add more contents in the docs as and when a customer encounters other such Azure acocunt issues.