Help with understanding terraform design


I’m using terraform to orchestrate my office infrastructure with vSphere cluster. I need your help to understand if i’m doing something incorrect things because im only IT specialist in my company and I have no one to ask about it.

My flow:

  • I have one plan to all my infrastructure(50+ vms);
  • Plan structure:
    • all vars)
    • values)
    • vm settings are here)
      Example of vm setting:
"gw" = {
	template = "cent7_template"
	host_name = "gw"
        domain_name = ""
	dns_server_list = ["", ""]

	num_cpus = 2
	memory = 2048
	interfaces = [
            ipv4_address = ""
	    ipv4_netmask = "24"
            network = "VM Network"

	gateway = ""
  • Data sources such template and interfaces are generated from vm’s config and based on vars “template” and “network”.
  • Resources are generated in one block with “for_each loops”. I have two types of VMs - windows server 2019 and centos7. All of them are deployed from 2 templates.

After infrastructure is in right condition there are some ansible scripts that are applied on it:

  • updates;
  • backup plans;
  • security management;
  • remote resources attaching;

Some questions:

  • Is it a normal approach to manage infrastructure today?
  • What is a good practice to customise disks on VM,s after the are deployed?
  • What can i improve one to manage my infrastructure more effectively?

Thank you for your answers!