Use UpdateResourceMeta to apply Komodo deployment tags
This commit is contained in:
@@ -617,7 +617,7 @@ async function findTagByName(name: string): Promise<KomodoTagResult | null> {
|
||||
|
||||
/**
|
||||
* Resolve a tag by name, creating it if it doesn't exist. Returns the tag's
|
||||
* Komodo id (Mongo ObjectId string) for use in UpdateTagsOnResource.
|
||||
* Komodo id (Mongo ObjectId string) for use in UpdateResourceMeta.
|
||||
*
|
||||
* Best-effort: callers should treat failure as "skip tagging", not "roll back
|
||||
* the whole operation". Tags are cosmetic organization inside Komodo.
|
||||
@@ -685,7 +685,9 @@ export async function komodoUpdateTagsOnResource(
|
||||
if (!komodoConfigured()) {
|
||||
return { ok: false, kind: 'unconfigured', message: 'komodo not configured' };
|
||||
}
|
||||
return postAndClassify('write/UpdateTagsOnResource', {
|
||||
// UpdateResourceMeta owns tags; omit the other optional metadata fields
|
||||
// so the deployment's description and template flag remain unchanged.
|
||||
return postAndClassify('write/UpdateResourceMeta', {
|
||||
target: { type: targetType, id: targetName },
|
||||
tags: tagIds
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user