@@ -18,6 +18,7 @@ import (
1818 "github.com/Telmate/terraform-provider-proxmox/v2/proxmox/Internal/resource/guest/lxc/password"
1919 "github.com/Telmate/terraform-provider-proxmox/v2/proxmox/Internal/resource/guest/lxc/privilege"
2020 "github.com/Telmate/terraform-provider-proxmox/v2/proxmox/Internal/resource/guest/lxc/rootmount"
21+ "github.com/Telmate/terraform-provider-proxmox/v2/proxmox/Internal/resource/guest/lxc/ssh_public_keys"
2122 "github.com/Telmate/terraform-provider-proxmox/v2/proxmox/Internal/resource/guest/lxc/swap"
2223 "github.com/Telmate/terraform-provider-proxmox/v2/proxmox/Internal/resource/guest/lxc/template"
2324 "github.com/Telmate/terraform-provider-proxmox/v2/proxmox/Internal/resource/guest/name"
@@ -45,7 +46,6 @@ func ResourceLxcNew() *schema.Resource {
4546 CustomizeDiff : reboot .CustomizeDiff (),
4647
4748 Schema : map [string ]* schema.Schema {
48- tags .Root : tags .Schema (),
4949 architecture .Root : architecture .Schema (),
5050 clone .Root : clone .Schema (),
5151 cpu .Root : cpu .Schema (),
@@ -70,7 +70,9 @@ func ResourceLxcNew() *schema.Resource {
7070 reboot .RootAutomaticSeverity : reboot .SchemaAutomaticSeverity (),
7171 reboot .RootRequired : reboot .SchemaRequired (),
7272 rootmount .Root : rootmount .Schema (),
73+ ssh_public_keys .Root : ssh_public_keys .Schema (),
7374 swap .Root : swap .Schema (),
75+ tags .Root : tags .Schema (),
7476 template .Root : template .Schema (),
7577 },
7678 Timeouts : resourceTimeouts (),
@@ -132,8 +134,9 @@ func resourceLxcNewCreate(ctx context.Context, d *schema.ResourceData, meta any)
132134 } else {
133135 config .Node = & targetNode
134136 config .CreateOptions = & pveSDK.LxcCreateOptions {
135- OsTemplate : template .SDK (d ),
136- UserPassword : password .SDK (d )}
137+ OsTemplate : template .SDK (d ),
138+ PublicSSHkeys : ssh_public_keys .SDK (d ),
139+ UserPassword : password .SDK (d )}
137140 config .Pool = util .Pointer (pool .SDK (d ))
138141 vmr , err = config .Create (ctx , client )
139142 if err != nil {
0 commit comments