Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag creation scope #1021

Closed
ciroiriarte opened this issue Jan 22, 2025 · 1 comment
Closed

Tag creation scope #1021

ciroiriarte opened this issue Jan 22, 2025 · 1 comment

Comments

@ciroiriarte
Copy link

Hello!, would it be possible to add support for tag creation within a blueprint?. Currently when I push a tag creation via apstra_tag (Resource) it ends up in the global catalog (Design --> Tags).

I would like to limit the creation of a tag to a blueprint (Blueprints --> myblueprint --> Staged --> Catalog --> Tags), the idea would be to self-contain the tags that are too specific to the blueprint of interest and only push to Global Catalog when it makes sense.

@chrismarget-j
Copy link
Collaborator

Tags exist in two places within Apstra:

  • the Global Catalog under the design menu on the left side
  • within a blueprint

When a blueprint is instantiated from a template, any tags used in the design phase will be copied into the blueprint, but if you don't want to create them in the catalog, it is safe to ignore "design catalog" tags altogether.

You can create a new tag in a blueprint, regardless of whether it exists in the global catalog, by mentioning it on any object which supports tags. For example:

resource "random_string" "example" {
  length = 5
}
resource "apstra_datacenter_connectivity_template_interface" "test" {
  blueprint_id = local.blueprint_id
  name         = "test"
  tags         = [random_string.example.result] # <- never-before-seen tag value
}

If you want to tag things in the design API (e.g. generic systems within a rack-type), then the current workflows require that the tags exist as standalone objects in the design catalog.

If I've misunderstood your question, please take another crack at it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants