-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
fix: A diff should reflect that the value of the stream arn is computed on change to the stream. #27664
Conversation
…ed on change to the stream. The stream ARN is set to a default empty string but is updated when the stream_enabled state is changed. Adding a customdiff that sets the arn as computed should ensure the new value is used when streaming is enabled.
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 TESTARGS='-run=TestAccLambdaEventSourceMapping_DynamoDB_' PKG=lambda ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lambda/... -v -count 1 -parallel 2 -run=TestAccLambdaEventSourceMapping_DynamoDB_ -timeout 180m
=== RUN TestAccLambdaEventSourceMapping_DynamoDB_basic
=== PAUSE TestAccLambdaEventSourceMapping_DynamoDB_basic
=== RUN TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes
=== PAUSE TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes
=== RUN TestAccLambdaEventSourceMapping_DynamoDB_streamAdded
=== PAUSE TestAccLambdaEventSourceMapping_DynamoDB_streamAdded
=== CONT TestAccLambdaEventSourceMapping_DynamoDB_basic
=== CONT TestAccLambdaEventSourceMapping_DynamoDB_streamAdded
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_streamAdded (71.04s)
=== CONT TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_basic (73.41s)
--- PASS: TestAccLambdaEventSourceMapping_DynamoDB_functionResponseTypes (78.93s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/lambda 154.829s
% make testacc TESTARGS='-run=TestAccDynamoDBTable_basic\|TestAccDynamoDBTable_stream' PKG=dynamodb ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/dynamodb/... -v -count 1 -parallel 2 -run=TestAccDynamoDBTable_basic\|TestAccDynamoDBTable_stream -timeout 180m
=== RUN TestAccDynamoDBTable_basic
=== PAUSE TestAccDynamoDBTable_basic
=== RUN TestAccDynamoDBTable_streamSpecification
=== PAUSE TestAccDynamoDBTable_streamSpecification
=== RUN TestAccDynamoDBTable_streamSpecificationDiffs
=== PAUSE TestAccDynamoDBTable_streamSpecificationDiffs
=== RUN TestAccDynamoDBTable_streamSpecificationValidation
=== PAUSE TestAccDynamoDBTable_streamSpecificationValidation
=== CONT TestAccDynamoDBTable_basic
=== CONT TestAccDynamoDBTable_streamSpecificationDiffs
--- PASS: TestAccDynamoDBTable_basic (30.10s)
=== CONT TestAccDynamoDBTable_streamSpecificationValidation
--- PASS: TestAccDynamoDBTable_streamSpecificationValidation (2.02s)
=== CONT TestAccDynamoDBTable_streamSpecification
--- PASS: TestAccDynamoDBTable_streamSpecification (65.33s)
--- PASS: TestAccDynamoDBTable_streamSpecificationDiffs (158.90s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb 163.324s
@grahamhar Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.39.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
The stream ARN is set to a default empty string when the stream is not enabled, but when the stream state is updated to enabled the plan doesn't reflect the stream are is computed so fails as the consumer of the stream expects a valid ARN( lambda in my case, hence adding the test to prove the fix in the lambda package). Adding a customdiff that sets the ARN as computed on change ensures the plan does not pass the existing empty string to the consumer.
Relations
Closes #20092
References
Output from Acceptance Testing