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

azurerm_virtual_machine: fix panic if api return nil in os_profile #23535

Merged
merged 4 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ require (
github.com/tombuildsstuff/giovanni v0.20.0
github.com/tombuildsstuff/kermit v0.20230703.1101016
golang.org/x/crypto v0.14.0
golang.org/x/net v0.17.0
golang.org/x/tools v0.13.0
gopkg.in/yaml.v3 v3.0.1
)
Expand Down Expand Up @@ -76,6 +75,7 @@ require (
github.com/zclconf/go-cty v1.14.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
Expand Down
7 changes: 4 additions & 3 deletions internal/services/legacy/virtual_machine_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ package legacy

import (
"bytes"
"context"
"crypto/sha1"
"encoding/hex"
"fmt"
"log"
"strings"
"time"

"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/disks"
Expand All @@ -32,7 +34,6 @@ import (
"github.com/tombuildsstuff/giovanni/storage/2020-08-04/blob/blobs"
"github.com/tombuildsstuff/kermit/sdk/compute/2023-03-01/compute"
"github.com/tombuildsstuff/kermit/sdk/network/2022-07-01/network"
"golang.org/x/net/context"
)

func userDataDiffSuppressFunc(_, old, new string, _ *pluginsdk.ResourceData) bool {
Expand Down Expand Up @@ -1280,8 +1281,8 @@ func flattenAzureRmVirtualMachineDataDisk(disks *[]compute.DataDisk, disksInfo [

func flattenAzureRmVirtualMachineOsProfile(input *compute.OSProfile) []interface{} {
result := make(map[string]interface{})
result["computer_name"] = *input.ComputerName
result["admin_username"] = *input.AdminUsername
result["computer_name"] = pointer.From(input.ComputerName)
result["admin_username"] = pointer.From(input.AdminUsername)
if input.CustomData != nil {
result["custom_data"] = *input.CustomData
}
Expand Down
56 changes: 0 additions & 56 deletions vendor/golang.org/x/net/context/context.go

This file was deleted.

73 changes: 0 additions & 73 deletions vendor/golang.org/x/net/context/go17.go

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/golang.org/x/net/context/go19.go

This file was deleted.

Loading
Loading