Skip to content

Commit 4eaa3a7

Browse files
authored
Merge pull request #334 from footprintmediaits/add-lxc-tag-support
Add support for tagging LXCs
2 parents 2f095f0 + b5bc8f6 commit 4eaa3a7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

proxmox/resource_lxc.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ func resourceLxc() *schema.Resource {
112112
Type: schema.TypeString,
113113
Optional: true,
114114
},
115+
"tags": {
116+
Type: schema.TypeString,
117+
Optional: true,
118+
},
115119
"memory": {
116120
Type: schema.TypeInt,
117121
Optional: true,
@@ -421,6 +425,7 @@ func resourceLxcCreate(d *schema.ResourceData, meta interface{}) error {
421425
config.Start = d.Get("start").(bool)
422426
config.Startup = d.Get("startup").(string)
423427
config.Swap = d.Get("swap").(int)
428+
config.Tags = d.Get("tags").(string)
424429
config.Template = d.Get("template").(bool)
425430
config.Tty = d.Get("tty").(int)
426431
config.Unique = d.Get("unique").(bool)
@@ -530,6 +535,7 @@ func resourceLxcUpdate(d *schema.ResourceData, meta interface{}) error {
530535
config.Start = d.Get("start").(bool)
531536
config.Startup = d.Get("startup").(string)
532537
config.Swap = d.Get("swap").(int)
538+
config.Tags = d.Get("tags").(string)
533539
config.Template = d.Get("template").(bool)
534540
config.Tty = d.Get("tty").(int)
535541
config.Unique = d.Get("unique").(bool)
@@ -686,6 +692,7 @@ func _resourceLxcRead(d *schema.ResourceData, meta interface{}) error {
686692
d.Set("searchdomain", config.SearchDomain)
687693
d.Set("startup", config.Startup)
688694
d.Set("swap", config.Swap)
695+
d.Set("tags", config.Tags)
689696
d.Set("template", config.Template)
690697
d.Set("tty", config.Tty)
691698
d.Set("unique", config.Unique)

0 commit comments

Comments
 (0)