Skip to main content

Questions tagged [terraform]

0 votes
1 answer
25 views

terraform resource dependency with count(loop)

I'm trying to create stack of multiple vms on KVM_HOST with terraform. The catch is, I'm using pxeboot & kickstart to do installation. Kickstart file needs to carry some dynamic information, like ...
Sollosa's user avatar
  • 1,983
0 votes
0 answers
29 views

how to make terraform pass static IP information to kvm virtual machine with variables, in a kickstart pxeboot enabled env?

I have a kvm host, with bridge network, so the vms get IP info directly from router itself. I have created a pxeboot env with dnsmasq acting as dhcp proxy, and kickstart as method of installation ...
Sollosa's user avatar
  • 1,983
0 votes
5 answers
126 views

How can I replace the last occurrence of " before ] (text-manipulation)

I'm doing some text manipulation and I want to replace the last occurrence of " (with ", "four") before ] which could be in different lines. (this essentially adds a new item in ...
kyles's user avatar
  • 33
0 votes
0 answers
2k views

partitionning additional disks as LVM with cloud-init

I'm using terraform and cloud-init to setup new VMs. I want to have additional disks setup and mounted in the new VM, with XFS partitions on top of LVM. Right now the only way I've found that allows ...
Edzilla's user avatar
0 votes
0 answers
170 views

Stopping parameter expansion in write_file content of cloud-init userdata

Background I'm using Terraform and cloud-init to provision an Ubuntu VM. The Terraform template contains an embedded cloud-init user_data section that contains a write_file directive to write a bash ...
McKenzieCarr's user avatar
2 votes
2 answers
1k views

cloudinit does not run for qemu/kvm systems created by terraform and libvirt provider

I'm trying to provision a VM on qemu/kvm hypervisor using cloudinit with terraform and the libvirt provider. I can get the machine to start, but the cloudinit is not getting kicked off. I know that ...
Jonathan Heady's user avatar
1 vote
0 answers
259 views

Unable to redirect stdout for background terraform process after it received input from named pipe

I have a terraform file: terraform { required_version = "1.3.5" } locals { a = "foo" b = "bar" } in a bash terminal, I can do: $ echo "local.a" | ...
Foo's user avatar
  • 242
1 vote
0 answers
35 views

Deploy new instances with the same terraform file without damaging the old one's

I am using a terraform file to deploy 2 VM instances in parallel (on KVM). now I need to deploy another 2 VM instances with the same terraform file. how can I do this without damaging the old ...
Orly Orly's user avatar
  • 123
1 vote
1 answer
574 views

assign IP to kvm guest on bridge (terrafom)

I am trying to deploy VM guest via terraform on KVM. the guest VM is deployed but does not get an IP. what am I doing wrong? here is my main.tf : terraform { required_providers { libvirt = { ...
user536811's user avatar