Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_lambda_alias import sets function_name attribute to function's ARN #12875

Closed
angelyan opened this issue Apr 17, 2020 · 3 comments · Fixed by #12876
Closed

aws_lambda_alias import sets function_name attribute to function's ARN #12875

angelyan opened this issue Apr 17, 2020 · 3 comments · Fixed by #12876
Assignees
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. service/lambda Issues and PRs that pertain to the lambda service.
Milestone

Comments

@angelyan
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

$ terraform -v
Terraform v0.12.20
+ provider.aws v2.58.0

Affected Resource(s)

  • aws_lambda_alias

Terraform Configuration Files

resource "aws_lambda_alias" "alias" {
  function_name = "lambda"
  function_version = "..."
  name = "alias"
}

Expected Behavior

terraform import aws_lambda_alias.alias lambda/alias should set the attribute function_name to lambda.

Actual Behavior

terraform import aws_lambda_alias.alias lambda/alias sets the attribute function_name to the function's ARN.

Terraform will perform the following actions:

  # aws_lambda_alias.alias must be replaced
-/+ resource "aws_lambda_alias" "alias" {
      ~ arn              = "arn:aws:lambda:<region>:<account>:function:lambda:alias" -> (known after apply)
        description      = "..."
      ~ function_name    = "arn:aws:lambda:<region>:<account>:function:lambda" -> "lambda" # forces replacement
        function_version = "..."
      ~ id               = "arn:aws:lambda:<region>:<account>:function:lambda:alias" -> (known after apply)
      ~ invoke_arn       = "..." -> (known after apply)
        name             = "alias"
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Steps to Reproduce

  1. Create the lambda alias
  2. Run terraform import
  3. Run terraform plan
@ghost ghost added the service/lambda Issues and PRs that pertain to the lambda service. label Apr 17, 2020
@bflad bflad added the breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. label Apr 17, 2020
@bflad bflad added this to the v3.0.0 milestone Apr 17, 2020
@bflad bflad self-assigned this Jul 16, 2020
@bflad
Copy link
Member

bflad commented Jul 16, 2020

The fix for this behavior has been merged and will release with version 3.0.0 of the Terraform AWS Provider, likely in about two weeks. 👍

@ghost
Copy link

ghost commented Jul 31, 2020

This has been released in version 3.0.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Aug 15, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. service/lambda Issues and PRs that pertain to the lambda service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants