title: can we create an ec2 image using terraform by ami name created packer?
body: <p>I am trying my hands on terraform and packer.</p>
  
  <p>I have created a costume image with packer.</p>
  
  <p>I know we can create an image with ami id.
  I have tried:</p>
  
  <pre><code>resource "aws_instance" "packer-yellowpages" {
  
    ami = "*******"
    instance_type = "t3.micro"
    tags ={
        Name  = "demo"
    }
  }
  </code></pre>
  
  <p>I was wondering if we can do the same with ami name?</p>
  
  <p>the reason I am thinking about this is: I read somewhere that cloud provider scrap the AMI id. So is there a way I can do this some other way apart from id.
  OR implement some storage plan to access the store and access the image?</p>