Skip to content

Commit 609ee2a

Browse files
author
awlsring
committed
fix: network schemas, plan disk -> pool disk
1 parent 5c5a701 commit 609ee2a

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

proxmox/local-storage/zfs/resource.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ func (r *zfsResource) Create(ctx context.Context, req resource.CreateRequest, re
9090
}
9191
break
9292
}
93+
pool.Disks = plan.Disks
94+
9395
tflog.Debug(ctx, fmt.Sprintf("created ZFS pool with id '%s'", pool.ID.ValueString()))
9496

9597
diags = resp.State.Set(ctx, &pool)

proxmox/network/bonds/schemas.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package bonds
33
import (
44
"regexp"
55

6+
"github.com/awlsring/terraform-provider-proxmox/proxmox/defaults"
67
"github.com/awlsring/terraform-provider-proxmox/proxmox/filters"
78
"github.com/awlsring/terraform-provider-proxmox/proxmox/network"
89
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
@@ -110,12 +111,16 @@ var resourceSchema = rs.Schema{
110111
"active": rs.BoolAttribute{
111112
Computed: true,
112113
Description: "If the bond is active.",
114+
PlanModifiers: []planmodifier.Bool{
115+
boolplanmodifier.UseStateForUnknown(),
116+
},
113117
},
114118
"autostart": rs.BoolAttribute{
115119
Optional: true,
120+
Computed: true,
116121
Description: "If the bond is set to autostart.",
117122
PlanModifiers: []planmodifier.Bool{
118-
boolplanmodifier.UseStateForUnknown(),
123+
defaults.DefaultBool(true),
119124
},
120125
},
121126
"hash_policy": rs.StringAttribute{

proxmox/network/bridges/schemas.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package bridges
33
import (
44
"regexp"
55

6+
"github.com/awlsring/terraform-provider-proxmox/proxmox/defaults"
67
"github.com/awlsring/terraform-provider-proxmox/proxmox/filters"
78
"github.com/awlsring/terraform-provider-proxmox/proxmox/network"
89
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
@@ -98,13 +99,16 @@ var resourceSchema = rs.Schema{
9899
"active": rs.BoolAttribute{
99100
Computed: true,
100101
Description: "If the bridge is active.",
102+
PlanModifiers: []planmodifier.Bool{
103+
boolplanmodifier.UseStateForUnknown(),
104+
},
101105
},
102106
"autostart": rs.BoolAttribute{
103107
Optional: true,
104108
Computed: true,
105109
Description: "If the bridge is set to autostart.",
106110
PlanModifiers: []planmodifier.Bool{
107-
boolplanmodifier.UseStateForUnknown(),
111+
defaults.DefaultBool(true),
108112
},
109113
},
110114
"vlan_aware": rs.BoolAttribute{

0 commit comments

Comments
 (0)