Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing provider terraform local exercise #10547

Open
ahmadpiran opened this issue Jan 7, 2025 · 0 comments
Open

Missing provider terraform local exercise #10547

ahmadpiran opened this issue Jan 7, 2025 · 0 comments

Comments

@ahmadpiran
Copy link

The Terraform local provider exercise here is missing a required provider block in main.tf . Without it, running terraform init results in the error:

Error: Invalid provider registry host
The host "registry.terraform.io" given in provider source address "registry.terraform.io/hashicorp/local" does not offer a
Terraform provider registry.

to fix the issue you should add following block to main.tf:

terraform {
  required_providers {
    local = {
      source  = "hashicorp/local"
      version = "~> 2.0"
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant