Missing provider terraform local exercise
ahmadpiran opened this issue · 0 comments
ahmadpiran commented
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"
}
}
}