test(e2e): Wait until target ec2 instance is ready to be used (#3910)

pull/3914/head
Michael Li 3 years ago committed by GitHub
parent d865ff16a4
commit 752f20fa27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -79,6 +79,20 @@ resource "aws_instance" "target" {
})
}
resource "enos_remote_exec" "wait" {
for_each = {
for idx, instance in aws_instance.target : idx => instance
}
inline = ["cloud-init status --wait"]
transport = {
ssh = {
host = aws_instance.target[each.key].public_ip
}
}
}
output "target_ips" {
value = aws_instance.target.*.private_ip
}

Loading…
Cancel
Save