terraform-google-modules / terraform-google-org-policy

Manages Google Cloud organization policies
https://registry.terraform.io/modules/terraform-google-modules/org-policy/google
Apache License 2.0
79 stars 79 forks source link

v5.2.1 hashicorp/null dependency issues #77

Closed timefcuk closed 1 year ago

timefcuk commented 1 year ago

TL;DR

v5.2.1 was a bit too breaking for the minor change cause most of our pipelines started failing with dependency issues:

Could not retrieve the list of available versions for provider hashicorp/null: no available releases match the given constraints >= 2.1.0, ~> 3.1.0, ~> 3.2

The only solution was to roll the terraform-google-org-policy back to v.5.2.0

Expected behavior

We're expecting minor versions not to introduce potentially breaking changes.

Observed behavior

Minor change has introduced dependency configuration that broke all the pipelines with modules that are still tied up to older versions of the hashicorp/null provider.

Terraform Configuration

# just run terraform init

module "org-policy" {
  source            = "terraform-google-modules/org-policy/google"
  version           = "~> 5.2.0"
}

module "postgres" {
  source               = "GoogleCloudPlatform/sql-db/google//modules/postgresql"
  version              = "~> 10.0.0"
}

Terraform Version

Terraform v1.1.8
on darwin_arm64

Additional information

The version should at least be changed to 5.3.

In terraform-google-sql-db null upgrade was rolled out as a part of their major release: https://github.com/terraform-google-modules/terraform-google-sql-db/releases/tag/v13.0.0

timefcuk commented 1 year ago

https://github.com/terraform-google-modules/terraform-google-org-policy/commit/b80014487aba21ea1ff534f16d4dc3936af89dae#diff-dfd5848fa77a04d0343891fe859286cc210473d10f0e62c7f99f0d5ecf1a9927 introduced the hashicorp/null version constraint that was the reason of our problems

bharathkkb commented 1 year ago

Thanks for the report @timefcuk I opened https://github.com/terraform-google-modules/terraform-google-org-policy/pull/79 to relax the constraint. We previously did not have a constraint and 10.0.0 was pinned to a patch version which was the cause of this incompatibility. For future releases if we bump major version for min supported providers, we will do a major release.

timefcuk commented 1 year ago

@bharathkkb , thanks a lot!