feature: add create tags function

This commit is contained in:
Marin Salinas 2019-03-06 14:03:56 -06:00 committed by Megan Marsh
parent 987b4148e1
commit ff0336965b
1 changed files with 11 additions and 0 deletions

View File

@ -43,3 +43,14 @@ func (t TagMap) OAPITags(ctx interpolate.Context, region string, state multistep
} }
return oapiTags, nil 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
}