-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Coalfire-CF/add-outputs
Add VM outputs
- Loading branch information
Showing
2 changed files
with
74 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.* | ||
} | ||
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 | ||
} |