From 5170491c24ea1d8e29d8a75ef0d1e4bb8d5d0688 Mon Sep 17 00:00:00 2001 From: Awais Malik Date: Fri, 3 Feb 2023 23:22:06 +0000 Subject: [PATCH 1/2] fix: updates the TF version constraint to 1.3 --- docs/upgrading_to_sql_db_14.0.0.md | 4 ++++ modules/mysql/versions.tf | 2 +- modules/postgresql/versions.tf | 2 +- modules/safer_mysql/versions.tf | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/upgrading_to_sql_db_14.0.0.md b/docs/upgrading_to_sql_db_14.0.0.md index 103dc210..c978f9cd 100644 --- a/docs/upgrading_to_sql_db_14.0.0.md +++ b/docs/upgrading_to_sql_db_14.0.0.md @@ -221,3 +221,7 @@ module "smysql" { ] } ``` + +### Made `name_override` optional in the `read_replica` object +The [`name_override`](https://github.com/terraform-google-modules/terraform-google-sql-db/blob/master/modules/postgresql/variables.tf#L232) attribute for [`read_replica`](https://github.com/terraform-google-modules/terraform-google-sql-db/blob/master/modules/postgresql/variables.tf#L228) is optional now. If passed, the name for the read replica will be set as such. Since [optional attributes](https://developer.hashicorp.com/terraform/language/expressions/type-constraints#optional-object-type-attributes) +is a version 1.3 feature, the configuration will fail if the pinned version is < 1.3. diff --git a/modules/mysql/versions.tf b/modules/mysql/versions.tf index 318aed3c..472afde7 100644 --- a/modules/mysql/versions.tf +++ b/modules/mysql/versions.tf @@ -15,7 +15,7 @@ */ terraform { - required_version = ">= 0.13" + required_version = ">= 1.3" required_providers { null = { source = "hashicorp/null" diff --git a/modules/postgresql/versions.tf b/modules/postgresql/versions.tf index 8a6720d4..55c23829 100644 --- a/modules/postgresql/versions.tf +++ b/modules/postgresql/versions.tf @@ -15,7 +15,7 @@ */ terraform { - required_version = ">= 0.13" + required_version = ">= 1.3" required_providers { null = { source = "hashicorp/null" diff --git a/modules/safer_mysql/versions.tf b/modules/safer_mysql/versions.tf index 527224b3..32fcf29c 100644 --- a/modules/safer_mysql/versions.tf +++ b/modules/safer_mysql/versions.tf @@ -15,7 +15,7 @@ */ terraform { - required_version = ">= 0.13" + required_version = ">= 1.3" required_providers { google = { From ec4abf8bad711d38005f50bd53e079b9647febda Mon Sep 17 00:00:00 2001 From: Awais Malik Date: Sat, 4 Feb 2023 17:46:11 +0000 Subject: [PATCH 2/2] readme changes --- CHANGELOG.md | 1 + README.md | 2 +- docs/upgrading_to_sql_db_14.0.0.md | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0db33c53..64e3b0ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ project adheres to [Semantic Versioning](http://semver.org/). ### ⚠ BREAKING CHANGES +* Requires [Terraform](https://www.terraform.io/downloads.html) >= 1.3.0 * Add pwd validation policy for mysql modules ([#409](https://github.com/terraform-google-modules/terraform-google-sql-db/issues/409)) * adds settings.deletion_protection_enabled to modules ([#404](https://github.com/terraform-google-modules/terraform-google-sql-db/issues/404)) * Aligned the behaviour of additional_users resource in all 3 Cloud SQL instance modules. ([#398](https://github.com/terraform-google-modules/terraform-google-sql-db/issues/398)) diff --git a/README.md b/README.md index da12da79..0c62500e 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ The root module has been deprecated. Please switch to using one of the submodule ### Installation Dependencies -- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.0 +- [Terraform](https://www.terraform.io/downloads.html) >= 1.3.0 - [terraform-provider-google](https://github.com/terraform-providers/terraform-provider-google) plugin >= v4.45.0 The following dependency must be available for SQL Server module: diff --git a/docs/upgrading_to_sql_db_14.0.0.md b/docs/upgrading_to_sql_db_14.0.0.md index c978f9cd..e631ec11 100644 --- a/docs/upgrading_to_sql_db_14.0.0.md +++ b/docs/upgrading_to_sql_db_14.0.0.md @@ -222,6 +222,6 @@ module "smysql" { } ``` -### Made `name_override` optional in the `read_replica` object +### [Terraform](https://www.terraform.io/downloads.html) >= 1.3.0 is required as `name_override` is made optional in the `read_replica` object The [`name_override`](https://github.com/terraform-google-modules/terraform-google-sql-db/blob/master/modules/postgresql/variables.tf#L232) attribute for [`read_replica`](https://github.com/terraform-google-modules/terraform-google-sql-db/blob/master/modules/postgresql/variables.tf#L228) is optional now. If passed, the name for the read replica will be set as such. Since [optional attributes](https://developer.hashicorp.com/terraform/language/expressions/type-constraints#optional-object-type-attributes) is a version 1.3 feature, the configuration will fail if the pinned version is < 1.3.