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

azure/uploader: remove rg location check #102

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions azure/uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,21 +352,8 @@ func (u *Uploader) ensureResourceGroup(ctx context.Context) error {
if err != nil {
return fmt.Errorf("checking existence of resource group %s: %w", rg, err)
}

if resp.Success {
// Check resource group location matches.
group, err := u.groups.Get(ctx, rg, &armresources.ResourceGroupsClientGetOptions{})
if err != nil {
return fmt.Errorf("getting resource group %s: %w", rg, err)
}
if group.Location == nil {
return fmt.Errorf("resource group %s exists but has no location", rg)
}
if !strings.EqualFold(*group.Location, location) {
return fmt.Errorf("resource group %s exists but isn't in the expected location %s but in %s", rg, location, *group.Location)
}

u.log.Printf("Resource group %s in %s exists", rg, location)
u.log.Printf("Resource group %s exists", rg)
return nil
}

Expand Down
Loading