-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DNS v2: Fix recordset diffs (terraform-provider-openstack#636)
This commit fixes an issue where the records attribute in the `openstack_dns_recordset_v2` resource would sometimes be returned in a different order than what the user specified. The hardest part about implementing this fix is managing the internal feature of removing brackets from IPv6 addresses. In order to successfully continue removing the brackets as well as retain backwards compatibility, the following changes were made: 1. The `records` field is no longer being set in the Read function. This is because the `records` field is not computed, so it does not need to be set during Read. 2. An import function has been created so `records` is set when a user imports a recordset. 3. `DiffSuppressFunc` has been replaced with a `StateFunc`. Because `records` is no longer being set in Read, a diff will never occur, but the modified IPv6 records still need to have records stripped. 4. `records` is being re-set in state during the Create function with the IPv6 brackets stripped out.
- Loading branch information
Showing
4 changed files
with
50 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters