Skip to content
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

here doc not working 0.8.5 #11692

Closed
ameissnersofi opened this issue Feb 4, 2017 · 4 comments
Closed

here doc not working 0.8.5 #11692

ameissnersofi opened this issue Feb 4, 2017 · 4 comments

Comments

@ameissnersofi
Copy link

ameissnersofi commented Feb 4, 2017

Terraform Version

0.8.5

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_instance

Terraform Configuration Files

 provisioner "remote-exec" {
    inline = [
      "cat <<CONFIG > /tmp/cloud-config",
      "${element(data.template_file.es-app-cloud-config.*.rendered, count.index)}",
      "CONFIG",
    ]
    connection = {
      user = "core"
    }
  }

Debug Output

aws_instance.es-app.3 (remote-exec): /tmp/terraform_1193827748.sh: line 2: warning: here-document at line 2 delimited by end-of-file (wanted `CONFIG')
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 4: hostname:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 5: coreos:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 6: update:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 7: reboot-strategy:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 8: fleet:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 9: public-ip:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 10: etcd_servers:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 11: metadata:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 12: etcd2:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 13: proxy:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 14: listen-client-urls:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 15: initial-cluster:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 16: units:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 17: -: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 18: command:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 19: content:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 20: [Unit]: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 21: the: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 24: [Service]: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 27: -f: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 28: -F: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 29: -: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 30: command:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 31: content:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 32: [Unit]: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 33: ephemeral: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 37: [Mount]: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 41: -: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 42: command:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 43: content:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 44: [Unit]: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 45: EBS: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 49: [Mount]: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 54: -: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 55: command:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 56: content:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 57: [Unit]: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 58: the: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 61: [Service]: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 64: -f: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 65: -F: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 66: -: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 67: command:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 68: content:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 69: [Mount]: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 73: -: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 74: command:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 75: -: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 76: command:: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 77: -: command not found
aws_instance.es-app.3 (remote-exec): /tmp/terraform_1275824938.sh: line 78: command:: command not found

This just look like its attempting to run the contents of the cloud-config file as commands...

Expected Behavior

In 0.8.4, this isn't an issue. There heredoc works as expected...

Actual Behavior

It crashes.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Again, this works in 0.8.4, so I'm curious why a macro version update breaks this? Thanks!

@mitchellh
Copy link
Contributor

Ah, this is caused by #11155. Both behaviors seem same to me, but I'm willing to revert #11155 for now to prevent this behavior.

@mitchellh
Copy link
Contributor

Reverted that for now, will be fixed in 0.8.6. Sorry!

@ameissnersofi
Copy link
Author

Thanks!

@ghost
Copy link

ghost commented Apr 17, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants