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

r\application_insights fix workspace_id case that force recreation #19325

Merged
merged 4 commits into from
Nov 21, 2022

Conversation

mgattei
Copy link
Contributor

@mgattei mgattei commented Nov 16, 2022

Fix #13348

Please note that this is my first contribution and my go knowledge is really basic.

This should fix the problem that terraform ask for recreation If the resource has a linked workspace.

Things tried before opening the PR:

  • Deleting Log Analytics Workspace resource from state
  • Deleting Application Insights resource from state
  • Reimporting in different order

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @mgattei

Thanks for this PR - I've taken a look through and left some comments inline, but if we can fix those up then this should be good to go. Whilst normally we'd ask for acceptance tests to cover this change, taking a look through it appears that the happy path is covered via the test TestAccApplicationInsights_basicWorkspaceMode, so I think we should be good once this the comments are addressed 👍

Thanks!

Co-authored-by: Tom Harvey <tombuildsstuff@users.noreply.github.com>
@mgattei mgattei marked this pull request as draft November 18, 2022 16:18
@mgattei
Copy link
Contributor Author

mgattei commented Nov 18, 2022

Thanks @tombuildsstuff for the review!

I applied the suggestions and double checked locally, I also tried the test and seems ok.

image

@mgattei mgattei marked this pull request as ready for review November 18, 2022 17:24
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a 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 @mgattei

@tombuildsstuff tombuildsstuff added this to the v3.33.0 milestone Nov 21, 2022
@tombuildsstuff
Copy link
Contributor

Tests pass:

Screenshot 2022-11-21 at 12 49 22

@tombuildsstuff tombuildsstuff merged commit 464a2f3 into hashicorp:main Nov 21, 2022
tombuildsstuff added a commit that referenced this pull request Nov 21, 2022
@github-actions
Copy link

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

@github-actions
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 Dec 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants