Skip to content

Instantly share code, notes, and snippets.

@miry
Created March 18, 2018 19:05
Show Gist options
  • Save miry/eb5224a8c55958735a403780495ce53e to your computer and use it in GitHub Desktop.
Save miry/eb5224a8c55958735a403780495ce53e to your computer and use it in GitHub Desktop.
REsize Amazon EBS volumes without a reboot: Step 3 Execute a script
// 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