Skip to content

bugfix: azapi_data_plane_resource doesn't support 204 status code#1055

Merged
ms-henglu merged 1 commit intoAzure:mainfrom
dinigo:main
Mar 5, 2026
Merged

bugfix: azapi_data_plane_resource doesn't support 204 status code#1055
ms-henglu merged 1 commit intoAzure:mainfrom
dinigo:main

Conversation

@dinigo
Copy link
Contributor

@dinigo dinigo commented Mar 3, 2026

fix #1048

Fix the issue when UPSERTING a dataplane resource when the resource already exists. In this case the API answers with a 204 instead of a 200/201.

╷
│ Error: Failed to create/update resource
│ 
│   with azapi_data_plane_resource.works_council_index,
│   on rag.tf line 20, in resource "azapi_data_plane_resource" "rag_index":
│   20: resource "azapi_data_plane_resource" "rag_index" {
│ 
│ creating/updating "Resource: (ResourceId \"rag-westeurope.search.windows.net/indexes('rag-index')\" / Api Version \"2025-09-01\")": PUT
│ https://rag-westeurope.search.windows.net/indexes('rag-index')
│ --------------------------------------------------------------------------------
│ RESPONSE 204: 204 No Content
│ ERROR CODE UNAVAILABLE
│ --------------------------------------------------------------------------------
│ Response contained no body
│ --------------------------------------------------------------------------------
│

This implements the same bugfix as #441

@dinigo
Copy link
Contributor Author

dinigo commented Mar 3, 2026

@magodo , I've seen you moderate and approve most of the PRs around here. Can you help with this PR? thanks a lot

Copy link
Member

@ms-henglu ms-henglu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dinigo , thank you so much for taking time to open this PR!

The fix looks good, but I think it should be added to the create/update method instead of the action method. Please check.

@dinigo
Copy link
Contributor Author

dinigo commented Mar 4, 2026

I built locally and overriding the registry provider in .terraformrc, seems to be working for all ops:

  • creating
  • updating
  • destrying

@ms-henglu ms-henglu merged commit 88c1643 into Azure:main Mar 5, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"204 No Content" response causes azapi_data_plane_resource to fail on update in-place

2 participants