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

fix: Improved Error Handling for Entitlement Destruction #838

Merged
merged 2 commits into from
Jun 19, 2024
Merged

Conversation

ANUGRAHG
Copy link
Member

@ANUGRAHG ANUGRAHG commented Jun 19, 2024

Purpose

This PR resolves issue #837
The issue at hand highlights the lack of a relevant error message when attempting to destroy entitlements under specific conditions. One such scenario arises when trying to destroy an entitlement for which a service instance exists outside of Terraform's lifecycle.

To address this, an update has been made to the Delete() function of the resourceSubaccountEntitlement. This update allows the error message to be propagated from the AssignedServicePlanSubaccountDto response object, providing more informative feedback during the destruction process.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Test the code via automated test
go test ./...

What to Check

Verify that the following are valid:

  • Automated tests are executed successfully

Checklist for reviewer

The following organizational tasks must be completed before merging this PR:

  • The PR is assigned to the Terraform project and a status is set (typically "in review").
  • The PR has the matching labels assigned to it.
  • The PR has a milestone assigned to it.
  • If the PR closes an issue, the issue is referenced.
  • Possible follow-up items are created and linked.

@ANUGRAHG ANUGRAHG added the bug Something isn't working label Jun 19, 2024
@ANUGRAHG ANUGRAHG added this to the 1.5.0 milestone Jun 19, 2024
@ANUGRAHG ANUGRAHG assigned ANUGRAHG and diya-dhan and unassigned ANUGRAHG Jun 19, 2024
Copy link
Member

@lechnerc77 lechnerc77 left a comment

Choose a reason for hiding this comment

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

lgtm

@lechnerc77 lechnerc77 merged commit 532ed05 into main Jun 19, 2024
20 checks passed
@lechnerc77 lechnerc77 deleted the issue_837 branch June 19, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]Improved error message while handling drift in subaccounts related to entitlements
3 participants