Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud-init.iso is not properly regenerated when config file changes #1150

Open
Time0o opened this issue Feb 12, 2025 · 0 comments
Open

cloud-init.iso is not properly regenerated when config file changes #1150

Time0o opened this issue Feb 12, 2025 · 0 comments

Comments

@Time0o
Copy link

Time0o commented Feb 12, 2025

I am not super familiar with how terraform works but this can't be right, I have the following in my terraform config:

resource "libvirt_cloudinit_disk" "k8s_init" {                                      
  name = "cloud-init.iso"                                                           
  pool = var.remote_libvirt_storage_pool                                            
  user_data = templatefile("${path.module}/cloud-init/k8s.yaml", {                  
    k8s_user                = "k8s"                                                 
    k8s_user_ssh_public_key = "${var.k8s_vm_ssh_public_key}.pub"                    
  })                                                                                
} 

This worked initially but then I changed the public key passed to k8s.yaml which then results in:

error creating libvirt volume for cloudinit device cloud-init.iso: storage volume 'cloud-init.iso' exists already

That is of course fixable by just deleting this storage volume but isn't the whole point of terraform that I DON'T have to do things like that manually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant