From 904298256613c857bf1e7654869892951742f3d7 Mon Sep 17 00:00:00 2001 From: Salima Hassouni Date: Sun, 9 Jun 2024 17:38:28 +0000 Subject: [PATCH] DBP-817-adjust naming convention & return basic-vm dns and basic-vm ip --- modules/ionos-basic-vm-mariadb/locals.tf | 2 +- modules/ionos-basic-vm-mariadb/output.tf | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/ionos-basic-vm-mariadb/locals.tf b/modules/ionos-basic-vm-mariadb/locals.tf index 8f8fd22..567b224 100644 --- a/modules/ionos-basic-vm-mariadb/locals.tf +++ b/modules/ionos-basic-vm-mariadb/locals.tf @@ -1,5 +1,5 @@ locals { - prefix = format("%s/%s", ionoscloud_nic.basic_vm_nic.ips[0], "24") + prefix = format("%s/%s", ionoscloud_nic.privacyidea_vm_nic.ips[0], "24") database_ip = cidrhost(local.prefix, 1) database_ip_cidr = format("%s/%s", local.database_ip, "24") } \ No newline at end of file diff --git a/modules/ionos-basic-vm-mariadb/output.tf b/modules/ionos-basic-vm-mariadb/output.tf index 05000be..d25873f 100644 --- a/modules/ionos-basic-vm-mariadb/output.tf +++ b/modules/ionos-basic-vm-mariadb/output.tf @@ -1,6 +1,6 @@ output "basic_vm_lan_ip" { description = "The IP address assigned to the basic VM NIC" - value = ionoscloud_nic.basic_vm_nic.ips[0] + value = ionoscloud_nic.privacyidea_vm_nic.ips[0] } output "database_ip_cidr" { @@ -11,4 +11,14 @@ output "database_ip_cidr" { output "database_ip" { description = "IP address of the MariaDB cluster" value = local.database_ip +} + +output "basic_vm_server_dns" { + description = "DNS record associated with the basic VM server" + value = module.basic-vm.basic_vm_server_dns +} + +output "basic_vm_server_public_ip" { + description= "the public IP address assigned to the basic VM server" + value = module.basic-vm.basic_vm_server_public_ip } \ No newline at end of file