Closed TobyLeduc closed 1 year ago
Thank you for your feedback. This has been routed to the support team for assistance.
route to CXP team
@TobyLeduc Thanks for reaching out to us and reporting this issue. I am sending you a sample AzCLI command which does the override:
Below command adds a forwarding route override action:
az network front-door rules-engine rule action add -f {front_door} -g {rg} --rules-engine-name {rules_engine} --name {rule1} --action-type ForwardRouteOverride --backend-pool {backend_pool_name} --caching Disabled
More Info: --action-type [Required] : Action type to apply for a rule. Allowed values: ForwardRouteOverride, RedirectRouteOverride, RequestHeader, ResponseHeader.
Hope this helps.
@TobyLeduc I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please let us know if you had any updates on this. Awaiting your reply.
@navba-MSFT I seem to be still missing something. I can't add an action without a rule and I can't create a rule without an action type. Trying to work through this this morning.
@navba-MSFT I did figure out a path that gets me to where I need to be. While it would be nice to be set the redirect action type during the creation of the rules-engine-rule, it ended up only adding an action remove line.
az network front-door rules-engine rule create -g rg -f fd-01 --rules-engine-name httpsredirect -n redirect302 --priority 0 --action-type RequestHeader --header-action Append --header-name foo --header-value bar
az network front-door rules-engine rule action add -g rg -f fd-01 --rules-engine-name httpsredirect --name redirect302 --action-type RedirectRouteOverride --redirect-type Found --redirect-protocol HttpsOnly
az network front-door rules-engine rule condition add -g rg -f fd-01 --rules-engine-name httpsredirect -n redirect302 --match-variable RequestScheme --negate-condition false --match-values "HTTP" --operator Equal
az network front-door rules-engine rule action remove -g rg -f fd-01 --rules-engine-name httpsredirect --name redirect302 --action-type RequestHeader --index 0
Related command az network front-door rules-engine rule create --action-type {RequestHeader, ResponseHeader} --front-door-name --name --priority --resource-group --rules-engine-name
Is your feature request related to a problem? Please describe. In the GUI you can create an action type of "Override Routing Configuration", this option does not appear to be available in the cli
Describe the solution you'd like Add the option for creating the routing override to the --action-type parameter
Describe alternatives you've considered Just using the GUI for now
Additional context