You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the above is passed to the userdata script. printf strips the escapes, and export strips the quotes "" resulting in a malformed json object and docker service failing to start.
I've tried all the bash alchemy I know, If there is a way to accomplosh this where i could populate the json object properly in the environment, it would be very nice.
Removing the printf and replacing it with a catheredoc file insertion could fix this I believe keeping the escaping intact and the export would then inject a properly formated json object in the environment.
⚠️ Note
Behavior was tested on bash shell. (behaves differently on zsh)
Tried without jsonencode. tried adding quotes to the json object inside the local as well.
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.
Description
Passing
docker_config_json
results in the EKS node not being able to join the cluster. Caused becauseprintf
strips the slashes\
in the encoded json.replace
strips the empty spaces.outputs:
"{\"bridge\":\"none\",\"log-driver\":\"json-file\",\"log-opts\":{\"max-size\":\"10m\",\"max-file\":\"10\"},\"live-restore\":true,\"max-concurrent-downloads\":10}"
When the above is passed to the
userdata
script.printf
strips the escapes, and export strips the quotes""
resulting in a malformed json object and docker service failing to start.I've tried all the bash alchemy I know, If there is a way to accomplosh this where i could populate the json object properly in the environment, it would be very nice.
Removing the
printf
and replacing it with acat
heredoc
file insertion could fix this I believe keeping the escaping intact and the export would then inject a properly formated json object in the environment.Versions
Terraform: 0.13.6
Provider(s): AWS: 3.63.0
Module: 17.23.0
Reproduction
Add the following to the node group definition as well as the local defined in the description
EKS node won't be able to join the cluster. SSH in to the node and look insde
/etc/docker/daemon.json
we can see the malformed json.The text was updated successfully, but these errors were encountered: