title: Creation of Terraform Variables for Nested Objects
body: <p>Following is the variable declaration for my terraform module which is used in our cloud and inputs for these variables are obtained via one of the automation solutions. Now, I would like to reproduce one of the issues for which I would like to create a tfvars file from the below variable definition.</p>
  <p><strong>variables.tf:</strong></p>
  <pre><code>variable &quot;docker&quot; {
    type = object({
      image_name    = string
      image_location = string
      docker_ports = object({
        internal = number
        external    = number
      })
      rmodelling = object({
        lang  = object({
          version = number
          enabled    = bool
          policy = object({
            identification = string
          })
        })
        impl = object({
          version   = number
          enabled      = bool
          policy = object({
            identification = string
          })
        })
      })
    })
  }
  </code></pre>
  <p>I have tried something like this, but for the next nested objected I am not quite sure on how those can be put down. Can someone guide or shed some pointers?</p>
  <p><strong>terraform.tfvars:</strong></p>
  <pre><code>docker = {
    image_name = &quot;Ubuntu 18.04&quot;
    image_location = &quot;https://registry.jd.com/ubuntu/&lt;custom_location&gt;&quot;
    docker_ports = {
      internal = 80
      external = 443
    }
  rmodelling = { ??
  ???
  </code></pre>