diff --git a/modules/ionos-ha-vms/main.tf b/modules/ionos-ha-vms/main.tf index bcc604c..24fc343 100644 --- a/modules/ionos-ha-vms/main.tf +++ b/modules/ionos-ha-vms/main.tf @@ -41,7 +41,7 @@ module "ha_main_vm" { initial_user = var.initial_user initial_uid = var.initial_uid - initial_public_key = file(var.initial_public_key) + initial_public_key = var.initial_public_key } resource "ionoscloud_nic" "private_nic_main_vm" { @@ -86,7 +86,7 @@ module "ha_backup_vms" { initial_user = var.initial_user initial_uid = var.initial_uid - initial_public_key = file(var.initial_public_key) + initial_public_key = var.initial_public_key } resource "ionoscloud_nic" "private_nic_backup_vms" { diff --git a/modules/ionos-ha-vms/outputs.tf b/modules/ionos-ha-vms/outputs.tf new file mode 100644 index 0000000..bbec570 --- /dev/null +++ b/modules/ionos-ha-vms/outputs.tf @@ -0,0 +1,15 @@ +output "ha_internal_lan_id" { + value = ionoscloud_lan.lan_internal.id +} + +output "ha_dns_name" { + value = opentelekomcloud_dns_recordset_v2.a_records.name +} + +output "ha_common_address" { + value = ionoscloud_ipblock.floating_ip.ips[0] +} + +output "ha_vms_server_id" { + value = concat([module.ha_main_vm.basic_vm_server_id],module.ha_backup_vms[*].basic_vm_server_id) +}