title: Sync Lambda Aliases with local Terraform state?
body: <p>Forgive the question -- new to terraform, trying to understand somebody else's work.</p>
  
  <p>Is there some way I can create/update or resync my local tfstate for aliases as well?</p>
  
  <p>We have a list of 100+ function aliases defined within our <code>.tf</code> definition. The problem appears our tfstate file is out of date with preexisting aliases. Deployments on 100+ objects fail with</p>
  
  <pre><code>Error creating Lambda alias: ResourceConflictException: Alias already exists
  </code></pre>
  
  <p>I tried <code>terraform refresh</code> without luck -- still gives "Alias already exists" error.</p>
  
  <p>Example resource:</p>
  
  <pre><code>resource "aws_lambda_alias" "admin_unlock_user_localhost" {
    name             = "${var.alias}"
    description      = "Deployment for localhost alias"
    function_name    = "${aws_lambda_function.admin_unlock_user.arn}"
    function_version = "${aws_lambda_function.admin_unlock_user.version}"
  }
  </code></pre>
  
  <p>Fails with: </p>
  
  <pre><code>Error: Error creating Lambda alias: ResourceConflictException: Alias already exists: arn:aws:lambda:us-east-1:xxxxxxxx:function:identity-admin-unlock-user:localhost
      status code: 409, request id: b1a62d59-8b89-47a5-4ca8-0267536a3c7b
  
  on lambda_localhost.tf line 323, in resource "aws_lambda_alias" "admin_unlock_user_localhost":
   323: resource "aws_lambda_alias" "admin_unlock_user_localhost"
  </code></pre>