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

Properly handle response from Lambda API for Image type Lambda Functions #17082

Merged
merged 2 commits into from
Feb 11, 2021

Conversation

dspatoulas
Copy link

@dspatoulas dspatoulas commented Jan 12, 2021

The ImageConfigResponse returned from a lambda function of type IMAGE can return all null keys values in the response from the Lambda service. While this is an odd behavior of the service, the provider should not crash due to the empty key representation of the Lambda resource.

Example Response:

{
    ...
    "Configuration": {
        ...
        "ImageConfigResponse": {
            "Error": null,
            "ImageConfig": null
        },
    },
}

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Closes #17081

Release note for CHANGELOG:

Fixes crash when using `Image` package type for `aws_lambda_function` resources

@dspatoulas dspatoulas requested a review from a team as a code owner January 12, 2021 22:34
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/lambda Issues and PRs that pertain to the lambda service. labels Jan 12, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 12, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @dspatoulas 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@dspatoulas dspatoulas changed the title Properly handle response from Lambda API WIP: Properly handle response from Lambda API Jan 12, 2021
@dspatoulas dspatoulas changed the title WIP: Properly handle response from Lambda API Properly handle response from Lambda API Jan 13, 2021
@dspatoulas dspatoulas changed the title Properly handle response from Lambda API Properly handle response from Lambda API for Image type Lambda Functions Jan 18, 2021
Base automatically changed from master to main January 23, 2021 01:00
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 29, 2021
@gdavison gdavison self-assigned this Feb 11, 2021
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, @dspatoulas. I've added the unit test from #17359

@gdavison gdavison merged commit 03bfc2c into hashicorp:main Feb 11, 2021
@github-actions github-actions bot added this to the v3.28.0 milestone Feb 11, 2021
@ghost
Copy link

ghost commented Feb 12, 2021

This has been released in version 3.28.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 Mar 14, 2021

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 as resolved and limited conversation to collaborators Mar 14, 2021
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. crash Results from or addresses a Terraform crash or kernel panic. provider Pertains to the provider itself, rather than any interaction with AWS. service/lambda Issues and PRs that pertain to the lambda service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using the New Lambda Image Container causes terraform crash
3 participants