Skip to content

Commit 19a8de0

Browse files
author
Mustafa Mujahid
committed
feat: Add instance private IP to the outputs
1 parent f939e1f commit 19a8de0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ output "public_ip" {
4848
value = element(concat(aws_instance.this.*.public_ip, aws_spot_instance_request.this.*.public_ip, [""]), 0)
4949
}
5050

51+
output "private_ip" {
52+
description = "The private IP address assigned to the instance, if applicable."
53+
value = element(concat(aws_instance.this.*.private_ip, aws_spot_instance_request.this.*.private_ip, [""]), 0)
54+
}
55+
5156
output "tags_all" {
5257
description = "A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block"
5358
value = element(concat(aws_instance.this.*.tags_all, aws_spot_instance_request.this.*.tags_all, [""]), 0)

0 commit comments

Comments
 (0)