diff --git a/templates/libvirt/networks.tf.j2 b/templates/libvirt/networks.tf.j2 index 36f24a8..7e420c1 100644 --- a/templates/libvirt/networks.tf.j2 +++ b/templates/libvirt/networks.tf.j2 @@ -7,20 +7,20 @@ resource "libvirt_network" "{{ network.name }}" { name = "{{ network.name }}" mode = "{{ network.mode }}" - autostart = "{{ network.autostart | default('true') }}" + autostart = {{ network.autostart | default('true') | lower() }} {% if network.domain is defined %} domain = "{{ network.domain }}" {% endif %} addresses = [{% for address in network.addresses %}"{{ address }}"{%- if not loop.last -%}, {%- endif -%}{% endfor %}] dhcp { - enabled = {{ network.dhcp_enabled | default('true') }} + enabled = {{ network.dhcp_enabled | default('true') | lower() }} } {% if network.dns_enabled is defined and network.dns_enabled | bool %} dns { enabled = {{ network.dns_enabled }} - local_only = {{ network.dns_local_only | default('false') }} + local_only = {{ network.dns_local_only | default('false') | lower() }} {% for forwarder in libvirt_network.dns_forwarders %} forwarders { diff --git a/templates/libvirt/vms.tf.j2 b/templates/libvirt/vms.tf.j2 index 5c85e1b..ce080c4 100644 --- a/templates/libvirt/vms.tf.j2 +++ b/templates/libvirt/vms.tf.j2 @@ -25,7 +25,7 @@ resource "libvirt_volume" "{{ disk.volume_id }}" { # VM {{ vm.name }} specification resource "libvirt_domain" "{{ vm.name }}" { name = "{{ vm.name }}" - running = "{{ vm.running | default('true') | lower() }}" + running = {{ vm.running | default('true') | lower() }} memory = "{{ vm.memory }}" vcpu = "{{ vm.vcpu }}"