-
Notifications
You must be signed in to change notification settings - Fork 92
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
[BUG] Labeled globals does not support quoted strings #1849
Comments
Hi @donovanrost Unfortunately, not all objects can be extended by labeled globals because of a design issue. The problem is that HCL attribute names must be an identifier. What you are trying to do is not a valid HCL syntax. If you do:
then the attribute is If you do:
then it works because We are aware of this limitation and we iterated ideas on some alternative syntaxes but it's being hard to find a good solution. One possible solution:
This |
Thank you so much for the detailed explanation. globals "default_tags" {
set {
name = "other.company.com/manager"
value = "terraform"
}
} Would actually work great. From my point of view, it's better to have two ways of doing something if it allows you to avoid complicated dict merging by hand
Is this |
Yes I was only asking for your feedback. Great that you liked it. I will raise this topic with the other engineers, so maybe we can prioritise this or a similar solution soon. |
In the interim, do you have any suggestions on how to best approach this? |
AFAICS there's no good alternative. If changing the naming scheme of the keys are not possible, then what you can do is make the Hopefully we will soon have the solution implemented. |
Describe the bug
For resource tagging, we use a format like
subdomain.company.com/key = value
.At the top level stack we define:
This works.
In a child stack, we would like add additional
default_tags
where the tags can follow the same format.If I add
and run
terramate debug show globals
I will see the expected merged
default_tags
If I wrap
test
in quotes like"test"
, I'm given the following errorIn this simple example, it of course is not necessary to wrap
test
in quotes. However, if the tag key is more complex likemeta.company.com/example
then I getSo quotes are necessary
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: