Terraform fails remote-exec (aws/ec2)
问题 When trying to execute a shell script throw provisioner "remote-exec" in terraform connection not establish I'm using ami for ubuntu-xenial-16.04 so the user is ubuntu This is the last code that I use to execute the shell script: resource "aws_instance" "secondary_zone" { count = 1 instance_type = "${var.ec2_instance_type}" ami = "${data.aws_ami.latest-ubuntu.id}" key_name = "${aws_key_pair.deployer.key_name}" subnet_id = "${aws_subnet.secondary.id}" vpc_security_group_ids = ["${aws_security