-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r/azurerm_api_management_api_subscription: fix subscription for all apis #12829
r/azurerm_api_management_api_subscription: fix subscription for all apis #12829
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @patst
Thanks for this PR.
I've taken a look through and left one comment inline but this otherwise LGTM 👍
Thanks!
azurerm/internal/services/apimanagement/api_management_subscription_resource.go
Outdated
Show resolved
Hide resolved
…ption_resource.go Co-authored-by: Tom Harvey <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for pushing those changes @patst
This functionality has been released in v2.71.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
As stated in #4482 it is currently not possible to create a subscription for all apis.
Trying to do this by omitting
product_id
andapi_id
results in an error because the scope is wrong:Error: creating/updating Subscription "7bf58dda-717a-4314-81c3-175c6b656c12" (API Management Service "apim-apim-box-gwc-apim" / Resource Group "rg-apim-box-gwc-apim"): apimanagement.SubscriptionClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="ValidationError" Message="One or more fields contain incorrect values:" Details=[{"code":"ValidationError","message":"Subscription scope should be one of '/apis', '/apis/{apiId}', '/products/{productId}'","target":"scope"}]
According to the REST docs the scope must be
/apis
to be valid for all apis:I tested this pull requests with running two API management test cases: