From 0e6efbef50a3319e0333a73f1dc75ef22dccc200 Mon Sep 17 00:00:00 2001 From: Lucas Gabriel Vuotto Date: Tue, 16 Nov 2021 09:51:11 +0000 Subject: [PATCH] feat: Add instance IPv6 addresses to the outputs --- README.md | 1 + outputs.tf | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index cb181957..a08ddedb 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,7 @@ No modules. | [capacity\_reservation\_specification](#output\_capacity\_reservation\_specification) | Capacity reservation specification of the instance | | [id](#output\_id) | The ID of the instance | | [instance\_state](#output\_instance\_state) | The state of the instance. One of: `pending`, `running`, `shutting-down`, `terminated`, `stopping`, `stopped` | +| [ipv6\_addresses](#output\_ipv6\_addresses) | The IPv6 address assigned to the instance, if applicable. | | [outpost\_arn](#output\_outpost\_arn) | The ARN of the Outpost the instance is assigned to | | [password\_data](#output\_password\_data) | Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password for instances running Microsoft Windows. This attribute is only exported if `get_password_data` is true | | [primary\_network\_interface\_id](#output\_primary\_network\_interface\_id) | The ID of the instance's primary network interface | diff --git a/outputs.tf b/outputs.tf index 1c9c06d6..0df1de42 100644 --- a/outputs.tf +++ b/outputs.tf @@ -53,6 +53,11 @@ output "private_ip" { value = try(aws_instance.this[0].private_ip, aws_spot_instance_request.this[0].private_ip, "") } +output "ipv6_addresses" { + description = "The IPv6 address assigned to the instance, if applicable." + value = try(aws_instance.this[0].ipv6_addresses, []) +} + output "tags_all" { description = "A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block" value = try(aws_instance.this[0].tags_all, aws_spot_instance_request.this[0].tags_all, {})