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

Add skip_destroy parameter to aws_lambda_layer_version resource #11997

Merged
merged 20 commits into from
Nov 18, 2021

Conversation

dkryptr
Copy link
Contributor

@dkryptr dkryptr commented Feb 11, 2020

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 #7552

Release note for CHANGELOG:

resource/aws_lambda_layer_version: Add `retain` argument. [GH-11997]

I haven't updated the acceptance tests. I looked around in the code and found where the test would go, however I don't have the time at the moment to learn how the acceptance tests work. If someone would like to write the tests, that would be ideal, but I'll plan to come back to them when I get a chance. (I'm also a little intimidated by running the acceptance tests and creating resources that may cost money on my personal account so I'm hoping the CI/CD pipeline will run them so I don't have to)

Added a "retain" value to the resource schema. If retain is true, don't delete the old lambda layer.
Updated lambda_layer_version resource
@dkryptr dkryptr requested a review from a team February 11, 2020 17:10
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/lambda Issues and PRs that pertain to the lambda service. labels Feb 11, 2020
@abhilashnarayanan
Copy link

Hi Team, when this fix will be released?
@CGreenburg

Base automatically changed from master to main January 23, 2021 00:57
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:57
@breathingdust breathingdust added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 6, 2021
@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@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!

@breathingdust breathingdust added this to the Roadmap milestone Nov 10, 2021
@YakDriver YakDriver self-assigned this Nov 18, 2021
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Nov 18, 2021
@YakDriver YakDriver changed the title [WIP] Added retain parameter to aws_lambda_layer_version resource Add skip_destroy parameter to aws_lambda_layer_version resource Nov 18, 2021
Copy link
Member

@YakDriver YakDriver 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 your work. Looks great! 🎉

Output from acceptance tests (us-west-2):

% make testacc TESTS=TestAccLambdaLayerVersion PKG=lambda
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaLayerVersion' -timeout 180m
--- PASS: TestAccLambdaLayerVersionDataSource_basic (21.26s)
--- PASS: TestAccLambdaLayerVersion_description (25.05s)
--- PASS: TestAccLambdaLayerVersion_compatibleRuntimes (29.05s)
--- PASS: TestAccLambdaLayerVersion_s3 (33.34s)
--- PASS: TestAccLambdaLayerVersionDataSource_version (39.04s)
--- PASS: TestAccLambdaLayerVersion_basic (52.11s)
--- PASS: TestAccLambdaLayerVersion_licenseInfo (60.14s)
--- PASS: TestAccLambdaLayerVersion_update (63.05s)
--- PASS: TestAccLambdaLayerVersion_skipDestroy (73.79s)
--- PASS: TestAccLambdaLayerVersionDataSource_runtime (81.59s)
--- PASS: TestAccLambdaLayerVersionDataSource_architectures (98.29s)
--- PASS: TestAccLambdaLayerVersion_compatibleArchitectures (102.03s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/lambda	103.126s

Output from acceptance tests (GovCloud):

% make testacc TESTS=TestAccLambdaLayerVersion PKG=lambda
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaLayerVersion' -timeout 180m
--- SKIP: TestAccLambdaLayerVersionDataSource_architectures (20.52s)
--- PASS: TestAccLambdaLayerVersionDataSource_basic (32.71s)
--- PASS: TestAccLambdaLayerVersion_licenseInfo (38.81s)
--- PASS: TestAccLambdaLayerVersion_compatibleRuntimes (42.21s)
--- PASS: TestAccLambdaLayerVersion_s3 (44.50s)
--- PASS: TestAccLambdaLayerVersion_basic (49.33s)
--- PASS: TestAccLambdaLayerVersionDataSource_version (53.59s)
--- SKIP: TestAccLambdaLayerVersion_compatibleArchitectures (60.05s)
--- PASS: TestAccLambdaLayerVersion_description (63.50s)
--- PASS: TestAccLambdaLayerVersion_skipDestroy (65.71s)
--- PASS: TestAccLambdaLayerVersionDataSource_runtime (67.18s)
--- PASS: TestAccLambdaLayerVersion_update (79.63s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/lambda	81.730s

@YakDriver YakDriver merged commit 16371e9 into hashicorp:main Nov 18, 2021
@github-actions github-actions bot modified the milestones: Roadmap, v3.66.0 Nov 18, 2021
@github-actions
Copy link

This functionality has been released in v3.66.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. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 8, 2022

I'm going to lock this pull request 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 related to this change, 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 Jun 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/lambda Issues and PRs that pertain to the lambda service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lambda Layers - Terraform deploys new version and removes the old one
5 participants