terraform config_error ai_generated true

Provider configuration not present

ID: terraform/provider-not-present

Also available as: JSON · Markdown
90%Fix Rate
88%Confidence
105Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
1 active

Root Cause

Required provider is not configured in the Terraform configuration.

generic

Workarounds

  1. 92% success Run terraform init to download and configure providers
    Run terraform init to download and configure providers

    Sources: https://developer.hashicorp.com/terraform/cli/commands/init

  2. 88% success Add the required_providers block to your terraform configuration
    # Add required_providers block:
    terraform {
      required_providers {
        aws = {
          source  = "hashicorp/aws"
          version = "~> 5.0"
        }
      }
    }
    
    # Then reinitialize:
    terraform init

    Sources: https://developer.hashicorp.com/terraform/language/providers/requirements

Dead Ends

Common approaches that don't work:

  1. Manually download the provider binary 72% fail

    Terraform manages provider binaries; manual placement is fragile

  2. Copy .terraform from another project 78% fail

    Provider versions and configs may not match

Error Chain

Leads to:
Preceded by: