Azure / Azure/azure-rest-api-specs

Storage Account: `PUT` doesn't failed as expected when setting a misconfigured subnet to `.networkAcls.virtualNetworkRules`

Open
#18,844 6 comments 2 reactions 0 assignees View on GitHub
Network - Virtual Network Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

The creation (`PUT`) of storage account doesn't failed as expected when setting a subnet that didn't have service endpoint configured, to the `.networkAcls.virtualNetworkRules` property. The response is of status code 200, but the response body is as below:

```json
{"status":"Failed","error":{"code":"NetworkAclsValidationFailure","message":"Validation of network acls failure: SubnetsHaveNoServiceEndpointsConfigured:Subnets acctestsubnet220427085102717465 of virtual network /subscriptions/67a9759d-d099-4aa8-8675-e6cfd669c3f4/resourceGroups/acctestRG-storage-220427085102717465/providers/Microsoft.Network/virtualNetworks/acctestvirtnet220427085102717465 do not have ServiceEndpoints for Microsoft.Storage resources configured. Add Microsoft.Storage to subnet's ServiceEndpoints collection before trying to ACL Microsoft.Storage resources to these subnets.."}}
```

The request identifier is as below:

- x-ms-request-id: 0bb562f4-c582-48dd-9e79-d8fd6a6663f0
- x-ms-correlation-request-id: eceeede5-f103-2ddb-17da-74945fd90256

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is named. Start by locating the Storage Account creation PUT specification and its handling of networkAcls.virtualNetworkRules, then reproduce the misconfigured-subnet request described here. Done means the failed validation is represented as an expected PUT failure instead of a 200 response whose body reports status Failed.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.