Skip to content

Commit 08bdf6a

Browse files
authored
feat: Add instance IPv6 addresses to the outputs (#249)
1 parent 85cabe3 commit 08bdf6a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ No modules.
242242
| <a name="output_capacity_reservation_specification"></a> [capacity\_reservation\_specification](#output\_capacity\_reservation\_specification) | Capacity reservation specification of the instance |
243243
| <a name="output_id"></a> [id](#output\_id) | The ID of the instance |
244244
| <a name="output_instance_state"></a> [instance\_state](#output\_instance\_state) | The state of the instance. One of: `pending`, `running`, `shutting-down`, `terminated`, `stopping`, `stopped` |
245+
| <a name="output_ipv6_addresses"></a> [ipv6\_addresses](#output\_ipv6\_addresses) | The IPv6 address assigned to the instance, if applicable. |
245246
| <a name="output_outpost_arn"></a> [outpost\_arn](#output\_outpost\_arn) | The ARN of the Outpost the instance is assigned to |
246247
| <a name="output_password_data"></a> [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 |
247248
| <a name="output_primary_network_interface_id"></a> [primary\_network\_interface\_id](#output\_primary\_network\_interface\_id) | The ID of the instance's primary network interface |

outputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ output "private_ip" {
5353
value = try(aws_instance.this[0].private_ip, aws_spot_instance_request.this[0].private_ip, "")
5454
}
5555

56+
output "ipv6_addresses" {
57+
description = "The IPv6 address assigned to the instance, if applicable."
58+
value = try(aws_instance.this[0].ipv6_addresses, [])
59+
}
60+
5661
output "tags_all" {
5762
description = "A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block"
5863
value = try(aws_instance.this[0].tags_all, aws_spot_instance_request.this[0].tags_all, {})

0 commit comments

Comments
 (0)