@@ -311,6 +311,98 @@ <h2 id="backup">backup</h2>
311311
312312
313313
314+ < h2 id ="resource-tags "> resource-tags</ h2 >
315+ < p >
316+ In < code > <deployment></ code > , < strong > or</ strong > < code > <instance></ code > .
317+ Specifies custom tags to apply to cloud resources (virtual machines and attached disks) provisioned
318+ in the tenant cloud account. Only available for
319+ < a href ="../../operations/enclave/enclave "> Vespa Cloud Enclave</ a > deployments, where a
320+ < code > cloud-account</ code > is set. Commonly used for cost tracking and resource management.
321+ </ p >
322+ < p >
323+ Tags declared at the < code > <deployment></ code > level apply to all instances. Tags at the
324+ < code > <instance></ code > level are merged with deployment-level tags; on key conflict, the
325+ instance-level value wins.
326+ </ p >
327+ < pre > {% highlight xml %}
328+ < deployment version ="1.0 " cloud-account ="aws:123456789012 ">
329+ < resource-tags >
330+ < tag key ="cost-center " value ="engineering "/>
331+ < tag key ="env " value ="${environment} "/>
332+ </ resource-tags >
333+
334+ < instance id ="prod ">
335+ < resource-tags >
336+ < tag key ="cost-center " value ="search-team "/>
337+ </ resource-tags >
338+ < prod >
339+ < region > aws-us-east-1c</ region >
340+ </ prod >
341+ </ instance >
342+ </ deployment >
343+ {% endhighlight %}</ pre >
344+ < p >
345+ The < code > <resource-tags></ code > element contains one or more < code > <tag></ code > children.
346+ Each < code > <tag></ code > has two mandatory attributes:
347+ </ p >
348+ < table class ="table ">
349+ < thead >
350+ < tr >
351+ < th style ="width:150px "> Attribute</ th >
352+ < th style ="width:100px "> Mandatory</ th >
353+ < th > Values</ th >
354+ </ tr >
355+ </ thead >
356+ < tbody >
357+ < tr >
358+ < td > key</ td >
359+ < td > Yes</ td >
360+ < td >
361+ The tag key. Must start with a lowercase letter and contain only the characters
362+ < code > [a-z0-9_-]</ code > . At most 63 characters. The < code > vai_</ code > prefix is reserved
363+ for internal use.
364+ </ td >
365+ </ tr >
366+ < tr >
367+ < td > value</ td >
368+ < td > Yes</ td >
369+ < td >
370+ The tag value. Must be non-empty and contain only the characters < code > [a-z0-9_-]</ code > ,
371+ except that < a href ="#resource-tags-template-variables "> template variables</ a > are allowed.
372+ At most 63 characters after resolution.
373+ </ td >
374+ </ tr >
375+ </ tbody >
376+ </ table >
377+ < p >
378+ Up to 20 tags are allowed per instance (after merging deployment-level and instance-level tags).
379+ The key and value constraints apply to AWS tags, Azure tags, and GCP labels; the lowercase and
380+ length restrictions are the strictest of the three and apply uniformly.
381+ </ p >
382+
383+ < p id ="resource-tags-template-variables "> < strong > Template variables.</ strong >
384+ Tag values may reference the following template variables, which are resolved at deployment time:</ p >
385+ < ul >
386+ < li > < code > ${tenant}</ code > </ li >
387+ < li > < code > ${application}</ code > </ li >
388+ < li > < code > ${instance}</ code > </ li >
389+ < li > < code > ${environment}</ code > </ li >
390+ < li > < code > ${region}</ code > </ li >
391+ </ ul >
392+ < p >
393+ Resolved values are lowercased to match the label constraints above. Referencing an unknown
394+ variable causes the deployment to fail.
395+ </ p >
396+
397+ < p > < strong > Reconciliation.</ strong >
398+ Tags are applied to virtual machines and attached disks. When tags are changed, added, or removed
399+ in < em > deployment.xml</ em > , the existing resources are updated by a background reconciliation
400+ process. Tags that were previously applied by Vespa Cloud but are no longer listed are removed
401+ from the resources. Tags added manually by the tenant in the cloud console are preserved.
402+ </ p >
403+
404+
405+
314406< h2 id ="upgrade "> upgrade</ h2 >
315407< p >
316408In < code > <deployment></ code > , or < code > <instance></ code > .
0 commit comments