Azure / Azure/azure-cli-extensions

vWAN VPN gateway show command fails after adding NAT rules

Open
#5,662 1 comment 0 reactions 1 assignee Claimed by @necusjz View on GitHub
Auto-Assign Azure CLI Team feature-request Network
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az network vpn-gateway show
Extension Name: virtual-wan. Version: 0.2.15.`

**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
'Conflict key when apply client flatten: type in {\'etag\': \'W/"93addfb6-8a7c-4c81-a30f-465cdddea63d"\', \'id\': \'/subscriptions/c1dcf5c6-9af0-47ab-a0bf-6f358a5fed44/resourceGroups/lab-vwan-vpner/providers/Microsoft.Network/vpnGateways/vhub1-vpngw/natRules/vhub\', \'name\': \'vhub\', \'properties\': {\'externalMappings\': [{\'addressSpace\': \'100.64.1.0/24\'}], \'internalMappings\': [{\'addressSpace\': \'10.3.0.0/24\'}], \'mode\': \'EgressSnat\', \'provisioningState\': \'Updating\', \'type\': \'Static\'}, \'type\': \'Microsoft.Network/vpnGateways/natRules\'}'
Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/aaz/_command.py", line 145, in __call__
return self._handler(*args, **kwargs)
File "/home/dmauser/.azure/cliextensions/virtual-wan/azext_vwan/aaz/latest/network/vpn_gateway/_show.py", line 34, in _handler
return self._output()
File "/home/dmauser/.azure/cliextensions/virtual-wan/azext_vwan/aaz/latest/network/vpn_gateway/_show.py", line 72, in _output
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/aaz/_command.py", line 219, in deserialize_output
return value.to_serialized_data(processor=processor)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/aaz/_field_value.py", line 140, in to_serialized_data
v = self[name].to_serialized_data(processor=processor, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/aaz/_field_value.py", line 140, in to_serialized_data
v = self[name].to_serialized_data(processor=processor, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/aaz/_field_value.py", line 439, in to_serialized_data
v = v.to_serialized_data(
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/aaz/_field_value.py", line 151, in to_serialized_data
result = processor(self._schema, result)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/aaz/_command.py", line 213, in processor
raise KeyError(f"Conflict key when apply client flatten: {k} in {result}")
KeyError: 'Conflict key when apply client flatten: type in {\'etag\': \'W/"93addfb6-8a7c-4c81-a30f-465cdddea63d"\', \'id\': \'/subscriptions/c1dcf5c6-9af0-47ab-a0bf-6f358a5fed44/resourceGroups/lab-vwan-vpner/providers/Microsoft.Network/vpnGateways/vhub1-vpngw/natRules/vhub\', \'name\': \'vhub\', \'properties\': {\'externalMappings\': [{\'addressSpace\': \'100.64.1.0/24\'}], \'internalMappings\': [{\'addressSpace\': \'10.3.0.0/24\'}], \'mode\': \'EgressSnat\', \'provisioningState\': \'Updating\', \'type\': \'Static\'}, \'type\': \'Microsoft.Network/vpnGateways/natRules\'}'

```

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- _Put any pre-requisite steps here..._
- `az network vpn-gateway show -g {} -n {} --query {} -o {}`

## Expected Behavior

## Environment Summary
```
Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.31, Ubuntu 20.04.5 LTS
Python 3.10.8
Installer: DEB

azure-cli 2.43.0

Extensions:
virtual-wan 0.2.15
azure-firewall 0.14.4

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1
```
## Additional Context

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.