-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 names containing dots are always deleted #2143
Comments
There is another issue tracking this, but the unfortunate thing is that periods in tag names simply can't be supported with the current state format. It'd be a silly dance to do so. We'll add an error. We're working on fixing this but in the short term could you not use dots? :( sorry. |
-Shakes fist at universe- ;) Yeah, unfortunately we're using tag names from another application and making that change would be very hard indeed as it's managing servers in independent contexts. I'm wondering about an escaping mechanism in your names that could be used to specify unicode characters, which could be passed along to AWS [1] - crazy? [1] http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html |
One other thought here - if Terraform didn't insist on its tags being the entire tagset, this would not be an issue either. Terraform could concede that other applications may use tags and act only to ensure that its tagset is a correct subset. If someone wants to delete a tag explicitly, they can specify the name with an empty string. To maintain compatibility with the current regime, you might call this thing "ExtraTags" (or similar). |
👍 |
This limitation of the parser has wider implications too - if you need to pass keys containing periods to a provider, you have to make users do some dance where they replace periods with some other character - that must not be reserved, or overlap with any other valid characters - and then replace them before sending to the backend. I'd really like to have quoted keys in maps treated as literals (syntactically preferable IMO), or failing that, allow periods to be escaped via |
👍 |
I just wonder is there any progress for this problem? Dot is a convention for the names of our tags, so it's not easy to change :( |
👍 |
It outputs the host, port and user information for later plugin into terraform's connection map. It can't take advantage of Triton's CNS because of issue hashicorp/terraform#2143. It will not "converge" because the system fails to detect the firewall_enabled flag from Triton's CloudAPI, issue hashicorp/terraform#6109. # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Your branch is up-to-date with 'origin/master'. # # Changes to be committed: # deleted: bastion/bastion-user-script.sh # modified: bastion/main.tf # new file: bastion/ssh.config.in # new file: bastion/user-script.sh #
👍 this is important for the api gateway |
As linked above this is breaking |
@mitchellh any guidance on how we can support hashicorp in solving this issues? |
I think #6322 should fix this, though I've not tested anyspecific cases. I'll add some tests around this issue and #6471 to the dev-0.7 branch and see what we can do. At minimum, the actual limitation is possible to remove now the internal representation of maps has changed, so this should be possible to support now. |
@jen20 that sounds great. this is a missing piece in a great |
@nicolai86 I just verified that at least in the simple case it works. I'll test with actual resources shortly and close up this issue by adding some tests if all is well. |
Any news on this issue? A customer has several . in their tag names as a company wide convention and it is a worry for them. Any updates appreciated greatly. |
I just tested the 0.7-rc release, and this is not fixed. Is there a new syntax I should be using? Here is a simple test case:
If the parser can't be fixed, a workaround is to do what other AWS resources (e.g. autoscaling groups) do. They can be tagged arbitrarily, because instead of a map they use a list of objects |
As of #6322 this has been fixed - 0.7.0-rc1 does not exhibit this behaviour: Configuration:
Output:
|
@jen20, can you verify if the code still works if you write provider "aws" {
region = "us-west-2"
}
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
tags = {
Name = "Test"
Environment = "Production"
Test.With.Dot = "Test Value"
}
} I was not able to get it to work with the triton provider. I just want to make sure it is not an issue on how that provider code is parsing the tags. |
@sodre I believe you have to wrap fields with dots in double quotes, but I'm not certain. |
@mitchellh With quotes it still does not work. |
Hi @sodre - the code you posted works for me (with a build from master). I have not tried with the Triton provider - it's possible there is something in there preventing it working. If you have a repro could you open a new issue about this? Thanks! |
@jen20 Hi, sodre's code doesn't work for me (Terraform 0.7.0-rc2):
And it still doesn't work with quotes |
Can we please reopen? This is still not fixed, even building from source:
plan gives:
|
@stack72, Also, note that there is an open PR #7130 that shows the issue is not fixed at least the triton provider. We could enrich the PR to include the VPC test by @tony612 and EBS test by @justinsb. |
It works now 👍 |
* provider/aws: Re-implement api gateway parameter handling this PR cleans up some left overs from PR #4295, namely the parameter handling. now that GH-2143 is finally closed this PR does away with the ugly `request_parameters_in_json` and `response_parameters_in_json` hack. * Add deprecation message and conflictsWith settings following @radeksimko s advice, keeping the old code around with a deprecation warning. this should be cleaned up in a few releases * provider/aws: fix missing append operation * provider/aws: mark old parameters clearly as deprecated * provider/aws work around #8104 following @radeksimko s lead * provider/aws fix cnp error
- Tests for issue hashicorp/terraform#2143. - Fixed package names since Triton deprecated the g3-series. - Must supply SDC_URL when invoking tests. Test will fail on metadata_3 but not on _2 as discussed with @jen20 on 11 June 2016.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This tags definition:
Will cause an existing tag named "foo.bar" to be deleted. terraform apply always shows this:
The text was updated successfully, but these errors were encountered: