Import should lowercase all keys
When importing a JSON file with uppercase keys, they are imported as is. If I write a key via chamber write, the key is lowercased. This leads to duplicated keys. Plus, it breaks the read / delete command, since it apparently assumes lowercased keys.
Which leads to the question, how does one clean up uppercase keys?
Which leads to the question, how does one clean up uppercase keys?
I think we just exported the keys, changed them manually and imported them again :)
Which leads to the question, how does one clean up uppercase keys?
I think we just exported the keys, changed them manually and imported them again :)
Which gives me duplicates, I'm trying to remove the old UPPERCASE entirely to resolve ENV confusion.
Is the best practice here to go into SSM manually and clean it up? (And any old services etc etc?)
What's the motivation behind lowercasing all of the keys? Environment variables are commonly represented as all uppercase and it makes it easier to read the actual config key names when visually parsing through Parameter Store on AWS Console.
Agree with @aharasta-earnup , we use aws-env to export environment variables, write convert all key to lower cases, not expected behavior.
Considering this would be breaking behaviour, targeting for chamber 3.
@nickatsegment are you saying that #162 is breaking solely because of the below?
Modify import to fail an import payload when mixed case keys are provided except when the --case-sensitive switch is passed
Having been hit by this bug it feels like the breaking behaviour is already present and the changes in #162 are a minimally invasive fix? If you disagree and want to push to v3 would you consider accepting #162 into v2 if the imports change warned instead of failing?
Hm, I think my strategy is to accept #162 (pending the docs and tests I was looking for), and target a "real" fix at the model level for v3. Obviously case sensitivity is a thing we have to deal with (if not outright support in the TF_VAR case) and I'd like to deal with it in the core design.
This issue has been automatically marked stale because it has not had any activity in the last 60 days. If no further activity occurs within 7 days, it will be closed. Closed does not mean "never", just that it has no momentum to get accomplished any time soon.
See CONTRIBUTING.md for more info.
Closing due to staleness. Closed does not mean "never", just that it has no momentum to get accomplished any time soon. See CONTRIBUTING.md for more info.
For anyone else hitting this, you can remove the uppercased keys with the awscli:
aws ssm delete-parameters --name "{service}/{KEY}"
Looks like there hasn't been much movement on this in a while. Is any help needed to push it along? It is still greatly affecting usability of the tool for me.
As of https://github.com/segmentio/chamber/releases/tag/v2.12.0, this can now be resolved with
chamber import --normalize-keys
Some more details in the README
This should provide the expected functionality in a non-breaking manner. In a future version, it is likely that this becomes the default behavior
Closing; still attached to the v3.0 milestone and may be revisited in the future.