-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource/cloudflare_ruleset: deprecate enabled
(immediately) in overrides in favour of status
#1689
Merged
Conversation
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
acceptance tests all pass
|
jacobbednarz
force-pushed
the
rulesets-enabled-to-status-field
branch
2 times, most recently
from
June 10, 2022 05:59
33dd7aa
to
4fa5d62
Compare
…rrides in favour of `status` Within Rulesets, an overridden property can have three `enabled` states: - `true`: The value is forced on. - `false`: The value is forced off. - missing: The value reverts to the default value provided by the service. Using `cloudflare-go` directly, all the configuration variations work as expected thanks to the boolean pointers. However, Terraform doesn't support the missing state since `TypeBool`s default is `false` (not omitted). This leads to some rough inconsistencies where operations that rely on the defaults and then attempt another run will result in it being disabled without the operators knowledge. To address the underlying issue, we're immediately deprecating `enabled` (TypeBool) inside of overridden properties in favour of `status` with the three following states: - `enabled`: Value is forced on. - `disabled`: Value is forced off. - `""`: Value is reset to the service default. We've added the translation layer in Terraform as that is where the bug is instead of updating the service and the API responses. Closes #1397
jacobbednarz
force-pushed
the
rulesets-enabled-to-status-field
branch
from
June 10, 2022 06:03
4fa5d62
to
dbaf6bc
Compare
jacobbednarz
added a commit
to cloudflare/cf-terraforming
that referenced
this pull request
Jun 14, 2022
cloudflare/terraform-provider-cloudflare#1689 introduced a breaking change where the `status` field of an override is now `enabled` in order to support boolean values that can be true, false and uninitialised in the API (see PR for full details). This ensures that the mapping of these values is performed on the generated resources too.
This functionality has been released in v3.17.0 of the Terraform Cloudflare Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
9 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Within Rulesets, an overridden property can have three
enabled
states:true
: The value is forced on.false
: The value is forced off.service.
Using
cloudflare-go
directly, all the configuration variations work asexpected thanks to the boolean pointers. However, Terraform doesn't
support the missing state since
TypeBool
s default isfalse
(notomitted). This leads to some rough inconsistencies where operations that
rely on the defaults and then attempt another run will result in it
being disabled without the operators knowledge.
To address the underlying issue, we're immediately deprecating
enabled
(TypeBool) inside of overridden properties in favour of
status
withthe three following states:
enabled
: Value is forced on.disabled
: Value is forced off.""
: Value is reset to the service default.We've added the translation layer in Terraform as that is where the bug
is instead of updating the service and the API responses.
Closes #1397