Skip to content

Commit

Permalink
DBP-817- user access var should not be hard coded
Browse files Browse the repository at this point in the history
  • Loading branch information
sahassou committed Jun 20, 2024
1 parent c57247c commit af33089
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/ionos-basic-vm-mariadb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions modules/ionos-basic-vm-mariadb/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
}

0 comments on commit af33089

Please sign in to comment.