title: terraform map and object variables as input
body: <p>There is issue with command line input for any string attribute inside a map/object variable.
  <strong>the below configuration works with below command</strong>. But the moment I use any string attribute inside the object variable. it fails</p>
  <pre><code>terraform plan -var='storageProfile2={&quot;storage_mb&quot;:102400,&quot;backup_retention_days&quot;:15,&quot;geo_redundant_backup_enabled&quot;:false}'
  </code></pre>
  <pre><code>//main.tf
  resource &quot;azurerm_postgresql_server&quot; &quot;dmcdevops_postgress&quot; {
    name                          = &quot;pstgressdb101&quot; 
    location                      = azurerm_resource_group.dmc_rg_creation.location
    resource_group_name           = azurerm_resource_group.dmc_rg_creation.name
    sku_name                      = &quot;GP_Gen5_4&quot;
    backup_retention_days         = var.storageProfile2.backup_retention_days
    storage_mb                    = var.storageProfile2.storage_mb
    geo_redundant_backup_enabled  = var.storageProfile2.geo_redundant_backup_enabled 
    administrator_login           = &quot;sdfgsgfsg&quot;
    administrator_login_password  = &quot;H@Sh1CoR3!&quot;
    version                       = &quot;11&quot;
    ssl_enforcement_enabled       = true
  
  }
  //variables.tf
  variable &quot;storageProfile2&quot; {
  default = {
      storage_mb                      = 102400
      backup_retention_days           = 15
      geo_redundant_backup_enabled    = false
    }
  
    type = object(
      {
          storage_mb                    = number
          backup_retention_days         = number
          geo_redundant_backup_enabled  = bool
     }
        )
  } 
  </code></pre>
  <p><em><strong>Below config doesn't work</strong></em>. I just added <strong>administrator_login</strong> as string attribute to the object variable.
  terraform plan and apply works with default values tho.</p>
  <pre><code>terraform plan -var='storageProfile2={&quot;storage_mb&quot;:102400,&quot;backup_retention_days&quot;:15,&quot;geo_redundant_backup_enabled&quot;:false,&quot;administrator_login&quot;:&quot;pgadmin1223&quot;}'
  </code></pre>
  <pre><code>//main.tf 
  resource &quot;azurerm_postgresql_server&quot; &quot;dmcdevops_postgress&quot; {
    name                          = &quot;pstgressdb101&quot; 
    location                      = azurerm_resource_group.dmc_rg_creation.location
    resource_group_name           = azurerm_resource_group.dmc_rg_creation.name
    sku_name                      = &quot;GP_Gen5_4&quot;
    backup_retention_days         = var.storageProfile2.backup_retention_days
    storage_mb                    = var.storageProfile2.storage_mb
    geo_redundant_backup_enabled  = var.storageProfile2.geo_redundant_backup_enabled 
    administrator_login           =  var.storageProfile2.administrator_login 
    administrator_login_password  = &quot;H@Sh1CoR3!&quot;
    version                       = &quot;11&quot;
    ssl_enforcement_enabled       = true
  
  }
  
  //varibale.tf
  variable &quot;storageProfile2&quot; {
  default = {
      storage_mb                      = 102400
      backup_retention_days           = 15
      geo_redundant_backup_enabled    = false
      administrator_login             = &quot;pgadmin&quot;
    }
  
    type = object(
      {
          storage_mb                    = number
          backup_retention_days         = number
          geo_redundant_backup_enabled  = bool
          administrator_login           = string 
     }
        )
  }
  </code></pre>
  <p><strong>Error message</strong></p>
  <p><a href="https://i.stack.imgur.com/Jpn0U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jpn0U.png" alt="enter image description here" /></a></p>