Skip to content

Commit

Permalink
Merge pull request #334 from footprintmediaits/add-lxc-tag-support
Browse files Browse the repository at this point in the history
Add support for tagging LXCs
  • Loading branch information
ggongaware authored Apr 28, 2021
2 parents 2f095f0 + b5bc8f6 commit 4eaa3a7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions proxmox/resource_lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ func resourceLxc() *schema.Resource {
Type: schema.TypeString,
Optional: true,
},
"tags": {
Type: schema.TypeString,
Optional: true,
},
"memory": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -421,6 +425,7 @@ func resourceLxcCreate(d *schema.ResourceData, meta interface{}) error {
config.Start = d.Get("start").(bool)
config.Startup = d.Get("startup").(string)
config.Swap = d.Get("swap").(int)
config.Tags = d.Get("tags").(string)
config.Template = d.Get("template").(bool)
config.Tty = d.Get("tty").(int)
config.Unique = d.Get("unique").(bool)
Expand Down Expand Up @@ -530,6 +535,7 @@ func resourceLxcUpdate(d *schema.ResourceData, meta interface{}) error {
config.Start = d.Get("start").(bool)
config.Startup = d.Get("startup").(string)
config.Swap = d.Get("swap").(int)
config.Tags = d.Get("tags").(string)
config.Template = d.Get("template").(bool)
config.Tty = d.Get("tty").(int)
config.Unique = d.Get("unique").(bool)
Expand Down Expand Up @@ -686,6 +692,7 @@ func _resourceLxcRead(d *schema.ResourceData, meta interface{}) error {
d.Set("searchdomain", config.SearchDomain)
d.Set("startup", config.Startup)
d.Set("swap", config.Swap)
d.Set("tags", config.Tags)
d.Set("template", config.Template)
d.Set("tty", config.Tty)
d.Set("unique", config.Unique)
Expand Down

0 comments on commit 4eaa3a7

Please sign in to comment.