Created
March 18, 2018 18:54
-
-
Save miry/e2a9d5c3410270b3001b94ba94cc7039 to your computer and use it in GitHub Desktop.
REsize Amazon EBS volumes without a reboot: Step 2 Detect instance IP base on attached volume
This file contains hidden or 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 | |
// ... | |
data "aws_instance" "mysql" { | |
filter { | |
name = "block-device-mapping.volume-id" | |
values = ["${aws_ebs_volume.mysql.id}"] | |
} | |
} | |
output "instance_id" { | |
value = "${data.aws_instance.mysql.id}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment