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

Adds additional validation for TTLs for cloudflare_ruleset action_parameters #2454

Merged
merged 2 commits into from
May 21, 2023

Conversation

iveelsm
Copy link
Contributor

@iveelsm iveelsm commented May 18, 2023

This adds new validation for the schema that enforces TTL values for specific modes within the cloudflare_ruleset action parameters. This applies to the browser_ttl and edge_ttl blocks within the action_parameters schema. The validation will serialize the existing values into a type that is a 1:1 match of the schema and then will determine if the default value for the ttl is greater than zero for the configured rule.

Implementation:

  • Custom object validator for Browser TTL block within action_parameters for cloudflare_ruleset
  • Custom object validator for Edge TTL block within action_parameters for cloudflare_ruleset

@iveelsm iveelsm requested a review from jacobbednarz as a code owner May 18, 2023 22:13
@github-actions
Copy link
Contributor

github-actions bot commented May 18, 2023

changelog detected ✅

@jacobbednarz
Copy link
Member

at a high level, this looks fine. let's add some test coverage to ensure that these validators are covered. an acceptance test is likely the easiest to interface with.

@iveelsm iveelsm force-pushed the master branch 2 times, most recently from a3db872 to 4bc5a9d Compare May 19, 2023 20:46
…ameters

This adds new validation for the schema that enforces TTL values for specific modes within the cloudflare_ruleset action parameters. This applies to the browser_ttl and edge_ttl blocks within the action_parameters schema. The validation will serialize the existing values into a type that is a 1:1 match of the schema and then will determine if the default value for the ttl is greater than zero for the configured rule.

Implementation:

* Custom object validator for Browser TTL block within action_parameters for cloudflare_ruleset
* Custom object validator for Edge TTL block within action_parameters for cloudflare_ruleset
@github-actions
Copy link
Contributor

This functionality has been released in v4.7.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!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants