The most important change is the removal of the data resource for "template_file".
This is because template_file datasource is deprecated since Terraform 0.12 and the according provider can't be built (easily) on ARM System like M1 Mac.
Instead you should use the templatefile(path, vars) function.
I also added data.tf, locals.tf and terraform.tf and moved the according contents to the files as this is a best practice and the main.tf was very cluttered.
The most important change is the removal of the data resource for "template_file". This is because template_file datasource is deprecated since Terraform 0.12 and the according provider can't be built (easily) on ARM System like M1 Mac. Instead you should use the templatefile(path, vars) function.
I also added data.tf, locals.tf and terraform.tf and moved the according contents to the files as this is a best practice and the main.tf was very cluttered.