Update the nomad-consul example to avoid errors and better usability
How
Update Provider Version
Avoid writing directly to /etc/needrestart/needrestart.conf, which might cause the following error:
Can't modify reference to anonymous hash ({}) in scalar assignment at (eval 12) line 229, at EOF
Create a virtual network and assign it with Terraform so users don't have to go to the dashboard
Grep the ethernet to use as a VLAN link. Having it hardcoded as eno2 was causing errors when eno2 didn't exist in the file. Sometimes the second Ethernet interface would be enp1s0f1
How to Test
Copy the files that are in the nomad-consul folder
Run terraform init
Fill in the necessary information in the variables.tf file
What does this PR do
Update the nomad-consul example to avoid errors and better usability
How
/etc/needrestart/needrestart.conf
, which might cause the following error:eno2
was causing errors wheneno2
didn't exist in the file. Sometimes the second Ethernet interface would beenp1s0f1
How to Test
nomad-consul
folderterraform init
variables.tf
fileterraform apply
to apply the changesReferences
https://www.latitude.sh/guides/nomad-consul-terraform