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

Inconsistency in AWS Terraform provider with aws_lambda_function #11787

Closed
Sarah-E-Greene opened this issue Jan 28, 2020 · 5 comments
Closed
Labels
bug Addresses a defect in current functionality. service/lambda Issues and PRs that pertain to the lambda service.

Comments

@Sarah-E-Greene
Copy link

Sarah-E-Greene commented Jan 28, 2020

When using a data resource for aws_lambda_function, the qualified_arn comes back as:

arn:aws:lambda:us-east-1:1234:function:foo:$LATEST

But the non-data resource has a qualified_arn of:

arn:aws:lambda:us-east-1:1234:function:foo:5

Why is this different?

This breaks for us when using the data resource for a lambda with a cloudfront distribution, as it requires the qualified_arn to end with a number:

Error: error creating CloudFront Distribution: InvalidLambdaFunctionAssociation: The function ARN must reference a specific function version. (The ARN must end with the version number.)

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

0.12.19

Affected Resource(s)

  • aws_lambda_function
  • data.aws_lambda_function

Expected Behavior

Data resource for aws_lambda_function should have returned arn:aws:lambda:us-east-1:1234:function:foo:5, like the non-data resource.

Actual Behavior

Data resource for aws_lambda_function returned arn:aws:lambda:us-east-1:1234:function:foo:$LATEST

@ghost ghost added the service/lambda Issues and PRs that pertain to the lambda service. label Jan 28, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 28, 2020
@justinretzolk
Copy link
Member

Hey @SarahRiley 👋 Thank you for taking the time to file this issue. In reviewing the documentation, it seems as though the behavior may have changed, but I'm not not entirely sure which version of the AWS provider you were previously using, so it's difficult for me to say with certainty. With that in mind, given that there's been a number of AWS provider releases since you initially filed this, I wanted to follow up and see if you're still experiencing this behavior.

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 18, 2021
@Discipe
Copy link

Discipe commented Dec 9, 2021

This is still reproducable in Terraform 1.0.11 and aws provider 3.68.0

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Dec 9, 2021
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Dec 16, 2021
@breathingdust
Copy link
Member

Hi all 👋 Just letting you know that this is issue is featured on this quarters roadmap. If a PR exists to close the issue a maintainer will review and either make changes directly, or work with the original author to get the contribution merged. If you have written a PR to resolve the issue please ensure the "Allow edits from maintainers" box is checked. Thanks for your patience and we are looking forward to getting this merged soon!

@ewbankkit
Copy link
Contributor

Closed via #11195.

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/lambda Issues and PRs that pertain to the lambda service.
Projects
None yet
Development

No branches or pull requests

5 participants