-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_lambda_provisioned_concurrency_configuration: add skip_destroy
argument
#31646
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I have a comment about the added test
ErrorCheck: acctest.ErrorCheck(t, names.LambdaEndpointID), | ||
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, | ||
CheckDestroy: testAccCheckProvisionedConcurrencyConfigNoDestroy(ctx), | ||
Steps: []resource.TestStep{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could test this without the environment variable by using the following test steps, which would also test the originally reported problem
- Create
- Publish a new version of the function, but validate that the old version of the function still has concurrency set
- Delete if from the new version, and validate that it's still set on the new version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion - I've updated to this pattern and we shouldn't have any dangling resources leftover now.
Test results post $ make testacc PKG=lambda TESTS=TestAccLambdaProvisionedConcurrencyConfig_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaProvisionedConcurrencyConfig_' -timeout 180m
--- PASS: TestAccLambdaProvisionedConcurrencyConfig_Qualifier_aliasName (173.96s)
--- PASS: TestAccLambdaProvisionedConcurrencyConfig_Disappears_lambdaFunction (188.80s)
--- PASS: TestAccLambdaProvisionedConcurrencyConfig_Disappears_lambdaProvisionedConcurrency (205.29s)
--- PASS: TestAccLambdaProvisionedConcurrencyConfig_basic (260.23s)
--- PASS: TestAccLambdaProvisionedConcurrencyConfig_skipDestroy (347.22s)
--- PASS: TestAccLambdaProvisionedConcurrencyConfig_provisionedConcurrentExecutions (437.56s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/lambda 440.827s |
This functionality has been released in v5.1.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! |
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. |
Description
Adds a
skip_destroy
argument, allowing the preservation of provisioned concurrency configurations when lambda function versions are updated.Relations
Closes #31645
Output from Acceptance Testing