Skip to content

Commit

Permalink
Merge pull request #62 from terraform-google-modules/aaron-lane-upgra…
Browse files Browse the repository at this point in the history
…de-guide

Add upgrade guide, CHANGELOG entry for 2.0.0
  • Loading branch information
morgante authored Sep 26, 2019
2 parents 78e451f + 3c6d5f9 commit 5f780d0
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [2.0.0] - 2019-09-26

2.0.0 is a backward incompatible release. Review the
[upgrade guide](docs/upgrading_to_sql_db_2.0.0.md) for more information.

### Added

- `peering_completed` marker to postgresql module [#43]
Expand All @@ -19,7 +24,8 @@ project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

- The network reference in the `private_service_access` module uses the self link. [#61]
- The network reference in the `private_service_access` module uses the
self link. [#61]

## [1.2.0] - 2019-07-30

Expand All @@ -33,7 +39,8 @@ project adheres to [Semantic Versioning](http://semver.org/).

## [1.0.0] - 2019-02-14

[Unreleased]: https://github.com/terraform-google-modules/terraform-google-sql-db/compare/v1.2.0...HEAD
[Unreleased]: https://github.com/terraform-google-modules/terraform-google-sql-db/compare/v2.0.0...HEAD
[2.0.0]: https://github.com/terraform-google-modules/terraform-google-sql-db/compare/v1.2.0...v2.0.0
[1.2.0]: https://github.com/terraform-google-modules/terraform-google-sql-db/compare/1.1.2...v1.2.0
[1.1.2]: https://github.com/terraform-google-modules/terraform-google-sql-db/compare/1.1.1...1.1.2
[1.1.1]: https://github.com/terraform-google-modules/terraform-google-sql-db/compare/1.1.0...1.1.1
Expand Down
65 changes: 65 additions & 0 deletions docs/upgrading_to_sql_db_2.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Upgrading to SQL DB 2.0.0

The 2.0.0 release of SQL DB is a backward incompatible release. This
incompatibility affects any configuration which uses the root module.

## Instructions

Prior to the 1.1.0 release, the root module was the only mechanism to
configure databases:

```hcl
module "sql_db_mysql" {
source = "GoogleCloudPlatform/sql-db/google"
version = "1.0.0"
database_version = "MYSQL_5_6"
name = "mysql-example"
project = "example-project"
region = "us-central1"
}
module "sql_db_postgresql" {
source = "GoogleCloudPlatform/sql-db/google"
version = "1.0.0"
database_version = "POSTGRES_9_6"
name = "postgresql-examlpe"
project = "example-project"
region = "us-central1"
}
```

With the 1.1.0 release, submodules were added for each type of
database. As of the 2.0.0 release, the root module has been removed so
the submodules must be used:

```diff
module "sql_db_mysql" {
- source = "GoogleCloudPlatform/sql-db/google"
+ source = "GoogleCloudPlatform/sql-db/google//modules/mysql"
- version = "1.0.0"
+ version = "~> 2.0"

database_version = "MYSQL_5_6"
name = "mysql-example"
- project = "example-project"
+ project_id = "example-project"
region = "us-central1"
+ zone = "us-central1-a"
}

module "sql_db_postgresql" {
- source = "GoogleCloudPlatform/sql-db/google"
+ source = "GoogleCloudPlatform/sql-db/google//modules/postgresql"
- version = "1.0.0"
+ version = "~> 2.0"

database_version = "POSTGRES_9_6"
name = "postgresql-example"
- project = "example-project"
+ project_id = "example-project"
region = "us-central1"
+ zone = "us-central1-a"
}
```

0 comments on commit 5f780d0

Please sign in to comment.