mirror of
https://github.com/hashicorp/packer.git
synced 2026-04-21 22:26:59 -04:00
feature: add create tags function
This commit is contained in:
parent
987b4148e1
commit
ff0336965b
1 changed files with 11 additions and 0 deletions
|
|
@ -43,3 +43,14 @@ func (t TagMap) OAPITags(ctx interpolate.Context, region string, state multistep
|
|||
}
|
||||
return oapiTags, nil
|
||||
}
|
||||
|
||||
func CreateTags(conn *oapi.Client, resourceID string, ui packer.Ui, tags OAPITags) error {
|
||||
tags.Report(ui)
|
||||
|
||||
_, err := conn.POST_CreateTags(oapi.CreateTagsRequest{
|
||||
ResourceIds: []string{resourceID},
|
||||
Tags: tags,
|
||||
})
|
||||
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue