Azure / Azure/azure-cli

'NoneType' object has no attribute 'private_dns_zone_configs' - while adding Private EndPoint to DNS zone

Open
#21,146 7 comments 0 reactions 1 assignee Claimed by @kairu-ms View on GitHub
act-quality-productivity-squad Customer Usage customer-reported Network Service Attention Traiged
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

I am able to create Private EndPoint successfully using the CLI command. In the same setup, I am trying to add Private Endpoint created in the earlier step to existing DNS zone but getting below error.

The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'private_dns_zone_configs'
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/network/custom.py", line 3388, in add_private_endpoint_private_dns_zone
private_dns_zone_group.private_dns_zone_configs.append(private_dns_zone)
AttributeError: 'NoneType' object has no attribute 'private_dns_zone_configs'
To open an issue, please run: 'az feedback'

az network private-endpoint dns-zone-group add --endpoint-name MyPE -g MyRG -n MyZoneGroup --zone-name Zone1 --private-dns-zone PrivateDNSZone1

I tried to execute the command from my local machine which has Powershell, Python and CLI installed. I also tried on the Azure UI command line too. Same error.

Note: Private EndPoint created is in different Subscription/Resource group and DNS zone is in different Subscription/ResourceGroup

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.