title: Update Terraform map function to "tomap"
body: <p>I inherited some older TF code and I noticed that some of the code is using deprecated functions like map(object){}. I would like to update this code since map is no longer used as per this <a href="https://www.terraform.io/docs/language/functions/map.html" rel="nofollow noreferrer">document</a>.</p>
  <p>Here is an excerpt from the old code:</p>
  <pre><code>variable &quot;application_gateways&quot; {
    type = map(object({
      name                       = string
      webapp_firewall_policy_key = string
      zones                      = list(string)
      enable_http2               = bool
      sku = object({
        name     = string
        tier     = string
        capacity = number
      })
  </code></pre>
  <p>Can I update it using <a href="https://www.terraform.io/docs/language/functions/tomap.html" rel="nofollow noreferrer">tomap</a> like this or is it more complicated?</p>
  <pre><code>variable &quot;application_gateways&quot; {
    type = tomap({
      name                       = string
      webapp_firewall_policy_key = string
      zones                      = list(string)
      enable_http2               = bool
      sku = object({
        name     = string
        tier     = string
        capacity = number
      })
  </code></pre>