Skip to content

Commit

Permalink
Manage glesys_networkadapter Name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
norrland committed Sep 11, 2024
1 parent 134235f commit d8411c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions glesys/resource_glesys_networkadapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func resourceGlesysNetworkAdapter() *schema.Resource {
Description: "Network Adapter name",
Type: schema.TypeString,
Computed: true,
Optional: true,
},
"networkid": {
Description: "Network ID to connect to. Defaults to `internet`.",
Expand All @@ -59,6 +60,7 @@ func resourceGlesysNetworkAdapterCreate(ctx context.Context, d *schema.ResourceD
params := glesys.CreateNetworkAdapterParams{
AdapterType: d.Get("adaptertype").(string),
Bandwidth: d.Get("bandwidth").(int),
Name: d.Get("name").(string),
NetworkID: d.Get("networkid").(string),
ServerID: d.Get("serverid").(string),
}
Expand Down Expand Up @@ -102,6 +104,9 @@ func resourceGlesysNetworkAdapterUpdate(ctx context.Context, d *schema.ResourceD
if d.HasChange("bandwidth") {
params.Bandwidth = d.Get("bandwidth").(int)
}
if d.HasChange("name") {
params.Name = d.Get("name").(string)
}
if d.HasChange("networkid") {
params.NetworkID = d.Get("networkid").(string)
}
Expand Down

0 comments on commit d8411c9

Please sign in to comment.