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

add edge_cache_ttl page rule and fix EdgeCacheTTLNotClobbered test #4745

Merged

Conversation

jafowler
Copy link
Contributor

This PR aims to add Edge Cache TTL Page rule and update its Acceptance tests.

➜ TF_ACC=1 go test ./internal/services/page_rule/ -run "^TestAccCloudflarePageRule_EdgeCacheTTL" -v -count=1
=== RUN   TestAccCloudflarePageRule_EdgeCacheTTLNotClobbered
--- PASS: TestAccCloudflarePageRule_EdgeCacheTTLNotClobbered (6.28s)
PASS
ok      github.com/cloudflare/terraform-provider-cloudflare/internal/services/page_rule 9.016s

Copy link
Contributor

@mgirouard mgirouard left a comment

Choose a reason for hiding this comment

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

lgtm

"edge_cache_ttl": schema.Int64Attribute{
Optional: true,
Validators: []validator.Int64{
int64validator.AtLeast(7200),
Copy link
Member

Choose a reason for hiding this comment

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

this seems like alot for edge cache. is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

according to our open api schema this is correct. give me some time to fact check the actual code though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

according to the code, edge cache ttl can be as little as 0. I updated this PR. @mgirouard we're going to want to update the schemas sometime this week.

@jacobbednarz jacobbednarz merged commit 025ea01 into cloudflare:next Dec 11, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants