-
Notifications
You must be signed in to change notification settings - Fork 168
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
Serialize YAML and JSON into string -> cannot unmarshal !!seq !!map into string #438
Comments
This is likely failing because we don't support complex nested yaml files for import. Currently, a flat file structure is expected like so ch_secret: secret
other_secret: other_secret |
is there any chance you, consider supporting nested config? I'd like to dump some JSON into SSM. |
I'd like to understand what problem you're trying to solve for? If you want raw JSON as a value, you could provide a JSON string as the value as a workaround |
That workaround is exactly what I'm trying to avoid.
So far I've been deploing stuff with pulumi but I am trying to move some
values from pulumi config to SSM and this inconvenience is the only thing
preventing me. Otherwise I'd have to write my own cli for setting the
parameters.
I understand it can get complicated because the nested value can be
serialized into string but what should happen during the export or exec.
…On Tue, Nov 21, 2023, 22:01 Alec Jacobs ***@***.***> wrote:
I'd like to understand what problem you're trying to solve for?
If you want raw JSON as a value, you could provide a JSON string as the
value as a workaround
—
Reply to this email directly, view it on GitHub
<#438 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZCK5Q2GA6ZCDDN5GEYRJTYFUJDFAVCNFSM6AAAAAA7OFGSOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRRGY3TGNJRG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Just trying to fully understand what you're looking for - you'd like |
Yes, that's what I expect. Here's a more detailed description of my explanation: input: ch_secret: secret
ch_list:
- https://abc.def.com
ch_dict:
a: abc
b: def
ch_dict_nested:
a:
b: abc
c: def
ch_dict_list:
c:
- 1
- 2
- 3
ch_mix:
a:
b: abc
c: def
c:
- 1
- 2
- 3
and then
|
Gotcha - I can see chamber handling attempting to JSON serialize any value from import, but I'm not sure about parsing arbitrary objects/values on export. It's an interesting use case, but outside of the core purpose of chamber. SSM does support parameter hierarchies, which seem analogous to what you’re asking for but there’s no plan to support them in chamber at this time. If you’d like to contribute a feature to JSON serialize the import values, we’re happy to review it but it’s not something we can commit to at this time |
I should be able to contribute to this feature myself. If this is something you'd be interested in I am happy to help. Re:
with hierarchy, it may be unclear how to render the ENV.
PS. The absence of the leading |
I agree with your assessment on the parameter hierarchies not fitting within the bounds of chamber as is. We'd be open to review contributions for the import serialization, but I'm not sure export deserialization is something thats a big focus, currently. |
Hi, what's the reason I could not import a simple config like this?
chamber import service file_above.yaml
results inThe text was updated successfully, but these errors were encountered: