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

security.watchitems: updating to use hashicorp/go-azure-sdk #21944

Merged
merged 4 commits into from
May 31, 2023

Conversation

katbyte
Copy link
Collaborator

@katbyte katbyte commented May 26, 2023

No description provided.

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

This looks good sans one test failure which is just a quick fix around id parsing.

=== CONT  TestAccWatchlistItem_update
testcase.go:110: Step 3/6 error: Error running apply: exit status 1
Error: parsing "/subscriptions/*******/resourceGroups/acctestRG-sentinel-230526221130409583/providers/Microsoft.OperationalInsights/workspaces/acctest-workspace-230526221130409583/providers/Microsoft.SecurityInsights/watchlists/accTestWL-230526221130409583": parsing the WatchlistItem ID: the number of segments didn't match
Expected a WatchlistItem ID that matched (containing 14 segments):
> /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.OperationalInsights/workspaces/workspaceValue/providers/Microsoft.SecurityInsights/watchlists/watchlistAliasValue/watchlistItems/watchlistItemIdValue
However this value was provided (which was parsed into 0 segments):
> /subscriptions/*******/resourceGroups/acctestRG-sentinel-230526221130409583/providers/Microsoft.OperationalInsights/workspaces/acctest-workspace-230526221130409583/providers/Microsoft.SecurityInsights/watchlists/accTestWL-230526221130409583

@@ -184,29 +165,30 @@ func (r WatchlistItemResource) Update() sdk.ResourceFunc {
return fmt.Errorf("decoding %+v", err)
}

watchlistId, err := parse.WatchlistID(model.WatchlistID)
watchlistId, err := watchlistitems.ParseWatchlistItemID(model.WatchlistID)
Copy link
Member

Choose a reason for hiding this comment

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

This is causing a test failure. I think it wants to be:

Suggested change
watchlistId, err := watchlistitems.ParseWatchlistItemID(model.WatchlistID)
watchlistId, err := watchlistitems.ParseWatchlist(model.WatchlistID)

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM!

@mbfrahry mbfrahry changed the title security.watchitems: switch to go-azure-sdk security.watchitems: updating to use hashicorp/go-azure-sdk May 31, 2023
@mbfrahry mbfrahry merged commit d38f078 into main May 31, 2023
@mbfrahry mbfrahry deleted the kt/pandora-security-insights branch May 31, 2023 18:18
@github-actions github-actions bot added this to the v3.59.0 milestone May 31, 2023
mbfrahry added a commit that referenced this pull request May 31, 2023
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 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants