provisioning.tf 418 B

12345678910111213
  1. resource "null_resource" "remote-config" {
  2. count = var.data-node-count
  3. provisioner "remote-exec" {
  4. connection {
  5. user = "ubuntu"
  6. host = "${element(aws_instance.re.*.public_ip, count.index)}"
  7. private_key = "${file("~/.ssh/${var.vpc-name}.pem")}"
  8. agent = true
  9. }
  10. inline = ["hostname"]
  11. }
  12. depends_on = ["aws_instance.re", "aws_eip_association.re-eip-assoc"]
  13. }