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

Improving the error messages when Resource ID parsing fails #21725

Merged
merged 9 commits into from
May 11, 2023

Conversation

tombuildsstuff
Copy link
Contributor

@tombuildsstuff tombuildsstuff commented May 9, 2023

Dependent on hashicorp/go-azure-helpers#155


This PR improves the error messages from the provider when a Resource ID doesn't parse correctly, these screenshots from hashicorp/go-azure-helpers#155 show some of the changes (the parsing Resource ID %q is no longer present, as of this PR):

The latest changes improve things quite considerably when the incorrect Resource ID is specified:

Screenshot 2023-05-09 at 13 51 24

And also when the casing of a given segment is incorrect:

Screenshot 2023-05-09 at 14 04 10

When an extra segment is specified, this is now output as:

Screenshot 2023-05-09 at 14 05 27


Changelog:

* dependencies: updating to `v0.56.0` of `github.com/hashicorp/go-azure-helpers` [GH-21725]
* dependencies: updating to `v0.20230510.1131358` of github.com/hashicorp/go-azure-sdk` [GH-21725]
* provider: improving the error messages when parsing a Resource ID and the ID doesn't match what's expected [GH-21725]

@tombuildsstuff
Copy link
Contributor Author

This PR needs the upstream PR merged/vendored so that make generate can pass

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Thanks @tombuildsstuff - One minor comment to address a small grammatical issue, but otherwise LGTM 👍

internal/services/apimanagement/parse/api.go Outdated Show resolved Hide resolved
@github-actions
Copy link

This functionality has been released in v3.56.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!

Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.