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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
Building a Mac AWS EC2 AMI and utilising provisioner inline shell to create an instance start up script that when run on init of the instance will automate start up of a few things and access the instance Meta Data service to get an instance tag value to configure something, e.g;
I've tried both bash and zsh as I know shells cause issue on escapes in ubuntu.
Reproduction Steps
Attempt to escape '$' character in inline provisioner shell create an Amazon Mac instance type (mac1.metal or mac2.metal) as per overview. The escaping of the '$' ends up becoming a numeric value.
Packer version
1.9.4
Operating system and Environment details
AWS Mac EC2 instances
The text was updated successfully, but these errors were encountered:
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.
Community Note
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
Building a Mac AWS EC2 AMI and utilising provisioner inline shell to create an instance start up script that when run on init of the instance will automate start up of a few things and access the instance Meta Data service to get an instance tag value to configure something, e.g;
provisioner "shell" { inline = [ "sudo cat > /usr/local/aws/suncorp/startup.sh <<EOF", "#!/bin/bash", "instanceid=$$(curl -s http://169.254.169.254/latest/meta-data/instance-id)" "EOF" ]}
The translation/escape of the $$ ends up being translated as a number instead of $, e.g;
instanceid=604(curl -s http://169.254.169.254/latest/meta-data/instance-id)
I've tried both bash and zsh as I know shells cause issue on escapes in ubuntu.
Reproduction Steps
Attempt to escape '$' character in inline provisioner shell create an Amazon Mac instance type (mac1.metal or mac2.metal) as per overview. The escaping of the '$' ends up becoming a numeric value.
Packer version
1.9.4
Operating system and Environment details
AWS Mac EC2 instances
The text was updated successfully, but these errors were encountered: