diff --git a/modules/ionos-basic-vm-mariadb/main.tf b/modules/ionos-basic-vm-mariadb/main.tf index 9143c03..abc5ce0 100644 --- a/modules/ionos-basic-vm-mariadb/main.tf +++ b/modules/ionos-basic-vm-mariadb/main.tf @@ -29,9 +29,9 @@ module "basic-vm" { # Ensure the private LAN is created before the basic VM depends_on = [ionoscloud_lan.basic_vm_mariadb_lan] - initial_user = "technicaluser" - initial_uid = "2215" - initial_public_key = "../../../provision/sshkeys/technicaluser.pub" + initial_user = var.initial_user + initial_uid = var.initial_uid + initial_public_key = var.initial_public_key } # Create a NIC for the basic VM and connect it to the private LAN diff --git a/modules/ionos-basic-vm-mariadb/variables.tf b/modules/ionos-basic-vm-mariadb/variables.tf index 430499d..2909bb1 100644 --- a/modules/ionos-basic-vm-mariadb/variables.tf +++ b/modules/ionos-basic-vm-mariadb/variables.tf @@ -132,4 +132,22 @@ variable "create_lan" { type = bool description = "If true a LAN will be created, if false a LAN ID must be provided" default = true +} + +variable "initial_user" { + type = string + description = "The initial user to be created via the cloud init script." + default = "" +} + +variable "initial_uid" { + type = string + description = "The uid of the initial user created via the cloud init script." + default = "" +} + +variable "initial_public_key" { + type = string + description = "The public key of the initial user created via the cloud init script." + default = "" } \ No newline at end of file