I know there are many (actually 5) topics with the same problem statement but there is no clear understanding and solution.
I’d like to make it resolved here.
The error:
Error: Insufficient features blocks
on <empty> line 0:
(source code not available)
At least 1 "features" blocks are required.
Version:
Terraform v1.1.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v2.95.0
+ provider registry.terraform.io/hashicorp/external v2.2.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/vault v3.3.1
The codebase has a dedicated file with the name gen_provider.tf
# Generated by Terragrunt. Sig: nIlQXj57tbuaRZEa
provider "azurerm" {
subscription_id = XXX
client_id = XXX
client_secret = XXX
tenant_id = XXX
features {}
}
terraform {
terraform validation passed successfully. (it checks azurerm feature block gap)
Trace log (near error):
2022-03-07T13:11:23.394Z [DEBUG] provider: using plugin: version=5
2022-03-07T13:11:23.395Z [DEBUG] provider.terraform-provider-azurerm_v2.95.0_x5: plugin address: address=/tmp/plugin985937110 network=unix timestamp=2022-03-07T13:11:23.394Z
2022-03-07T13:11:23.456Z [TRACE] BuiltinEvalContext: Initialized "provider[\"registry.terraform.io/hashicorp/azurerm\"]" provider for provider["registry.terraform.io/hashicorp/azurerm"]
2022-03-07T13:11:23.456Z [TRACE] NodeApplyableProvider: configuring provider["registry.terraform.io/hashicorp/azurerm"]
2022-03-07T13:11:23.456Z [TRACE] buildProviderConfig for provider["registry.terraform.io/hashicorp/azurerm"]: no configuration at all
2022-03-07T13:11:23.456Z [TRACE] GRPCProvider: GetProviderSchema
2022-03-07T13:11:23.456Z [DEBUG] created provider logger: level=trace
2022-03-07T13:11:23.457Z [INFO] provider: configuring client automatic mTLS
2022-03-07T13:11:23.458Z [TRACE] provider.stdio: waiting for stdio data
2022-03-07T13:11:23.468Z [TRACE] provider.terraform-provider-azurerm_v2.95.0_x5: Received request: @caller=/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go:329 tf_provider_addr=provider tf_rpc=GetSchema @module=sdk.proto tf_proto_version=5 tf_req_id=0ba33a52-a68f-c6cb-0fe2-df029f7e4a60 timestamp=2022-03-07T13:11:23.463Z
2022-03-07T13:11:23.468Z [TRACE] provider.terraform-provider-azurerm_v2.95.0_x5: Calling downstream: @module=sdk.proto tf_proto_version=5 tf_req_id=0ba33a52-a68f-c6cb-0fe2-df029f7e4a60 @caller=/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go:336 tf_provider_addr=provider tf_rpc=GetSchema timestamp=2022-03-07T13:11:23.464Z
2022-03-07T13:11:23.497Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/vault/3.3.1/linux_amd64/terraform-provider-vault_v3.3.1_x4 args=[.terraform/providers/registry.terraform.io/hashicorp/vault/3.3.1/linux_amd64/terraform-provider-vault_v3.3.1_x4]
2022-03-07T13:11:23.502Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/vault/3.3.1/linux_amd64/terraform-provider-vault_v3.3.1_x4 pid=40666
2022-03-07T13:11:23.502Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/vault/3.3.1/linux_amd64/terraform-provider-vault_v3.3.1_x4
2022-03-07T13:11:23.570Z [TRACE] provider.terraform-provider-azurerm_v2.95.0_x5: Called downstream: tf_provider_addr=provider tf_rpc=GetSchema @module=sdk.proto tf_proto_version=5 tf_req_id=0ba33a52-a68f-c6cb-0fe2-df029f7e4a60 @caller=/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go:342 timestamp=2022-03-07T13:11:23.568Z
2022-03-07T13:11:23.575Z [INFO] provider.terraform-provider-vault_v3.3.1_x4: configuring server automatic mTLS: timestamp=2022-03-07T13:11:23.573Z
2022-03-07T13:11:23.648Z [DEBUG] provider: using plugin: version=5
2022-03-07T13:11:23.649Z [DEBUG] provider.terraform-provider-vault_v3.3.1_x4: plugin address: address=/tmp/plugin3587123391 network=unix timestamp=2022-03-07T13:11:23.647Z
2022-03-07T13:11:23.693Z [TRACE] provider.terraform-provider-azurerm_v2.95.0_x5: Served request: tf_provider_addr=provider @caller=/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go:348 @module=sdk.proto tf_req_id=0ba33a52-a68f-c6cb-0fe2-df029f7e4a60 tf_rpc=GetSchema tf_proto_version=5 timestamp=2022-03-07T13:11:23.673Z
2022-03-07T13:11:23.730Z [TRACE] BuiltinEvalContext: Initialized "provider[\"registry.terraform.io/hashicorp/vault\"]" provider for provider["registry.terraform.io/hashicorp/vault"]
2022-03-07T13:11:23.730Z [DEBUG] created provider logger: level=trace
2022-03-07T13:11:23.730Z [INFO] provider: configuring client automatic mTLS
2022-03-07T13:11:23.746Z [TRACE] provider.stdio: waiting for stdio data
2022-03-07T13:11:23.788Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/external/2.2.0/linux_amd64/terraform-provider-external_v2.2.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/external/2.2.0/linux_amd64/terraform-provider-external_v2.2.0_x5]
2022-03-07T13:11:23.794Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/external/2.2.0/linux_amd64/terraform-provider-external_v2.2.0_x5 pid=40674
2022-03-07T13:11:23.794Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/external/2.2.0/linux_amd64/terraform-provider-external_v2.2.0_x5
2022-03-07T13:11:23.823Z [INFO] provider.terraform-provider-external_v2.2.0_x5: configuring server automatic mTLS: timestamp=2022-03-07T13:11:23.818Z
2022-03-07T13:11:24.135Z [DEBUG] provider: using plugin: version=5
2022-03-07T13:11:24.136Z [DEBUG] provider.terraform-provider-external_v2.2.0_x5: plugin address: address=/tmp/plugin064506927 network=unix timestamp=2022-03-07T13:11:24.124Z
2022-03-07T13:11:24.207Z [ERROR] vertex "provider[\"registry.terraform.io/hashicorp/azurerm\"]" error: Insufficient features blocks
2022-03-07T13:11:24.207Z [TRACE] vertex "provider[\"registry.terraform.io/hashicorp/azurerm\"]": visit complete, with errors
2022-03-07T13:11:24.207Z [TRACE] dag/walk: upstream of "module.tfstates.data.azurerm_resource_group.tfstate (expand)" errored, so skipping
2022-03-07T13:11:24.215Z [TRACE] dag/walk: upstream of "module.tfstates.azurerm_storage_account.tfstate (expand)" errored, so skipping
2022-03-07T13:11:24.215Z [TRACE] dag/walk: upstream of "module.tfstates.data.azurerm_storage_account.level3 (expand)" errored, so skipping
Trace log msg(s) with other [ERROR] levels:
2022-03-07T13:11:20.818Z [ERROR] AttachSchemaTransformer: No provider config schema available for provider["terraform.io/builtin/terraform"]
2022-03-07T13:11:22.978Z [ERROR] AttachSchemaTransformer: No provider config schema available for provider["terraform.io/builtin/terraform"]
2022-03-07T13:11:24.207Z [ERROR] vertex "provider[\"registry.terraform.io/hashicorp/azurerm\"]" error: Insufficient features blocks
2022-03-07T13:12:45.118Z [ERROR] AttachSchemaTransformer: No provider config schema available for provider["terraform.io/builtin/terraform"]
2022-03-07T13:12:48.158Z [ERROR] AttachSchemaTransformer: No provider config schema available for provider["terraform.io/builtin/terraform"]
2022-03-07T13:12:50.772Z [ERROR] vertex "provider[\"registry.terraform.io/hashicorp/azurerm\"]" error: Insufficient features blocks
I’m happy to provide any additional information (code, logs, etc).