Skip to content

Commit

Permalink
docs: enhance customization VM
Browse files Browse the repository at this point in the history
  • Loading branch information
dmicheneau committed May 21, 2024
1 parent 1fb5a58 commit 37aa139
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/data-sources/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Read-Only:
Read-Only:

- `affinity_rule_id` (String) The ID of the affinity rule to apply to this VM.
- `customization` (Attributes) The customization settings for the VM. (see [below for nested schema](#nestedatt--settings--customization))
- `customization` (Attributes) The customization settings for the VM. To enable the customization, set the `enabled` attribute to `true`. (see [below for nested schema](#nestedatt--settings--customization))
- `expose_hardware_virtualization` (Boolean) Whether to expose hardware CPU virtualization to the guest OS.
- `guest_properties` (Map of String) Key/Value settings for guest properties.
- `os_type` (String) The Operating System type installed on the VM.
Expand All @@ -89,7 +89,7 @@ Read-Only:
- `allow_local_admin_password` (Boolean) Whether to allow the local admin password to be changed.
- `auto_generate_password` (Boolean) Whether to auto-generate the password.
- `change_sid` (Boolean) Whether to change the SID of the VM. Applicable only for Windows VMs.
- `enabled` (Boolean) Whether guest customization is enabled or not.
- `enabled` (Boolean) Whether guest customization is enabled or not. If enabled, the VM will be customized on first boot.
- `force` (Boolean) This attributes is not set in the data source.
- `hostname` (String) Computer name to assign to this virtual machine. Default is the value of attribute `name`.
- `init_script` (String) The init script to run.
Expand Down
6 changes: 4 additions & 2 deletions docs/resources/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ resource "cloudavenue_vm" "example-iso" {
}
settings = {
customization = {
enabled = true
auto_generate_password = true
}
os_type = "debian10_64Guest"
Expand Down Expand Up @@ -213,7 +214,7 @@ Optional:
Optional:

- `affinity_rule_id` (String) The ID of the affinity rule to apply to this VM.
- `customization` (Attributes) The customization settings for the VM. (see [below for nested schema](#nestedatt--settings--customization))
- `customization` (Attributes) The customization settings for the VM. To enable the customization, set the `enabled` attribute to `true`. (see [below for nested schema](#nestedatt--settings--customization))
- `expose_hardware_virtualization` (Boolean) Whether to expose hardware CPU virtualization to the guest OS <a href="#restartrequired" style="color:red">(Restart Required)</a>. Value defaults to `false`.
- `guest_properties` (Map of String) Key/Value settings for guest properties.
- `os_type` (String) The Operating System type to be installed on the VM.<a href="#restartrequired" style="color:red">(Restart Required)</a>. Value must be one of: `amazonlinux2_64Guest` (Amazon Linux 2 (64-bit)), `asianux3Guest` (ASIANUX 3 (32-bit)), `asianux3_64Guest` (ASIANUX 3 (64-bit)), `asianux4Guest` (ASIANUX 4 (32-bit)), `asianux4_64Guest` (ASIANUX 4 (64-bit)), `asianux7_64Guest` (ASIANUX 7 (64-bit)), `asianux8_64Guest` (ASIANUX 8 (64-bit)), `centos64Guest` (CentOS Linux 5 (64-bit)), `centos6Guest` (CentOS Linux 6 (32-bit)), `centos6_64Guest` (CentOS Linux 6 (64-bit)), `centos7_64Guest` (CentOS Linux 7 (64-bit)), `centos8_64Guest` (CentOS Linux 8 (64-bit)), `centosGuest` (CentOS Linux 5 (32-bit)), `coreos64Guest` (CoreOS Linux (64-bit)), `darwin10Guest` (Apple macOS 10.6 (32-bit)), `darwin10_64Guest` (Apple macOS 10.6 (64-bit)), `darwin11Guest` (Apple macOS 10.7 (32-bit)), `darwin11_64Guest` (Apple macOS 10.7 (64-bit)), `darwin12_64Guest` (Apple macOS 10.8 (64-bit)), `darwin13_64Guest` (Apple macOS 10.9 (64-bit)), `darwin14_64Guest` (Apple macOS 10.10 (64-bit)), `darwin15_64Guest` (Apple macOS 10.11 (64-bit)), `darwin16_64Guest` (Apple macOS 10.12 (64-bit)), `darwin17_64Guest` (Apple macOS 10.13 (64-bit)), `darwin18_64Guest` (Apple macOS 10.14 (64-bit)), `debian10Guest` (Debian Linux 10 (32-bit)), `debian10_64Guest` (Debian Linux 10 (64-bit)), `debian4Guest` (Debian Linux 4 (32-bit)), `debian4_64Guest` (Debian Linux 4 (64-bit)), `debian5Guest` (Debian Linux 5 (32-bit)), `debian5_64Guest` (Debian Linux 5 (64-bit)), `debian6Guest` (Debian Linux 6 (32-bit)), `debian6_64Guest` (Debian Linux 6 (64-bit)), `debian7Guest` (Debian Linux 7 (32-bit)), `debian7_64Guest` (Debian Linux 7 (64-bit)), `debian8Guest` (Debian Linux 8 (32-bit)), `debian8_64Guest` (Debian Linux 8 (64-bit)), `debian9Guest` (Debian Linux 9 (32-bit)), `debian9_64Guest` (Debian Linux 9 (64-bit)), `dosGuest` (Microsoft MS-DOS), `eComStation2Guest` (Serenity Systems eComStation 2), `eComStationGuest` (Serenity Systems eComStation 1), `freebsd11Guest` (FreeBSD 11 (32-bit)), `freebsd11_64Guest` (FreeBSD 11 (64-bit)), `freebsd12Guest` (FreeBSD 12 or later versions (32-bit)), `freebsd12_64Guest` (FreeBSD 12 or later versions (64-bit)), `freebsd64Guest` (FreeBSD Pre-11 versions (64-bit)), `freebsdGuest` (FreeBSD Pre-11 versions (32-bit)), `netware5Guest` (Novell NetWare 5.x), `netware6Guest` (Novell NetWare 6.x), `oesGuest` (Novell Open Enterprise Server (32-bit)), `openServer5Guest` (SCO OpenServer 5), `openServer6Guest` (SCO OpenServer 6), `oracleLinux64Guest` (Oracle Linux 5 (64-bit)), `oracleLinux6Guest` (Oracle Linux 6 (32-bit)), `oracleLinux6_64Guest` (Oracle Linux 6 (64-bit)), `oracleLinux7_64Guest` (Oracle Linux 7 (64-bit)), `oracleLinux8_64Guest` (Oracle Linux 8 (64-bit)), `oracleLinuxGuest` (Oracle Linux 5 (32-bit)), `os2Guest` (IBM OS/2), `other24xLinux64Guest` (Other Linux 2.4.x (64-bit)), `other24xLinuxGuest` (Other Linux 2.4.x (32-bit)), `other26xLinux64Guest` (Other Linux 2.6.x (64-bit)), `other26xLinuxGuest` (Other Linux 2.6.x (32-bit)), `other3xLinux64Guest` (Other Linux 3.x (64-bit)), `other3xLinuxGuest` (Other Linux 3.x (32-bit)), `other4xLinux64Guest` (Other Linux 4.x (64-bit)), `other4xLinuxGuest` (Other Linux 4.x (32-bit)), `otherGuest` (Other (32-bit)), `otherGuest64` (Other (64-bit)), `otherLinux64Guest` (Other Linux (64-bit)), `otherLinuxGuest` (Other Linux (32-bit)), `rhel2Guest` (Red Hat Enterprise Linux 2 (32-bit)), `rhel3Guest` (Red Hat Enterprise Linux 3 (32-bit)), `rhel3_64Guest` (Red Hat Enterprise Linux 3 (64-bit)), `rhel4Guest` (Red Hat Enterprise Linux 4 (32-bit)), `rhel4_64Guest` (Red Hat Enterprise Linux 4 (64-bit)), `rhel5Guest` (Red Hat Enterprise Linux 5 (32-bit)), `rhel5_64Guest` (Red Hat Enterprise Linux 5 (64-bit)), `rhel6Guest` (Red Hat Enterprise Linux 6 (32-bit)), `rhel6_64Guest` (Red Hat Enterprise Linux 6 (64-bit)), `rhel7_64Guest` (Red Hat Enterprise Linux 7 (64-bit)), `rhel8_64Guest` (Red Hat Enterprise Linux 8 (64-bit)), `sles10Guest` (SUSE Linux Enterprise Server 10 (32-bit)), `sles10_64Guest` (SUSE Linux Enterprise Server 10 (64-bit)), `sles11Guest` (SUSE Linux Enterprise Server 11 (32-bit)), `sles11_64Guest` (SUSE Linux Enterprise Server 11 (64-bit)), `sles12_64Guest` (SUSE Linux Enterprise Server 12 (64-bit)), `sles15_64Guest` (SUSE Linux Enterprise Server 15 (64-bit)), `sles64Guest` (SUSE Linux Enterprise Server 11 (64-bit)), `slesGuest` (SUSE Linux Enterprise Server 11 (32-bit)), `solaris10Guest` (Oracle Solaris 10 (32-bit)), `solaris10_64Guest` (Oracle Solaris 10 (64-bit)), `solaris11_64Guest` (Oracle Solaris 11 (64-bit)), `ubuntu64Guest` (Ubuntu Linux 64-bit), `ubuntuGuest` (Ubuntu Linux 32-bit), `unixWare7Guest` (SCO UnixWare 7), `vmwarePhoton64Guest` (VMware Photon OS 64-bit), `win2000AdvServGuest` (Microsoft Windows 2000), `win2000ProGuest` (Microsoft Windows 2000 Professional), `win2000ServGuest` (Microsoft Windows 2000 Server), `win31Guest` (Microsoft Windows 3.1), `win95Guest` (Microsoft Windows 95), `win98Guest` (Microsoft Windows 98), `winLonghorn64Guest` (Microsoft Windows Server 2008 (64-bit)), `winLonghornGuest` (Microsoft Windows Server 2008 (32-bit)), `winNTGuest` (Microsoft Windows NT), `winNetBusinessGuest` (Microsoft Windows Small Business Server 2003), `winNetDatacenter64Guest` (Microsoft Windows Server 2003 Datacenter Edition (64-bit)), `winNetDatacenterGuest` (Microsoft Windows Server 2003 Datacenter Edition (32-bit)), `winNetEnterprise64Guest` (Microsoft Windows Server 2003 (64-bit)), `winNetEnterpriseGuest` (Microsoft Windows Server 2003 (32-bit)), `winNetStandard64Guest` (Microsoft Windows Server 2003 Standard Edition (64-bit)), `winNetStandardGuest` (Microsoft Windows Server 2003 Standard Edition (32-bit)), `winNetWebGuest` (Microsoft Windows Server 2003 Web Edition (32-bit)), `winVista64Guest` (Microsoft Windows Vista (64-bit)), `winVistaGuest` (Microsoft Windows Vista (32-bit)), `winXPPro64Guest` (Microsoft Windows XP Professional (64-bit)), `winXPProGuest` (Microsoft Windows XP Professional (32-bit)), `windows7Guest` (Microsoft Windows 7 (32-bit)), `windows7Server64Guest` (Microsoft Windows Server 2008 R2 (64-bit)), `windows7_64Guest` (Microsoft Windows 7 (64-bit)), `windows8Guest` (Microsoft Windows 8.x (32-bit)), `windows8Server64Guest` (Microsoft Windows Server 2012 (64-bit)), `windows8_64Guest` (Microsoft Windows 8.x (64-bit)), `windows9Guest` (Microsoft Windows 10 (32-bit)), `windows9_64Guest` (Microsoft Windows 10 (64-bit)).
Expand All @@ -228,7 +229,7 @@ Optional:
- `allow_local_admin_password` (Boolean) Whether to allow the local admin password to be changed. Value defaults to `false`.
- `auto_generate_password` (Boolean) Whether to auto-generate the password. Ensure that if an attribute is set, these are not set: "[<.admin_password]".
- `change_sid` (Boolean) Whether to change the SID of the VM. Applicable only for Windows VMs. Value defaults to `false`.
- `enabled` (Boolean) Whether guest customization is enabled or not. Value defaults to `false`.
- `enabled` (Boolean) Whether guest customization is enabled or not. If enabled, the VM will be customized on first boot. Value defaults to `false`.
- `force` (Boolean) `true` value will cause the VM to reboot on every `apply` operation. Value defaults to `false`.
- `hostname` (String) Computer name to assign to this virtual machine. Default is the value of attribute `name`. Must be between 1 and 80 characters long and can contain only letters, numbers and hyphen. It must not contain only digits.
- `init_script` (String) The init script to run.
Expand Down Expand Up @@ -321,6 +322,7 @@ resource "cloudavenue_vm" "example" {
"guestinfo.hostname" = "example-vm"
}
customization = {
enabled = true
auto_generate_password = true
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/vm/vm_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ func vmSuperSchema(_ context.Context) superschema.Schema {
},
"customization": superschema.SingleNestedAttribute{
Common: &schemaR.SingleNestedAttribute{
MarkdownDescription: "The customization settings for the VM.",
MarkdownDescription: "The customization settings for the VM. To enable the customization, set the `enabled` attribute to `true`.",
Computed: true,
},
Resource: &schemaR.SingleNestedAttribute{
Expand All @@ -599,7 +599,7 @@ func vmSuperSchema(_ context.Context) superschema.Schema {
},
"enabled": superschema.BoolAttribute{
Common: &schemaR.BoolAttribute{
MarkdownDescription: "Whether guest customization is enabled or not.",
MarkdownDescription: "Whether guest customization is enabled or not. If enabled, the VM will be customized on first boot.",
Computed: true,
},
Resource: &schemaR.BoolAttribute{
Expand Down
2 changes: 2 additions & 0 deletions templates/resources/vm.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ resource "cloudavenue_vm" "example-iso" {
}
settings = {
customization = {
enabled = true
auto_generate_password = true
}
os_type = "debian10_64Guest"
Expand Down Expand Up @@ -207,6 +208,7 @@ resource "cloudavenue_vm" "example" {
"guestinfo.hostname" = "example-vm"
}
customization = {
enabled = true
auto_generate_password = true
}
}
Expand Down

0 comments on commit 37aa139

Please sign in to comment.