-
Notifications
You must be signed in to change notification settings - Fork 9
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
Invalid PhysicalResourceId when using RawOutput.STRING #1121
Comments
ok, was able to reproduce :-) thank you for your clear definition of the steps to reproduce! sops decrypt --input-type binary --output-type binary test.yaml returns the same "error". (Thats the same what this construct does in the lambda part) I checked the secret created according to your instructions in more detail. It turns out that it is not purely binary, but a hybrid combination of YAML and binary. The input format appears to be binary, as indicated by the presence of a data key, while the output format is derived from the file extension and is actually YAML. If you create "real" binary secrets, they are stored as json So somehow sops cli seems to "handle" this ... but I don't know how. So what we know: sops decrypt test.yaml
data: |
abc the same as sops decrypt --input-type yaml test.yaml
data: |
abc but sops decrypt --input-type binary test.yaml
Error unmarshalling input json: invalid character 'd' looking for beginning of value So a workaround for you might be using output binaryIt might be sufficient to use additionally sops edit --input-type binary --output-type binary test1.yaml # even if named .yaml it's actually json with this it's getting wired: sops decrypt --input-type yaml test1.yaml
sops decrypt --input-type json test1.yaml
sops decrypt --input-type json test1.yaml
# both return
data: |
abc
# adding --output-type binary strips the data: |
abc
# dotenv
data=abc\n
# json
{
"data": "abc\n"
} What I learned, sops already can convert formats - I was not aware of this. Don't know how to handle this in this construct. Will it be documentation of the "limits" and "what to take care of" or can we handle it in code. Tend towards documentation. |
Thanks for looking into this! I was assuming that JSON and Yaml were equally well supported, but that does not seem to be the case.
I am able to successfully upload plaintext secrets. (I'll leave the issue open, in case you want to change some documentation. Please close it, when done.) |
I'm still having issues with the new plaintext secrets.
I create a SOPS file using
and enter the string
abc
(without any JSON/YAML structure). Now acorrectly returns
abc
.However, trying to deploy the secret fails with the error message
Here is my CDK code:
I use version 2.0.3.
The text was updated successfully, but these errors were encountered: