mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
moved outputs to outputs.tf; added sshCommand
This commit is contained in:
parent
048ab5a774
commit
d0973b77c1
@ -110,11 +110,3 @@ resource "azurerm_virtual_machine" "vm" {
|
|||||||
storage_uri = "${azurerm_storage_account.stor.primary_blob_endpoint}"
|
storage_uri = "${azurerm_storage_account.stor.primary_blob_endpoint}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
output "hostname" {
|
|
||||||
value = "${var.hostname}"
|
|
||||||
}
|
|
||||||
|
|
||||||
output "vm_fqdn" {
|
|
||||||
value = "${azurerm_public_ip.pip.fqdn}"
|
|
||||||
}
|
|
||||||
|
11
examples/azure-vm-simple-linux/outputs.tf
Normal file
11
examples/azure-vm-simple-linux/outputs.tf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
output "hostname" {
|
||||||
|
value = "${var.hostname}"
|
||||||
|
}
|
||||||
|
|
||||||
|
output "vm_fqdn" {
|
||||||
|
value = "${azurerm_public_ip.pip.fqdn}"
|
||||||
|
}
|
||||||
|
|
||||||
|
output "sshCommand" {
|
||||||
|
value = "${concat('ssh ', var.admin_username, '@', azurerm_public_ip.pip.fqdn)}"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user