Skip to content
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

feat: delete reaources prior to cancel sub #405

Open
lukemurraynz opened this issue Aug 16, 2024 · 1 comment
Open

feat: delete reaources prior to cancel sub #405

lukemurraynz opened this issue Aug 16, 2024 · 1 comment
Labels
enhancement New feature or request Type: Feature Request ➕ New feature or request

Comments

@lukemurraynz
Copy link

Community Note

  • 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.

@matt-FFFFFF
Copy link
Member

Hi,

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.

@matt-FFFFFF matt-FFFFFF added enhancement New feature or request Type: Feature Request ➕ New feature or request labels Aug 16, 2024
@matt-FFFFFF matt-FFFFFF changed the title bug: │ Error: failed to cancel Subscription: subscriptions feat: delete reaources prior to cancel sub Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Type: Feature Request ➕ New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants