diff --git a/builder/osc/common/tags.go b/builder/osc/common/tags.go index 0f70bac4a..c42d48db7 100644 --- a/builder/osc/common/tags.go +++ b/builder/osc/common/tags.go @@ -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 +}