Created
March 18, 2018 19:05
-
-
Save miry/eb5224a8c55958735a403780495ce53e to your computer and use it in GitHub Desktop.
REsize Amazon EBS volumes without a reboot: Step 3 Execute a script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// volumes.tf | |
// ... | |
resource "null_resource" "expand_disk" { | |
connection { | |
type = "ssh" | |
user = "ubuntu" | |
private_key = "${file("~/.ssh/id_rsa")}" | |
host = "${data.aws_instance.mysql.public_ip}" | |
} | |
provisioner "remote-exec" { | |
inline = [ | |
"sudo lsblk", | |
"sudo xfs_growfs ${local.mount_point}", | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment