Terraform provider error in terraform 0.14.7

provider "linode" {
  token = var.api_token
}

variable  "api_token" {}
variable "public_key" {}

resource "linode_instance" "web" {
    label = "simple_instance"
    image = "linode/ubuntu18.04"
    region = "ap-south"
    type = "g6-nanode-1"
    authorized_keys = [var.public_key]
    root_pass = "terr4form-test"

    group = "foo"
    tags = [ "foo" ]
    private_ip = true
}

The above is my main.tf file and I'm getting the below error. Can you please help

MacBook-Pro-2:terraform_linode jeshocarmel$ terraform init

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/linode...

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider
hashicorp/linode: provider registry registry.terraform.io does not have a
provider named registry.terraform.io/hashicorp/linode

If you have just upgraded directly from Terraform v0.12 to Terraform v0.14
then please upgrade to Terraform v0.13 first and follow the upgrade guide for
that release, which might help you address this problem.

Did you intend to use linode/linode? If so, you must specify that source
address in each module which requires that provider. To see which modules are
currently depending on hashicorp/linode, run the following command:
    terraform providers

1 Reply

I found the answer. For terraform 0.13+ we are supposed to add the below snippet.

terraform {
  required_providers {
    linode = {
      source = "linode/linode"
      version = "1.14.3"
    }
  }
}

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct