Skip to content

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

@avinashmg1976

Description

@avinashmg1976

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions