Terraform PostgreSQL Provider

From wikieduonline
Jump to navigation Jump to search

https://github.com/hashicorp/terraform/issues/30559#issuecomment-1045141735

terraform {
  required_version = ">= 1.1.6"
  required_providers {
    postgresql = { # This line is what needs to change.
      source = "cyrilgdn/postgresql"
    }
  }
}

provider "postgresql" {
  host = "test"
  port = 5432
  database = "test"
  username = "test"
  password = "test"
  sslmode = "require"
  connect_timeout = 15
}

Errors[edit]

terraform init

Initializing the backend... 

Initializing provider plugins...
- Finding latest version of hashicorp/postgresql... 
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/postgresql: provider registry registry.terraform.io does not have a
│ provider named registry.terraform.io/hashicorp/postgresql
│
│ Did you intend to use cyrilgdn/postgresql? If so, you must specify that source address in each module which requires that provider. To see w hich
│ modules are currently depending on hashicorp/postgresql, run the following command:
│     terraform providers
╵

Related[edit]

See also[edit]

Advertising: