aws_instance.atomic-server: Provisioning with 'file'...
aws_instance.atomic-server: Provisioning with 'file'...
aws_instance.atomic-server: Provisioning with 'remote-exec'...
aws_instance.atomic-server (remote-exec): Connecting to remote host via SSH...
aws_instance.atomic-server (remote-exec): Host: 52.33.230.184
aws_instance.atomic-server (remote-exec): User: fedora
aws_instance.atomic-server (remote-exec): Password: false
aws_instance.atomic-server (remote-exec): Private key: true
aws_instance.atomic-server (remote-exec): SSH Agent: false
aws_instance.atomic-server (remote-exec): Connected!
slow here.....then...
Error applying plan:
1 error(s) occurred:
* Failed to upload script: Error reading script: EOF
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Below is a prtial snippet of my .tf file
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "${var.region}"
}
resource "aws_instance" "atomic-server" {
ami = "${lookup(var.ami, concat(var.region, "-", var.platform))}"
instance_type = "${var.instance_type}"
key_name = "${var.aws_key_name}"
count = "${var.servers}"
security_groups = ["wideopen"]
# security_groups = ["${aws_security_group.atomic.name}"]
connection {
user = "${lookup(var.user, var.platform)}"
key_file = "${var.key_path}"
}
tags {
Name = "${var.tagName}-${count.index}"
}
provisioner "file" {
source = "fedora_bashrc"
destination = "/home/fedora/fedora_bashrc"
}
provisioner "file" {
source = "nomad"
destination = "/home/fedora/nomad"
}
provisioner "remote-exec" {
inline = [
"cat /home/fedora/fedora_bashrc >> /home/fedora/.bashrc",
# "chmod a+x /home/fedora/nomad",
# "sudo chmod a+w /tmp",
# "sudo groupadd docker",
# "sudo gpasswd -a fedora docker",
# "sudo service docker restart",
]
}
}
I tried with and without the trailing ","in the remote-exec inline command
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/a37e1a9d-d321-4477-9cef-c0eae7de2f69%40googlegroups.com.--
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.