You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Versions
Please paste the output of terraform version command from within the initialized directory:
1.7.4
Please enter the module version that you are using:
4.0.2
Description
Steps to Reproduce
Destroy subscription, containing resources, such as API Management.
│ Error: failed to cancel Subscription: subscriptions.SubscriptionsClient#SubscriptionCancel: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="ResourcesExistingOnSubscription" Message="There are existing resources associated with subscription. Delete them before cancelling the subscription"
Screenshots
Additional context
In my context, we are using Subscriptions for a Sandbox environment, so the Subscriptions exist for a limited time; using the Azure Portal, we can force the cancellation and ignore the resources. It would be great to have the same functionality else the Subscription seems to remain Active, with RBAC assignments stripped, even though it was removed from the state file.
The text was updated successfully, but these errors were encountered:
We will consider this feature for a future version. Currently it's working as designed as the feature to delete resources prior to cancellation is not available in the subscriptions api.
Community Note
Versions
Please paste the output of
terraform version
command from within the initialized directory:Please enter the module version that you are using:
Description
Steps to Reproduce
Destroy subscription, containing resources, such as API Management.
│ Error: failed to cancel Subscription: subscriptions.SubscriptionsClient#SubscriptionCancel: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="ResourcesExistingOnSubscription" Message="There are existing resources associated with subscription. Delete them before cancelling the subscription"
Screenshots
Additional context
In my context, we are using Subscriptions for a Sandbox environment, so the Subscriptions exist for a limited time; using the Azure Portal, we can force the cancellation and ignore the resources. It would be great to have the same functionality else the Subscription seems to remain Active, with RBAC assignments stripped, even though it was removed from the state file.
The text was updated successfully, but these errors were encountered: