Skip to content

Commit cf655e3

Browse files
authored
Add a "name" output (#50)
1 parent 6498d59 commit cf655e3

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ Available targets:
207207
| alarm | CloudWatch Alarm ID |
208208
| ebs_ids | IDs of EBSs |
209209
| id | Disambiguated ID of the instance |
210+
| name | Instance name |
210211
| primary_network_interface_id | ID of the instance's primary network interface |
211212
| private_dns | Private DNS of instance |
212213
| private_ip | Private IP of instance |

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
| alarm | CloudWatch Alarm ID |
6060
| ebs_ids | IDs of EBSs |
6161
| id | Disambiguated ID of the instance |
62+
| name | Instance name |
6263
| primary_network_interface_id | ID of the instance's primary network interface |
6364
| private_dns | Private DNS of instance |
6465
| private_ip | Private IP of instance |

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ output "id" {
2626
value = join("", aws_instance.default.*.id)
2727
}
2828

29+
output "name" {
30+
description = "Instance name"
31+
value = module.label.id
32+
}
33+
2934
output "ssh_key_pair" {
3035
description = "Name of the SSH key pair provisioned on the instance"
3136
value = var.ssh_key_pair

0 commit comments

Comments
 (0)