https://pulumi.com logo
#general
Title
# general
b

better-lunch-24345

01/03/2024, 1:55 AM
Hey guys I've trying to add some default tags to my Pulumi stacks but not having success so far. I was trying to add this codeblock to my Pulumi.<stack>.yaml file but it seems that only pulumi related tags change with these settings. github and vcs tags don't change to the values I'm setting.
Copy code
config:
  pulumi:tags:
    gitHub:owner: devops
    gitHub:repo: devops/infrastructure
    pulumi:project: devops
    pulumi:runtime: nodeblabla
    vcs:kind: test
    repository: devops/test
Couldn't find any other way to do this, can someone help on that?
l

little-cartoon-10569

01/04/2024, 12:05 AM
Those are stack tags. I don't think they're part of the config block. You can set them via
pulumi stack tag set
. I seem to recall that there is a way to set them via the config files, but I can't find it now.
Ok found the docs. What you're doing looks ok, maybe it's a YAML issue? You could try:
Copy code
config:
  pulumi:tags:
    github:
      owner: devops
Or maybe even
Copy code
config:
  pulumi:tags:
    "github:owner": devops
b

better-lunch-24345

01/04/2024, 11:52 AM
It works if do this, but does not replace the built in tag, it add another one with the same description and a different value.
Copy code
config:
  pulumi:tags:
    "github:owner": devops
e

echoing-dinner-19531

01/05/2024, 8:54 AM
Looks like the built-in git tags take precedence. If you raise an issue about this I think we could switch that around.