https://www.runatlantis.io/ logo
Title
c

Chastity Blackwell

05/17/2023, 7:33 PM
We just enabled the
import
command with Atlantis, and it looks like it's adding
\\
before every character in the imported terraform resource when it runs the command? Is that intentional? For example:
running "/home/atlantis/.atlantis/bin/terraform1.4.6 import \\m\\o\\d\\u\\l\\e\\.\\c\\o\\n\\f\\l\\u\\e\\n\\t\\_\\c\\l\\o\\u\\d\\_\\c\\l\\u\\s\\t\\e\\r\\_\\n\\o\\n\\p\\r\\o\\d\\_\\g\\c\\p\\_\\u\\s\\_\\c\\e\\n\\t\\r\\a\\l\\1\\.\\c\\o\\n\\f\\l\\u\\e\\n\\t\\_\\k\\a\\f\\k\\a\\_\\c\\l\\u\\s\\t\\e\\r\\.\\m\\a\\i\\n \\e\\n\\v\\-\\x\\m\\w\\8\\2\\1\\/\\l\\k\\c\\-\\6\\3\\5\\d\\q\\3"
1
r

ross strickland

05/17/2023, 7:51 PM
i think this is done to prevent remote execution of arbitrary commands i.e.
atlantis import $(some bad command)
👍 1
c

Chastity Blackwell

05/17/2023, 7:53 PM
I suspected it was something like that, I've just never seen that particular method of doing so 🙂
p

PePe Amengual

05/17/2023, 8:04 PM
it is all scaped
"${COMMENT_ARGS//\\/}"
that should work
please report back when you get a chance to test that
c

Chastity Blackwell

05/17/2023, 9:30 PM
The import works, it's just weird to see. I wanted to make sure it looked right 🙂
p

PePe Amengual

05/17/2023, 10:12 PM
np