skip to Main Content

I just created azure account and tried to create resource group using terraform, I provided sub.id, tenant_id, client_id and client_secret. But after terraform init and validate, terraform plan is not responding, will it take long time, should I need to wait or Is it an error?

I tried with gitbash terminal and powershell terminal and I tried with different local directories, it gives the same response. Refer the screenshot here.

2

Answers


  1. this indicates a potential issue or delay in the execution though it is difficult to find out the exact reason without more information.

    Please check the below steps in case any of these will help:

    1. Use this command to enable commands with the debug flag. It will enable debug logging. I think this will provide more information on what Terraform is doing and where it gets stuck.
    terraform plan -debug
    
    1. Also, double-check check you have proper permissions to create a resource group.
    2. Sometimes there might be some network issues or slow Azure API responses and due to that Terraform behaves like it’s hanging. Please try adding some timeout.
    terraform plan -timeout=2m
    
    Login or Signup to reply.
  2. Most probably its due Microsoft Provider(s) not registered. You can either register a provider or set flag skip_provider_registration.

    provider "azurerm" {
      skip_provider_registration = true
    }
    

    Register a provider, if not already:

    Register-AzResourceProvider -ProviderNamespace Microsoft.Network
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search