From 55916250cefa95137b673e4baaa19b2d3629840a Mon Sep 17 00:00:00 2001 From: Ludovico Magnocavallo Date: Thu, 24 Oct 2019 16:44:04 +0200 Subject: [PATCH] Update README and CHANGELOG for v3.0.0 (#5) * update README and CHANGELOG for v3.0.0 * mark change as breaking in CHANGELOG * add migration doc for v3.0 * remove upgrading section from README, add link to upgrading doc to CHANGELOG --- CHANGELOG.md | 20 +++++++++++++++++++- README.md | 8 +------- docs/upgrading_to_v3.0.md | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 docs/upgrading_to_v3.0.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c94146..bce084e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,21 @@ The format is based on and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.0.0] - 2019-10-24 + +### Added + +- DNSSEC support. [#4] + +### Changed + +- **BREAKING** The `record_names` and `record_data` variables have been combined into `recordsets`, and have switched to using `for_each`. Upgrading instructions are in the [v3.0 migration guide](docs/upgrading_to_v3.0.md). [#4] + ## [2.0.0] - 2019-08-18 ### Changed -- Updated for Terraform 0.12. [#2] +- Updated for Terraform 0.12. [#3] - **BREAKING** the `zone_type` variable has been renamed to `type` for uniformity with the `name` and `domain` variables - **BREAKING** list/map variables now leverage 0.12 constructs internally, and have been simplified and renamed accordingly: - `private_visibility_config` has been renamed to `private_visibility_config_networks` and is now a simple list of VPC self links @@ -23,3 +33,11 @@ and this project adheres to ### Added - Initial release. [#2] + +[Unreleased]: https://github.com/terraform-google-modules/terraform-google-cloud-dns/compare/v1.4.0...HEAD +[3.0.0]: https://github.com/terraform-google-modules/terraform-google-cloud-dns/compare/v2.0.0...v3.0.0 +[2.0.0]: https://github.com/terraform-google-modules/terraform-google-cloud-dns/compare/v1.0.0...v2.0.0 + +[#4]: https://github.com/terraform-google-modules/terraform-google-cloud-dns/pull/4 +[#3]: https://github.com/terraform-google-modules/terraform-google-cloud-dns/pull/3 +[#2]: https://github.com/terraform-google-modules/terraform-google-cloud-dns/pull/2 diff --git a/README.md b/README.md index e27f670..ac4e415 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,7 @@ The resources/services/activations/deletions that this module will create/trigge ## Compatibility - This module is meant for use with Terraform 0.12. If you haven't [upgraded](https://www.terraform.io/upgrade-guides/0-12.html) - and need a Terraform 0.12.x-compatible version of this module, the last released version intended for - Terraform 0.11.x is [1.0.0](https://registry.terraform.io/modules/terraform-google-modules/cloud-dns/google/1.0.0). - -## Upgrading - -The current version is 3.X. In previous version, you had "record_names" and "record_data", now everything is merge in one unique variable named "recordsets", please see bellow the structure and documentation. + This module is meant for use with Terraform 0.12. If you haven't [upgraded](https://www.terraform.io/upgrade-guides/0-12.html) and need a Terraform 0.12.x-compatible version of this module, the last released version intended for Terraform 0.11.x is [1.0.0](https://registry.terraform.io/modules/terraform-google-modules/cloud-dns/google/1.0.0). ## Usage diff --git a/docs/upgrading_to_v3.0.md b/docs/upgrading_to_v3.0.md new file mode 100644 index 0000000..c6c281d --- /dev/null +++ b/docs/upgrading_to_v3.0.md @@ -0,0 +1,37 @@ +# Upgrading to v3.0 + +The v5.0 release of *cloud-dns* is a backwards incompatible +release in respect to DNS records. + +## Migration Instructions + +The number and format of the variables used for specifying DNS records has changed since v3.0. The old format used two list variables, one for record names and one for record data, as in this example for a single `A` record: + +```hcl +record_names = ["localhost"] +record_data = [ + { + rrdatas = "127.0.0.1" + type = "A" + } +] +``` + +Starting from v3.0, records are specified using a single variable with a clearly defined type. This is the example above, migrated to the new syntax: + +```hcl +recordsets = [ + { + name = "localhost" + type = "A" + ttl = 300 + records = [ + "127.0.0.1", + ] + }, +] +``` + +The `recordsets` variable is a single list of objects each corresponding to one DNS record, where the `name` key corresponds to the value that used to be in the `record_names` variable, and the `type` and `records` keys map to the values that used to be in the `record_data` variables. + +There's no simple way of migrating record resources from the old to the new format, so once you upgrade the module to the new version and combine record attributes in the new `recordsets` attribute, all existing records will be dropped and recreated once you run `terraform apply`. \ No newline at end of file