[Dependencies:] azurerm_cdn_frontdoor_rule, azurerm_cdn_frontdoor_ruleset and cdn_frontdoor_rule_actions - upgrade resources to 2024-02-01 API to enable support for the JS Challenge field#28308
Conversation
azurerm_cdn_frontdoor_rule, azurerm_cdn_frontdoor_ruleset and cdn_frontdoor_rule_actions - upgrade to resources to 2024-02-01 API to enable support for the JS Challenge fieldazurerm_cdn_frontdoor_rule, azurerm_cdn_frontdoor_ruleset and cdn_frontdoor_rule_actions - upgrade resources to 2024-02-01 API to enable support for the JS Challenge field
…r-azurerm into deps/e_frontdoor_rules
jackofallops
left a comment
There was a problem hiding this comment.
Thanks @WodansSon - Handful of fairly minor stuff to check if you could. Also, I can see you rant the CI tests, and it looks like there are some failures introduced if you can check those over?
Thanks!
internal/services/cdn/cdn_frontdoor_firewall_policy_resource.go
Outdated
Show resolved
Hide resolved
internal/services/cdn/cdn_frontdoor_firewall_policy_resource_test.go
Outdated
Show resolved
Hide resolved
internal/services/cdn/cdn_frontdoor_firewall_policy_resource_test.go
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| if operator == string(cdn.OperatorAny) && len(*matchValues) > 0 { | ||
| // NOTE: There are now 14 different "Any" operators in the new API, however they are all the same so I am just hardcoding this here now... |
There was a problem hiding this comment.
Can you open an issue detailing this so it's tracked somewhere along with what we're planning to change it to if this is just for now?
There was a problem hiding this comment.
I don't believe an issue is required here, these fields were added due to the swagger issue opened by HashiCorp to allow the Pandora SDK to build the API correctly. Every condition now has it's own Any field (e.g., ClientPortOperatorAny, CookiesOperatorAny, HostNameOperatorAny, etc.) So I believe hardcoding this value is acceptable here as this function is a general function that will be called by all conditions. That said I added more context in the code comment to give historical reasons why the decision was made to hardcode this value.
internal/services/cdn/frontdoorruleactions/cdn_frontdoor_rule_actions.go
Outdated
Show resolved
Hide resolved
Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com>
…est.go Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com>
jackofallops
left a comment
There was a problem hiding this comment.
Thanks @WodansSon for the updates, this LGTM now 👍
And the tests are looking good too

Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com>
* CHANGELOG.md for v4.18.0 * Update CHANGELOG.md for #28308 * Update for #28447 * Update for #28532 * Update for #28537 * Update CHANGELOG.md for #28674 * Update for #28363 * Update for #28536 * Update for #28416 * Update CHANGELOG.md #28700 * Update for #28673 * Update for #28308 Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com> * Update for #27533 * prep for release --------- Co-authored-by: stephybun <steph@hashicorp.com> Co-authored-by: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com>
…ruleset` and `cdn_frontdoor_rule_actions` - upgrade resources to `2024-02-01` API to enable support for the JS Challenge field (hashicorp#28308) * Check-in progress... * Fixing delivery rule conditions adding a polymorphisim discriminator package... * Progress... * Think I have the new polymorphisim figured out here... * go mod vendor * Fix lint errors... * Fix RuleSet Client... * Add JSChallenge functionality for the override action type... * go mod vendor to remove legacy API dependency... * Fix lint error... from if else to switch case... * Update internal/services/cdn/cdn_frontdoor_firewall_policy_resource.go Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com> * Update internal/services/cdn/cdn_frontdoor_firewall_policy_resource_test.go Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com> * Address PR comments... * Fix test case due to new returned error value... * Set Behavior and Order in Read... * Fix lint error add example of override for jschallenge... * Add legal note for JSChallenge value for action field... --------- Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com>
* CHANGELOG.md for v4.18.0 * Update CHANGELOG.md for hashicorp#28308 * Update for hashicorp#28447 * Update for hashicorp#28532 * Update for hashicorp#28537 * Update CHANGELOG.md for hashicorp#28674 * Update for hashicorp#28363 * Update for hashicorp#28536 * Update for hashicorp#28416 * Update CHANGELOG.md hashicorp#28700 * Update for hashicorp#28673 * Update for hashicorp#28308 Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com> * Update for hashicorp#27533 * prep for release --------- Co-authored-by: stephybun <steph@hashicorp.com> Co-authored-by: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com>
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Community Note
Description
cdn_frontdoor_rule_actions- upgrade resource to2024-09-01/rulesand2024-02-01/originsAPI'sazurerm_cdn_frontdoor_rule- upgrade resource to2024-09-01/rulesand2024-02-01/rulesetsAPI'sazurerm_cdn_frontdoor_ruleset- upgrade resource to2024-02-01/rulesetsAPIfront_door_validation_helpers- update dependencies to use2024-09-01/rulesAPIfront_door_route_https_redirect- update dependencies to use2024-02-01/endpointsAPIazurerm_cdn_frontdoor_firewall_policy- update dependencies to use2024-02-01/webapplicationfirewallpoliciesAPIazurerm_cdn_frontdoor_firewall_policy- exposeJSChallengeas anactiontype for themanaged_rule.override.ruleblockPR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
ENHANCEMENTS:
cdn_frontdoor_rule_actions- upgrade resource to2024-09-01/rulesand2024-02-01/originsAPI'sfront_door_validation_helpersupdate to use2024-09-01/rulesAPIfront_door_route_https_redirectupdate to use2024-02-01/endpointsAPIazurerm_cdn_frontdoor_ruleupdate to use2024-09-01/rulesand2024-02-01/rulesetsAPI'sazurerm_cdn_frontdoor_rulesetupdate to use2024-02-01/rulesetsAPIazurerm_cdn_frontdoor_firewall_policyupdate to use2024-02-01/webapplicationfirewallpoliciesAPIazurerm_cdn_frontdoor_firewall_policy- exposeJSChallengeas anactiontype for themanaged_rule.override.ruleblockThis is a (please select all that apply):
Related Issue(s)
Related PRs
Note
If this PR changes meaningfully during the course of review please update the title and description as required.