diff --git a/README.md b/README.md index 4902336..e07530c 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,17 @@ No modules. | Name | Description | |------|-------------| +| [id](#output\_id) | ID of instance. | +| [image](#output\_image) | Self-link of the image. | +| [instance\_id](#output\_instance\_id) | Server-assigned unique identifier of this instance. | | [instances\_details](#output\_instances\_details) | List of all details for compute instances | -| [instances\_self\_links](#output\_instances\_self\_links) | List of self-links for compute instances | +| [labels](#output\_labels) | Labels that will be associated with the instance. | +| [name](#output\_name) | Name of instance. | +| [private\_ip](#output\_private\_ip) | Private IP address assigned to the instance. | +| [public\_ip](#output\_public\_ip) | Public IP address assigned to the instance. | +| [self\_link](#output\_self\_link) | Self-link of the instance. | +| [service\_account](#output\_service\_account) | Service account attached to the instance. | +| [status](#output\_status) | Current status of the instance. | +| [tags](#output\_tags) | Tags that will be associated with the instance. | +| [zone](#output\_zone) | Zone that the instance is located in. | \ No newline at end of file diff --git a/outputs.tf b/outputs.tf index 1147503..e28c9fd 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,9 +1,65 @@ -output "instances_self_links" { - description = "List of self-links for compute instances" - value = google_compute_instance.compute_instance.*.self_link -} - output "instances_details" { description = "List of all details for compute instances" value = google_compute_instance.compute_instance.* -} \ No newline at end of file + sensitive = true +} + +output "name" { + description = "Name of instance." + value = google_compute_instance.compute_instance.*.name +} + +output "id" { + description = "ID of instance." + value = google_compute_instance.compute_instance.*.id +} + +output "instance_id" { + description = "Server-assigned unique identifier of this instance." + value = google_compute_instance.compute_instance.*.instance_id +} + +output "self_link" { + description = "Self-link of the instance." + value = google_compute_instance.compute_instance.*.self_link +} + +output "status" { + description = "Current status of the instance." + value = google_compute_instance.compute_instance.*.current_status +} + +output "zone" { + description = "Zone that the instance is located in." + value = google_compute_instance.compute_instance.*.zone +} + +output "labels" { + description = "Labels that will be associated with the instance." + value = google_compute_instance.compute_instance.*.labels +} + +output "tags" { + description = "Tags that will be associated with the instance." + value = google_compute_instance.compute_instance.*.tags +} + +output "private_ip" { + description = "Private IP address assigned to the instance." + value = google_compute_instance.compute_instance.*.network_interface.0.network_ip +} + +output "public_ip" { + description = "Public IP address assigned to the instance." + value = try(google_compute_instance.compute_instance.*.network_interface.0.access_config.0.nat_ip, null) +} + +output "image" { + description = "Self-link of the image." + value = google_compute_instance.compute_instance.*.boot_disk.0.initialize_params.0.image +} + +output "service_account" { + description = "Service account attached to the instance." + value = google_compute_instance.compute_instance.*.service_account.0.email +}