Guest User

Untitled

a guest
Apr 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. resource "aws_instance" "DCOS-master3" {
  2. ami = "${var.aws_centos_ami}"
  3. availability_zone = "eu-west-1b"
  4. instance_type = "t2.medium"
  5. key_name = "${var.aws_key_name}"
  6. security_groups = ["${aws_security_group.bastion.id}"]
  7. associate_public_ip_address = true
  8. private_ip = "10.0.0.13"
  9. source_dest_check = false
  10. subnet_id = "${aws_subnet.eu-west-1b-public.id}"
  11.  
  12. tags {
  13. Name = "master3"
  14. }
  15. }
  16.  
  17. data "aws_ebs_volume" "ebs_volume" {
  18. most_recent = true
  19.  
  20. filter {
  21. name = "attachment.instance-id"
  22. values = ["${aws_instance.DCOS-master3.id}"]
  23. }
  24. }
  25.  
  26. output "ebs_volume_id" {
  27. value = "${data.aws_ebs_volume.ebs_volume.id}"
  28. }
  29.  
  30. output "ebs_volume_id" {
  31. value = "${aws_instance.DCOS-master3.root_block_device.0.volume_id}"
  32. }
  33.  
  34. "Resource 'aws_instance.DCOS-master3' does not have attribute 'root_block_device.0.volume_id'
  35.  
  36. "root_block_device.0.volume_id": "vol-xxxxxxxxxxxxxx",
Add Comment
Please, Sign In to add comment