feat: add ssh_key variable support to cloud-init module
This commit is contained in:
committed by
Lukas Greve (aider)
parent
798cc871c8
commit
3498b877c8
@@ -1,6 +1,8 @@
|
||||
resource "libvirt_cloudinit_disk" "commoninit" {
|
||||
name = var.cloudinit_filename
|
||||
user_data = templatefile("${path.module}/../environments/cloud_init.yaml", {})
|
||||
pool = var.pool_name
|
||||
name = var.cloudinit_filename
|
||||
user_data = templatefile("${path.module}/cloud_init.yaml", {
|
||||
ssh_key = var.ssh_key
|
||||
})
|
||||
pool = var.pool_name
|
||||
depends_on = [libvirt_pool.tf_tmp_storage]
|
||||
}
|
@@ -39,6 +39,13 @@ variable "cloudinit_filename" {
|
||||
type = string
|
||||
default = "commoninit.iso"
|
||||
}
|
||||
|
||||
variable "ssh_key" {
|
||||
description = "SSH authorized keys for cloud-init"
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "user_data" {
|
||||
description = "User data for cloud-init"
|
||||
type = string
|
||||
|
Reference in New Issue
Block a user