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" {
|
resource "libvirt_cloudinit_disk" "commoninit" {
|
||||||
name = var.cloudinit_filename
|
name = var.cloudinit_filename
|
||||||
user_data = templatefile("${path.module}/../environments/cloud_init.yaml", {})
|
user_data = templatefile("${path.module}/cloud_init.yaml", {
|
||||||
pool = var.pool_name
|
ssh_key = var.ssh_key
|
||||||
|
})
|
||||||
|
pool = var.pool_name
|
||||||
depends_on = [libvirt_pool.tf_tmp_storage]
|
depends_on = [libvirt_pool.tf_tmp_storage]
|
||||||
}
|
}
|
@@ -39,6 +39,13 @@ variable "cloudinit_filename" {
|
|||||||
type = string
|
type = string
|
||||||
default = "commoninit.iso"
|
default = "commoninit.iso"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "ssh_key" {
|
||||||
|
description = "SSH authorized keys for cloud-init"
|
||||||
|
type = list(string)
|
||||||
|
default = []
|
||||||
|
}
|
||||||
|
|
||||||
variable "user_data" {
|
variable "user_data" {
|
||||||
description = "User data for cloud-init"
|
description = "User data for cloud-init"
|
||||||
type = string
|
type = string
|
||||||
|
Reference in New Issue
Block a user