forked from terraform-aws-modules/terraform-aws-ec2-instance
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main.tf: Make number of instances created configurable, defaulting to…
… 1 (terraform-aws-modules#64)
- Loading branch information
1 parent
39ed89c
commit e088fb8
Showing
3 changed files
with
16 additions
and
14 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
output "instance_id" { | ||
description = "EC2 instance ID" | ||
value = "${module.ec2.id[0]}" | ||
} | ||
|
||
output "instance_public_dns" { | ||
description = "Public DNS name assigned to the EC2 instance" | ||
value = "${module.ec2.public_dns[0]}" | ||
output "instances_public_ips" { | ||
description = "Public IPs assigned to the EC2 instance" | ||
value = "${module.ec2.public_ip}" | ||
} | ||
|
||
output "ebs_volume_attachment_id" { | ||
description = "The volume ID" | ||
value = "${aws_volume_attachment.this_ec2.volume_id}" | ||
value = "${aws_volume_attachment.this_ec2.*.volume_id}" | ||
} | ||
|
||
output "ebs_volume_attachment_instance_id" { | ||
description = "The instance ID" | ||
value = "${aws_volume_attachment.this_ec2.instance_id}" | ||
value = "${aws_volume_attachment.this_ec2.*.instance_id}" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
variable "instances_number" { | ||
default = 1 | ||
} |