Skip to content

"az network private-endpoint-connection approve" - 'NoneType' object is not subscriptable #24196

@sams976

Description

@sams976

I am trying to automate the approval of private-endpoint-connection in AZ CLI for my WebApp but receiving
'NoneType' object is not subscriptable

I also used the full string instead of a variable to no avail

$ az --version
azure-cli                         2.41.0

core                              2.41.0
telemetry                          1.0.8

Dependencies:
msal                            1.20.0b1
azure-mgmt-resource             21.1.0b1

To Verify

PROJECT_RG=RGNAME
PROJECT_WEBAPP_NAME=WEBAPPNAME

PROJECT_WEBAPP_PEID=$(az network private-endpoint-connection list --name $PROJECT_WEBAPP_NAME --resource-group $PROJECT_RG --type Microsoft.Web/sites --query "[?properties.privateLinkServiceConnectionState.status == 'Pending'].id" -o tsv)
echo $PROJECT_WEBAPP_PEID

az network private-endpoint-connection approve --id $PROJECT_WEBAPP_PEID --description "Approved"

This is very similar to the error observed here
#20752

Thanks in advance

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions