azurerm_api_management_api : Fix the error caused by api_type being specified as websocket but service_url is specified as an empty string#29624
Merged
katbyte merged 3 commits intohashicorp:mainfrom May 26, 2025
Conversation
1 task
katbyte
added a commit
that referenced
this pull request
May 26, 2025
sreallymatt
pushed a commit
that referenced
this pull request
May 29, 2025
sreallymatt
added a commit
that referenced
this pull request
May 29, 2025
* Update CHANGELOG.md for #29433 * Update CHANGELOG.md for #29319 * Update CHANGELOG.md for #29373 * Update CHANGELOG.md #29024 * Update CHANGELOG.md #29666 * Update CHANGELOG.md #29649 * Update CHANGELOG.md #29715 * Update CHANGELOG.md #29273 * Update CHANGELOG.md #29709 * Update CHANGELOG.md #29624 * Update CHANGELOG.md #29710 * Update CHANGELOG.md * Update CHANGELOG.md #28262 * Update CHANGELOG.md #29499 * Update CHANGELOG.md #29377 * Update CHANGELOG.md #29337 * Update CHANGELOG.md #29246 * Update CHANGELOG.md #29221 * Update CHANGELOG.md #29216 * Update CHANGELOG.md #28133 * Update CHANGELOG.md #29669 * Update CHANGELOG.md for #29717 * Update CHANGELOG.md #29310 * Update CHANGELOG.md #29466 * Update CHANGELOG.md #29723 * Update CHANGELOG.md #29716 * Update CHANGELOG.md * Update CHANGELOG.md #29406 * correct resource name * Update CHANGELOG.md #29482 * prep for release --------- Co-authored-by: Matthew Frahry <mbfrahry@gmail.com> Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com> Co-authored-by: catriona-m <86247157+catriona-m@users.noreply.github.com> Co-authored-by: kt <kt@katbyte.me> Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com> Co-authored-by: Wyatt Fry <wyattfry@gmail.com>
Contributor
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Community Note
Description
The API behaves as follows:
When
api_typeis specified aswebsocketbutservice_urlis specified as an empty string(service_url= null or omitservice_urlattribute), the API returns error "WebSocket API type is not enabled for the service or sku".When
api_typeis specified aswebsocketandservice_urlis not specified, the API returns error "'serviceUrl' must not be empty."Submit this PR to fix #29610 by not passing an empty string when
service_urlis not specified or specified as null. Also add the validation thatservice_urlmust be specified whenapi_typeis specified aswebsocket.PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
TC test results:
https://hashicorp.teamcity.com/buildConfiguration/TF_AzureRM_AZURERM_SERVICE_PUBLIC_APIMANAGEMENT/380603?buildTab=tests
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_api_management_api- fix the error caused byapi_typebeing specified aswebsocketbutservice_urlis specified as an empty string [azurerm_api_management_api sends serviceUrl: "" when service_url is omitted/null, causing Azure 400 ValidationError for WebSocket APIs #29610]This is a (please select all that apply):
Related Issue(s)
Fixes #29610
Note
If this PR changes meaningfully during the course of review please update the title and description as required.