Skip to content
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_page_rule: Remove HasChange for edge_cache_ttl #453

Merged

Conversation

jacobbednarz
Copy link
Member

Prior to swapping to PUT requests for updating page rules, we used to
perform manual diff checks that would determine which actions we would
add to the page rule before sending it. This is no longer now as we
swapped to using a PUT request which replaces the whole rule and we are
able to send the whole page rule as-is without doing the work ourselves.

This popped up as it's caused a bug whereby updating a page rule that
includes a edge_cache_ttl (but not change it) results in the
edge_cache_ttl being dropped completely.

TestAccCloudflarePageRuleEdgeCacheTTLNotClobbered is the regression
test case that demonstrates the behaviour.

Prior to swapping to PUT requests for updating page rules, we used to
perform manual diff checks that would determine which actions we would
add to the page rule before sending it. This is no longer now as we
swapped to using a PUT request which replaces the whole rule and we are
able to send the whole page rule as-is without doing the work ourselves.

This popped up as it's caused a bug whereby updating a page rule that
includes a `edge_cache_ttl` (but not change it) results in the
`edge_cache_ttl` being dropped completely.

`TestAccCloudflarePageRuleEdgeCacheTTLNotClobbered` is the regression
test case that demonstrates the behaviour.
@ghost ghost added the size/S label Aug 22, 2019
Copy link
Contributor

@patryk patryk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this issue, I apparently didn't notice change in behaviour here when we changed cloudflare-go HTTP method.

@patryk patryk added kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. labels Aug 22, 2019
@patryk patryk merged commit 79c359a into cloudflare:master Aug 22, 2019
boekkooi-lengoo pushed a commit to boekkooi-lengoo/terraform-provider-cloudflare that referenced this pull request Feb 28, 2022
Co-authored-by: Callum Loh <cloh@squiz.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants