cyrilgdn / terraform-provider-postgresql

Terraform PostgreSQL provider
https://www.terraform.io/docs/providers/postgresql/
Mozilla Public License 2.0
376 stars 194 forks source link

Not able to pull provider version 1.16.0 #235

Closed nickjmv closed 2 years ago

nickjmv commented 2 years ago

Terraform Version

Terraform v1.2.5 on darwin_amd64

Terraform Configuration Files

terraform {
  required_version = ">= 1.0"
  required_providers {
    aws = {
      source = "hashicorp/aws"
    }
    mysql = {
      source  = "winebarrel/mysql"
      version = "~> 1.10.6"
      configuration_aliases = [mysql.mysql-aurora-1]
    }
    postgresql = {
      source = "cyrilgdn/postgresql"
      version = "1.16.0"
      configuration_aliases = [postgresql.postgresql-aurora-1]
    }
  }
}

Expected Behavior

Version 1.16.0 should be pulled.

Actual Behavior

terraform init -upgrade
│ Error: Failed to query available provider packages
│ 
│ Could not retrieve the list of available versions for provider cyrilgdn/postgresql: no available releases match the given constraints 1.13.0, 1.16.0

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform init -upgrade

More Information

Looks like it cannot find any other version from your provider. Also when I try to pull an older version it doesn't work. I did try to remove .terraform folder and .terraform.lock.hcl file, without any luck.

Is there something I'm missing here?

cyrilgdn commented 2 years ago

Hi,

Somewhere in a parent or child module, you probably have another terraform configuration block that requires postgresql version 1.13.0, so the 2 requirements cannot work.

nickjmv commented 2 years ago

Ah well, that was indeed the issue... I thought this was inheritent. Thanks for the quick explanation!