-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput.tf
More file actions
23 lines (20 loc) · 855 Bytes
/
output.tf
File metadata and controls
23 lines (20 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Output the public IP of the VM
output "vm_public_ip" {
description = "The public IP address of the VM"
value = google_compute_instance.vm_instance.network_interface[0].access_config[0].nat_ip
}
# Output the private IP of the VM
output "vm_private_ip" {
description = "The private IP address of the VM"
value = google_compute_instance.vm_instance.network_interface[0].network_ip
}
# Output the database connection name for MySQL
output "db_connection_name" {
description = "The connection name for the MySQL database instance"
value = google_sql_database_instance.mysql_instance.connection_name
}
# Output the private IP of the MySQL database instance
output "db_private_ip" {
description = "The private IP address of the MySQL database"
value = google_sql_database_instance.mysql_instance.private_ip_address
}