Azure / Azure/terraform-provider-azapi
CognitiveServices Delete Nested Resources
- Dominant language
- Go
- Stars
- 244
- Forks
- 97
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
For Foundry Agent test purpose we create a cognitive Account in version "Microsoft.CognitiveServices/accounts@2025-04-01-preview"
We create also a project with "Microsoft.CognitiveServices/accounts/projects@2025-04-01-preview"
We try then to delete the Account, but the error below appeared.
But it failed with :
│ RESPONSE 409: 409 Conflict
│ ERROR CODE: CannotDeleteResource
│ --------------------------------------------------------------------------------
│ {
│ "error": {
│ "code": "CannotDeleteResource",
│ "message": "Cannot delete resource while nested resources exist. Some existing nested resource IDs include: 'Microsoft.CognitiveServices/accounts/**************/projects/******************, Microsoft.CognitiveServices/accounts/*****************/projects/************************'. Please delete all nested resources before deleting this resource."
│ }
│ }
│ --
After this, we test also to create a project in the account from portal but the new project never appeared in the UI.
How to delete project which does not exist ? Which API to call to delete nested resources ?
Contributor guide
Research direction
Start with the Microsoft.CognitiveServices/accounts@2025-04-01-preview resource and its projects child resource IDs, then compare the portal state with the reported delete response. Done means identifying the supported API or Terraform operation that removes the missing nested projects so the parent account can be deleted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, terraform
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100