mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-05 05:24:01 +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,
|
Type: schema.TypeList,
|
||||||
Description: "The network devices",
|
Description: "The network devices",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
DefaultFunc: func() (interface{}, error) {
|
Computed: true,
|
||||||
return make([]interface{}, 1), nil
|
|
||||||
},
|
|
||||||
Elem: &schema.Resource{
|
Elem: &schema.Resource{
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
mkNetworkDeviceBridge: {
|
mkNetworkDeviceBridge: {
|
||||||
|
@ -85,10 +85,6 @@ const (
|
|||||||
dvInitializationIPConfigIPv6Address = ""
|
dvInitializationIPConfigIPv6Address = ""
|
||||||
dvInitializationIPConfigIPv6Gateway = ""
|
dvInitializationIPConfigIPv6Gateway = ""
|
||||||
dvInitializationUserAccountPassword = ""
|
dvInitializationUserAccountPassword = ""
|
||||||
dvInitializationUserDataFileID = ""
|
|
||||||
dvInitializationVendorDataFileID = ""
|
|
||||||
dvInitializationNetworkDataFileID = ""
|
|
||||||
dvInitializationMetaDataFileID = ""
|
|
||||||
dvInitializationType = ""
|
dvInitializationType = ""
|
||||||
dvKeyboardLayout = "en-us"
|
dvKeyboardLayout = "en-us"
|
||||||
dvKVMArguments = ""
|
dvKVMArguments = ""
|
||||||
@ -890,40 +886,40 @@ func VM() *schema.Resource {
|
|||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Description: "The ID of a file containing custom user data",
|
Description: "The ID of a file containing custom user data",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
Computed: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
Default: dvInitializationUserDataFileID,
|
|
||||||
ValidateDiagFunc: validators.FileID(),
|
ValidateDiagFunc: validators.FileID(),
|
||||||
},
|
},
|
||||||
mkInitializationVendorDataFileID: {
|
mkInitializationVendorDataFileID: {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Description: "The ID of a file containing vendor data",
|
Description: "The ID of a file containing vendor data",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
Computed: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
Default: dvInitializationVendorDataFileID,
|
|
||||||
ValidateDiagFunc: validators.FileID(),
|
ValidateDiagFunc: validators.FileID(),
|
||||||
},
|
},
|
||||||
mkInitializationNetworkDataFileID: {
|
mkInitializationNetworkDataFileID: {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Description: "The ID of a file containing network config",
|
Description: "The ID of a file containing network config",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
Computed: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
Default: dvInitializationNetworkDataFileID,
|
|
||||||
ValidateDiagFunc: validators.FileID(),
|
ValidateDiagFunc: validators.FileID(),
|
||||||
},
|
},
|
||||||
mkInitializationMetaDataFileID: {
|
mkInitializationMetaDataFileID: {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Description: "The ID of a file containing meta data config",
|
Description: "The ID of a file containing meta data config",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
Computed: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
Default: dvInitializationMetaDataFileID,
|
|
||||||
ValidateDiagFunc: validators.FileID(),
|
ValidateDiagFunc: validators.FileID(),
|
||||||
},
|
},
|
||||||
mkInitializationType: {
|
mkInitializationType: {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Description: "The cloud-init configuration format",
|
Description: "The cloud-init configuration format",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
Computed: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
Default: dvInitializationType,
|
|
||||||
ValidateDiagFunc: CloudInitTypeValidator(),
|
ValidateDiagFunc: CloudInitTypeValidator(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -1445,6 +1441,7 @@ func VM() *schema.Resource {
|
|||||||
Type: schema.TypeList,
|
Type: schema.TypeList,
|
||||||
Description: "The VGA configuration",
|
Description: "The VGA configuration",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
Computed: true,
|
||||||
Elem: &schema.Resource{
|
Elem: &schema.Resource{
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
mkVGAClipboard: {
|
mkVGAClipboard: {
|
||||||
|
Loading…
Reference in New Issue
Block a user