0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-08-25 04:45:46 +00:00

Update schema

Signed-off-by: maidlover <117573165+maidl0ver@users.noreply.github.com>
This commit is contained in:
maidlover 2025-07-30 00:37:23 +00:00
parent ad3beb7064
commit 5bf2483991

View File

@ -344,6 +344,12 @@ func Container() *schema.Resource {
},
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
mkDiskACL: {
Type: schema.TypeBool,
Description: "Explicitly enable or disable ACL support",
Optional: true,
Default: dvDiskACL,
},
mkDiskDatastoreID: {
Type: schema.TypeString,
Description: "The datastore id",
@ -351,6 +357,18 @@ func Container() *schema.Resource {
ForceNew: true,
Default: dvDiskDatastoreID,
},
mkDiskQuota: {
Type: schema.TypeBool,
Description: "Enable user quotas for the container rootfs",
Optional: true,
Default: dvDiskQuota,
},
mkDiskReplicate: {
Type: schema.TypeBool,
Description: "Will include this volume to a storage replica job",
Optional: true,
Default: dvDiskReplicate,
},
mkDiskSize: {
Type: schema.TypeInt,
Description: "The rootfs size in gigabytes",
@ -2963,17 +2981,17 @@ func containerUpdate(ctx context.Context, d *schema.ResourceData, m interface{})
rootFS.Volume = diskBlock[mkDiskDatastoreID].(string)
acl := types.CustomBool(diskBlock[mkDiskACL].(bool))
id := diskBlock[mkDiskDatastoreID].(string)
_ = diskBlock[mkDiskDatastoreID].(string)
mountOptions := diskBlock[mkDiskMountOptions].([]interface{})
quota := types.CustomBool(diskBlock[mkDiskQuota].(bool))
replicate := types.CustomBool(diskBlock[mkDiskReplicate].(bool))
size := diskBlock[mkDiskSize].(string)
_ = diskBlock[mkDiskSize].(string)
rootFS.ACL = &acl
rootFS.Volume = id // TODO: These aren't the same thing (?)
//rootFS.Volume = id // TODO: These aren't the same thing (?)
rootFS.Quota = &quota
rootFS.Replicate = &replicate
rootFS.Size = size // TODO: Size is handled differently, can only grow
//rootFS.Size = size // TODO: Size is handled differently, can only grow
if len(mountOptions) > 0 {
mountOptionsArray := make([]string, 0, len(mountOptions))