provisioner --local-exec-- illegal char escape

456 views
Skip to first unread message

kamalakar vadla

unread,
Jun 26, 2017, 6:01:02 PM6/26/17
to Terraform
Following terraform code giving below error about illegal character :


Code:
provisioner "local-exec" {
   command  = "aws lambda invoke --invocation-type RequestResponse --function-name hello-world --region us-east-1 --log-type Tail --payload '[ {"PrivateDnsName": ${self.private_ip_address} }]' --profile _Dev_Developer "
}


Getting below error:

Failed to load root config module: Error loading modules: module consul-server: Error parsing .terraform/modules/b02d312aef748ec83828a9ae05080aef/server.tf: At 131:203: illegal char escape


Regards

KV

Lowe Schmidt

unread,
Jun 27, 2017, 2:44:49 AM6/27/17
to terrafo...@googlegroups.com
So, what are the characters between 131 and 203 ?

--
Lowe Schmidt | +46 723 867 157

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/5f87a446-8d6a-4e0f-b53b-2c0e27ff4457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kamalakar vadla

unread,
Jun 27, 2017, 12:50:20 PM6/27/17
to Terraform
It is complaining about Dollar 

--payload '[ {"PrivateDnsName": "${self.private_ip_address}" }]'  




On Tuesday, 27 June 2017 01:44:49 UTC-5, Lowe Schmidt wrote:
So, what are the characters between 131 and 203 ?

--
Lowe Schmidt | +46 723 867 157

On 27 June 2017 at 00:01, kamalakar vadla <vkcha...@gmail.com> wrote:
Following terraform code giving below error about illegal character :


Code:
provisioner "local-exec" {
   command  = "aws lambda invoke --invocation-type RequestResponse --function-name hello-world --region us-east-1 --log-type Tail --payload '[ {"PrivateDnsName": ${self.private_ip_address} }]' --profile _Dev_Developer "
}


Getting below error:

Failed to load root config module: Error loading modules: module consul-server: Error parsing .terraform/modules/b02d312aef748ec83828a9ae05080aef/server.tf: At 131:203: illegal char escape


Regards

KV

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.

Lowe Schmidt

unread,
Jun 27, 2017, 2:22:21 PM6/27/17
to terrafo...@googlegroups.com
I think I know whats going on, that would be the literal string ${self.private_ip_address} and not the value of the variable as it's ' and not " around it.



--
Lowe Schmidt | +46 723 867 157

To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/d077f5a2-77e8-4ec3-9a27-1838edbc8713%40googlegroups.com.

kamalakar vadla

unread,
Jun 27, 2017, 7:00:45 PM6/27/17
to Terraform
I was able to fix it .
Reply all
Reply to author
Forward
0 new messages