-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
New Resource: aws_cloudfrontkeyvaluestore_key
#36534
New Resource: aws_cloudfrontkeyvaluestore_key
#36534
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 TESTARGS='-run=TestAccCloudFrontKeyValueStoreKey_' PKG=cloudfrontkeyvaluestore
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/cloudfrontkeyvaluestore/... -v -count 1 -parallel 20 -run=TestAccCloudFrontKeyValueStoreKey_ -timeout 360m
=== RUN TestAccCloudFrontKeyValueStoreKey_basic
=== PAUSE TestAccCloudFrontKeyValueStoreKey_basic
=== RUN TestAccCloudFrontKeyValueStoreKey_value
=== PAUSE TestAccCloudFrontKeyValueStoreKey_value
=== RUN TestAccCloudFrontKeyValueStoreKey_disappears
=== PAUSE TestAccCloudFrontKeyValueStoreKey_disappears
=== CONT TestAccCloudFrontKeyValueStoreKey_basic
=== CONT TestAccCloudFrontKeyValueStoreKey_disappears
=== CONT TestAccCloudFrontKeyValueStoreKey_value
--- PASS: TestAccCloudFrontKeyValueStoreKey_disappears (48.63s)
--- PASS: TestAccCloudFrontKeyValueStoreKey_basic (55.16s)
--- PASS: TestAccCloudFrontKeyValueStoreKey_value (64.36s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudfrontkeyvaluestore 75.352s
@brittandeyoung Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.43.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! |
@brittandeyoung Thanks for adding this resource. I think this resource needs to have some form of mutex or locking to prevent multiple key writes from happening at the same time. Consider the following plan where multiple keys are being created During the apply, the following errors will appear I suspect this precondition is due to a race condition of multiple keys are being created in parallel and their etag being invalidated after the first one is created. |
@lawliet89 From writing the resource, it appears to update the
Do you think me adding this would solve for your use case? |
@brittandeyoung This wouldn't work well when I was thinking of doing something similar to terraform-provider-aws/internal/service/ec2/vpc_security_group_rule.go Lines 161 to 162 in f88ea31
The resource locks a mutex before it does anything, and |
@lawliet89 I see, I was pointed to a similar method by the provider team. I will get a PR ready to resolve. |
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
This pull requests adds the ability to create and manage Cloudfront Key Value Store Keys with terraform utilizing the
aws_cloudfrontkeyvaluestore_key
resource.Relations
Closes #35793
References
Output from Acceptance Testing