-
Notifications
You must be signed in to change notification settings - Fork 5
/
outputs.tf
31 lines (25 loc) · 879 Bytes
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
output "my_identifier" {
value = random_pet.this.id
description = "All my resources will be created using this prefix, so that I don't conflict with other's resources"
}
output "project_id" {
value = data.google_project.this.name
}
output "region" {
value = var.region
}
output "vm" {
value = {
vm_name = google_compute_instance.default.name
vm_zone = google_compute_instance.default.zone
vm_project = google_compute_instance.default.project
vm_ip = google_compute_instance.default.network_interface.0.network_ip
gcloud_cmd = "gcloud compute ssh ${google_compute_instance.default.name} --project=${google_compute_instance.default.project} --zone ${google_compute_instance.default.zone}"
}
}
output "vm_name" {
value = google_compute_instance.default.name
}
output "vm_zone" {
value = google_compute_instance.default.zone
}