-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -231,55 +232,56 @@ func validateCdnFrontDoorExpandConditionOperatorValues(operator string, matchVal | |||
return fmt.Errorf("%q is invalid: no 'operator' value has been set, got %q", m.ConfigName, operator) | |||
} | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
…est.go Co-authored-by: jackofallops <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @WodansSon for the updates, this LGTM now 👍
And the tests are looking good too
Co-authored-by: Wodans Son <[email protected]>
* 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 <[email protected]> * Update for #27533 * prep for release --------- Co-authored-by: stephybun <[email protected]> Co-authored-by: sreallymatt <[email protected]> Co-authored-by: Wodans Son <[email protected]>
…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 <[email protected]> * Update internal/services/cdn/cdn_frontdoor_firewall_policy_resource_test.go Co-authored-by: jackofallops <[email protected]> * 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 <[email protected]>
* 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 <[email protected]> * Update for hashicorp#27533 * prep for release --------- Co-authored-by: stephybun <[email protected]> Co-authored-by: sreallymatt <[email protected]> Co-authored-by: Wodans Son <[email protected]>
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/rules
and2024-02-01/origins
API'sazurerm_cdn_frontdoor_rule
- upgrade resource to2024-09-01/rules
and2024-02-01/rulesets
API'sazurerm_cdn_frontdoor_ruleset
- upgrade resource to2024-02-01/rulesets
APIfront_door_validation_helpers
- update dependencies to use2024-09-01/rules
APIfront_door_route_https_redirect
- update dependencies to use2024-02-01/endpoints
APIazurerm_cdn_frontdoor_firewall_policy
- update dependencies to use2024-02-01/webapplicationfirewallpolicies
APIazurerm_cdn_frontdoor_firewall_policy
- exposeJSChallenge
as anaction
type for themanaged_rule.override.rule
blockPR 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/rules
and2024-02-01/origins
API'sfront_door_validation_helpers
update to use2024-09-01/rules
APIfront_door_route_https_redirect
update to use2024-02-01/endpoints
APIazurerm_cdn_frontdoor_rule
update to use2024-09-01/rules
and2024-02-01/rulesets
API'sazurerm_cdn_frontdoor_ruleset
update to use2024-02-01/rulesets
APIazurerm_cdn_frontdoor_firewall_policy
update to use2024-02-01/webapplicationfirewallpolicies
APIazurerm_cdn_frontdoor_firewall_policy
- exposeJSChallenge
as anaction
type for themanaged_rule.override.rule
blockThis 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.