-
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/lambda_layer_version: fix ForceNew
issue with source_code_hash
attribute
#37646
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.
LGTM 🎉
% make testacc PKG=lambda TESTS="TestAccLambdaLayerVersion"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaLayerVersion' -timeout 360m
--- PASS: TestAccLambdaLayerVersion_description (22.00s)
--- PASS: TestAccLambdaLayerVersion_s3 (29.23s)
--- PASS: TestAccLambdaLayerVersion_basic (30.75s)
--- PASS: TestAccLambdaLayerVersionPermission_account (49.76s)
--- PASS: TestAccLambdaLayerVersionPermission_org (53.96s)
--- PASS: TestAccLambdaLayerVersion_compatibleRuntimes (62.04s)
--- PASS: TestAccLambdaLayerVersionPermission_disappears (66.86s)
--- PASS: TestAccLambdaLayerVersionDataSource_basic (71.03s)
--- PASS: TestAccLambdaLayerVersionPermission_basic_byName (86.20s)
--- PASS: TestAccLambdaLayerVersion_disappears (91.39s)
--- PASS: TestAccLambdaLayerVersionPermission_basic_byARN (92.15s)
--- PASS: TestAccLambdaLayerVersionDataSource_version (100.52s)
--- PASS: TestAccLambdaLayerVersion_licenseInfo (108.38s)
--- PASS: TestAccLambdaLayerVersion_sourceCodeHash (109.59s)
--- PASS: TestAccLambdaLayerVersion_skipDestroy (113.86s)
--- PASS: TestAccLambdaLayerVersionPermission_skipDestroy (119.32s)
--- PASS: TestAccLambdaLayerVersionDataSource_runtime (129.98s)
--- PASS: TestAccLambdaLayerVersion_update (133.83s)
--- PASS: TestAccLambdaLayerVersion_compatibleArchitectures (151.38s)
--- PASS: TestAccLambdaLayerVersionDataSource_architectures (151.93s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/lambda 157.408s
Computed: true, | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Deprecated: "This attribute is deprecated and will be removed in a future major version. Use `code_sha256` instead.", |
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 catch 👍
…d deprecate source_code_hash
1a3ad11
to
75ac213
Compare
This functionality has been released in v5.51.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
Code hash returned from AWS could sometimes be different from the configuration. This causes perpetual drift and forces a resource replacement, even when the source code has not changed.
source_code_hash
is a virtual attribute used to force a resource replacement if the code changes.code_sha256
attribute has been added and contains thehash
that is returned from AWS.Relations
Closes #17989
References
Output from Acceptance Testing