Skip to content

Commit

Permalink
Update README and CHANGELOG for v3.0.0 (#5)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ludoo authored Oct 24, 2019
1 parent 2b65f38 commit 5591625
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 8 deletions.
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
37 changes: 37 additions & 0 deletions docs/upgrading_to_v3.0.md
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit 5591625

Please sign in to comment.