Azure / Azure/azure-cli

Cannot set external redirect on AGW v2

Open
#30,514 14 comments 0 reactions 1 assignee Claimed by @necusjz View on GitHub
act-quality-productivity-squad Auto-Assign Azure CLI Team customer-reported Network question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

When using the commands to update rules and url path rules any redirections do not flow through to the AGW.

### Related command
```
$redirectConfig = az network application-gateway redirect-config create `
--gateway-name $appGatewayName `
--resource-group $resourceGroupName `
--name "$rule-Redirect" `
--type Temporary `
--target-url $ruleToUrlMap[$rule] `
--include-query-string false `
--include-path false `
--query id `
--output tsv

az network application-gateway rule update `
--gateway-name $appGatewayName `
--resource-group $resourceGroupName `
--name $rule `
--redirect-config "$rule-Redirect" `
--no-wait
```

### Errors

No errors, CLI shows everything successful

### Issue script & Debug output

N/A

### Expected behavior

Expected: ![Image](https://github.com/user-attachments/assets/8ed3872a-4d63-4c93-9681-40af0ff4f69c)

Expecting the redirect to be selected for this rule, but it does not show in portal or respected when navigating via the browser.
I do see the redirectConfiguration in the ```az network application-gateway rule show ```

### Environment Summary

azure-cli 2.67.0

core 2.67.0
telemetry 1.1.0

Extensions:
bastion 0.2.5

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\jorda\.azure\cliextensions'

Python (Windows) 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 02:44:45) [MSC v.1941 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.