mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 02:31:10 +00:00
fix(vm): cloned VM may be recreated/updated on re-apply (#1914)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
8cf569b8e7
commit
5974d8b3a3
@ -75,9 +75,7 @@ func Schema() map[string]*schema.Schema {
|
||||
Type: schema.TypeList,
|
||||
Description: "The network devices",
|
||||
Optional: true,
|
||||
DefaultFunc: func() (interface{}, error) {
|
||||
return make([]interface{}, 1), nil
|
||||
},
|
||||
Computed: true,
|
||||
Elem: &schema.Resource{
|
||||
Schema: map[string]*schema.Schema{
|
||||
mkNetworkDeviceBridge: {
|
||||
|
@ -85,10 +85,6 @@ const (
|
||||
dvInitializationIPConfigIPv6Address = ""
|
||||
dvInitializationIPConfigIPv6Gateway = ""
|
||||
dvInitializationUserAccountPassword = ""
|
||||
dvInitializationUserDataFileID = ""
|
||||
dvInitializationVendorDataFileID = ""
|
||||
dvInitializationNetworkDataFileID = ""
|
||||
dvInitializationMetaDataFileID = ""
|
||||
dvInitializationType = ""
|
||||
dvKeyboardLayout = "en-us"
|
||||
dvKVMArguments = ""
|
||||
@ -890,40 +886,40 @@ func VM() *schema.Resource {
|
||||
Type: schema.TypeString,
|
||||
Description: "The ID of a file containing custom user data",
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
ForceNew: true,
|
||||
Default: dvInitializationUserDataFileID,
|
||||
ValidateDiagFunc: validators.FileID(),
|
||||
},
|
||||
mkInitializationVendorDataFileID: {
|
||||
Type: schema.TypeString,
|
||||
Description: "The ID of a file containing vendor data",
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
ForceNew: true,
|
||||
Default: dvInitializationVendorDataFileID,
|
||||
ValidateDiagFunc: validators.FileID(),
|
||||
},
|
||||
mkInitializationNetworkDataFileID: {
|
||||
Type: schema.TypeString,
|
||||
Description: "The ID of a file containing network config",
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
ForceNew: true,
|
||||
Default: dvInitializationNetworkDataFileID,
|
||||
ValidateDiagFunc: validators.FileID(),
|
||||
},
|
||||
mkInitializationMetaDataFileID: {
|
||||
Type: schema.TypeString,
|
||||
Description: "The ID of a file containing meta data config",
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
ForceNew: true,
|
||||
Default: dvInitializationMetaDataFileID,
|
||||
ValidateDiagFunc: validators.FileID(),
|
||||
},
|
||||
mkInitializationType: {
|
||||
Type: schema.TypeString,
|
||||
Description: "The cloud-init configuration format",
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
ForceNew: true,
|
||||
Default: dvInitializationType,
|
||||
ValidateDiagFunc: CloudInitTypeValidator(),
|
||||
},
|
||||
},
|
||||
@ -1445,6 +1441,7 @@ func VM() *schema.Resource {
|
||||
Type: schema.TypeList,
|
||||
Description: "The VGA configuration",
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Elem: &schema.Resource{
|
||||
Schema: map[string]*schema.Schema{
|
||||
mkVGAClipboard: {
|
||||
|
Loading…
Reference in New Issue
Block a user