feature: add create tags function
This commit is contained in:
parent
987b4148e1
commit
ff0336965b
|
@ -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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue