title: how to put AMI name in packer manifest
body: <p>I would like to get the AMI name into the packer manifest.  I understand how to get this for the AMI id but its different for the name.
  I have:</p>
  <pre><code>data &quot;amazon-ami&quot; &quot;ubuntu&quot; {
    filters = {
       name = &quot;ubuntu-minimal/images/hvm-ssd/ubuntu-focal-20.04-amd64-minimal-*&quot;
       root-device-type    = &quot;ebs&quot;
       virtualization-type = &quot;hvm&quot;
    }
    most_recent = true
    region      = &quot;us-east-1&quot;
  }
  source &quot;amazon-ebs&quot; &quot;ui&quot; {
    ami_name      = &quot;my-ami-${formatdate(&quot;YYYY-MM-DD-hhmmss&quot;, timestamp())}&quot;
    instance_type = &quot;t3.small&quot;
    region        = &quot;us-east-1&quot;
    source_ami    = &quot;${data.amazon-ami.ubuntu.id}&quot;
    ssh_pty       = true
    ssh_username  = &quot;ubuntu&quot;
  }
  build {
    sources = [&quot;source.amazon-ebs.ui&quot;]
    
    post-processor &quot;manifest&quot; {
      output = &quot;manifest.json&quot;
      strip_path = true
      custom_data = {
        version = &quot;${source.ami_name}&quot;
      }
    }
  }
  </code></pre>
  <p>The error I am getting is <code>Unsupported attribute; This object does not have an attribute named &quot;ami_name&quot;.</code>
  According to this: <a href="https://www.packer.io/docs/templates/hcl_templates/blocks/source" rel="nofollow noreferrer">https://www.packer.io/docs/templates/hcl_templates/blocks/source</a> it looks like the only attributes I do have access to are name and type.  How can I get the <code>ami_name</code> into the manifest?</p>