Skip to content

Commit

Permalink
fixed instance_name and instance_ip outputs and added ssh_host_public…
Browse files Browse the repository at this point in the history
…_key output (#23)
  • Loading branch information
cloudlovely committed Sep 21, 2023
1 parent b5eec1c commit 4e7dba9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
12 changes: 6 additions & 6 deletions _example/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ output "arn" {
value = module.lightsail.arn
}

output "id" {
value = module.lightsail.id
}

output "created_at" {
value = module.lightsail.created_at
}

output "ip_address" {
value = module.lightsail.ip_address
output "instance_ip" {
value = module.lightsail.instance_ip
}

output "instance_name" {
value = module.lightsail.instance_name
}
26 changes: 17 additions & 9 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,30 @@ output "arn" {
description = " The ARN of the Lightsail instance."
}

output "id" {
value = aws_lightsail_instance.instance[*].id
description = "The ARN of the Lightsail instance."
}

output "created_at" {
value = aws_lightsail_instance.instance[*].created_at
description = "The timestamp when the instance was created."
}

output "ip_address" {
value = aws_lightsail_static_ip.instance[*].ip_address
description = "The Ip Address name of the Lightsail instance."
}

output "tags" {
value = module.labels.tags
description = "A mapping of tags to assign to the resource."
}

output "instance_ip" {
value = aws_lightsail_instance.instance[*].public_ip_address
description = "The Public IP Address name of the Lightsail instance."

}

output "instance_name" {
value = aws_lightsail_instance.instance[*].name
description = "The name of the Lightsail instance."

}

output "ssh_host_public_key" {
value = aws_lightsail_key_pair.instance[*].public_key
sensitive = true
}

0 comments on commit 4e7dba9

Please sign in to comment.