-
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
New Resource: aws_cloudtrail_event_data_store #22490
Conversation
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.
Welcome @bschaatsbergen 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
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.
Great initiative, I'm looking forward to keep track of this draft PR.
…EventDataStoreUpdate`
…ate of the resource
Hey @ewbankkit, The event data store CRUD seems to work, there's just something wrong with the By default the SDK implicitly sets it to 'capture all management events'. Because this is not reflected in the resource when declaring it, it does end up in the state, but the subsequent
Could you advice me on how to tackle this please? |
@bschaatsbergen Try marking |
Thanks @ewbankkit. I noticed that if you remove one of the operators (equals, not equals, etc) and only set the
|
…tes) as Computed together with Optional
…DING_DELETION' state
…ibutes Reference` section and `Import` section
Done @ewbankkit, besides the previous comment (which seems related to the AWS API) and that I'm unable to test the organization_enabled, everything is tested and seems to work 👍 |
…dated_timestamp'.
Acceptance test output: % make testacc TESTS=TestAccEventDataStore_basic PKG=cloudtrail ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudtrail/... -v -count 1 -parallel 20 -run='TestAccEventDataStore_basic' -timeout 180m === RUN TestAccEventDataStore_basic === PAUSE TestAccEventDataStore_basic === CONT TestAccEventDataStore_basic --- PASS: TestAccEventDataStore_basic (22.33s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudtrail 27.974s
Acceptance test output: % make testacc TESTS=TestAccEventDataStore_options PKG=cloudtrail ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudtrail/... -v -count 1 -parallel 20 -run='TestAccEventDataStore_options' -timeout 180m === RUN TestAccEventDataStore_options === PAUSE TestAccEventDataStore_options === CONT TestAccEventDataStore_options --- PASS: TestAccEventDataStore_options (35.91s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudtrail 41.731s
Acceptance test output: % make testacc TESTS=TestAccEventDataStore_tags PKG=cloudtrail ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudtrail/... -v -count 1 -parallel 20 -run='TestAccEventDataStore_tags' -timeout 180m === RUN TestAccEventDataStore_tags === PAUSE TestAccEventDataStore_tags === CONT TestAccEventDataStore_tags --- PASS: TestAccEventDataStore_tags (40.99s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudtrail 44.986s
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 🚀.
Commercial
% make testacc TESTS=TestAccEventDataStore_ PKG=cloudtrail
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudtrail/... -v -count 1 -parallel 20 -run='TestAccEventDataStore_' -timeout 180m
=== RUN TestAccEventDataStore_basic
=== PAUSE TestAccEventDataStore_basic
=== RUN TestAccEventDataStore_disappears
=== PAUSE TestAccEventDataStore_disappears
=== RUN TestAccEventDataStore_tags
=== PAUSE TestAccEventDataStore_tags
=== RUN TestAccEventDataStore_options
=== PAUSE TestAccEventDataStore_options
=== RUN TestAccEventDataStore_advancedEventSelector
=== PAUSE TestAccEventDataStore_advancedEventSelector
=== CONT TestAccEventDataStore_basic
=== CONT TestAccEventDataStore_options
=== CONT TestAccEventDataStore_advancedEventSelector
=== CONT TestAccEventDataStore_disappears
=== CONT TestAccEventDataStore_tags
=== CONT TestAccEventDataStore_options
acctest.go:701: this AWS account must be the management account of an AWS Organization
--- SKIP: TestAccEventDataStore_options (1.25s)
--- PASS: TestAccEventDataStore_disappears (16.09s)
--- PASS: TestAccEventDataStore_basic (20.89s)
--- PASS: TestAccEventDataStore_advancedEventSelector (24.49s)
--- PASS: TestAccEventDataStore_tags (41.64s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudtrail 45.575s
GovCloud
% make testacc TESTS=TestAccEventDataStore_ PKG=cloudtrail
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudtrail/... -v -count 1 -parallel 20 -run='TestAccEventDataStore_' -timeout 180m
=== RUN TestAccEventDataStore_basic
=== PAUSE TestAccEventDataStore_basic
=== RUN TestAccEventDataStore_disappears
=== PAUSE TestAccEventDataStore_disappears
=== RUN TestAccEventDataStore_tags
=== PAUSE TestAccEventDataStore_tags
=== RUN TestAccEventDataStore_options
=== PAUSE TestAccEventDataStore_options
=== RUN TestAccEventDataStore_advancedEventSelector
=== PAUSE TestAccEventDataStore_advancedEventSelector
=== CONT TestAccEventDataStore_basic
=== CONT TestAccEventDataStore_options
=== CONT TestAccEventDataStore_disappears
=== CONT TestAccEventDataStore_tags
=== CONT TestAccEventDataStore_advancedEventSelector
=== CONT TestAccEventDataStore_disappears
acctest.go:1008: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating CloudTrail Event Data Store (tf-acc-test-8727672389834937490): UnsupportedOperationException: The operation requested is not supported in the region.
with aws_cloudtrail_event_data_store.test,
on terraform_plugin_test.tf line 2, in resource "aws_cloudtrail_event_data_store" "test":
2: resource "aws_cloudtrail_event_data_store" "test" {
=== CONT TestAccEventDataStore_basic
acctest.go:1008: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating CloudTrail Event Data Store (tf-acc-test-3181324507280160273): UnsupportedOperationException: The operation requested is not supported in the region.
with aws_cloudtrail_event_data_store.test,
on terraform_plugin_test.tf line 2, in resource "aws_cloudtrail_event_data_store" "test":
2: resource "aws_cloudtrail_event_data_store" "test" {
=== CONT TestAccEventDataStore_advancedEventSelector
acctest.go:1008: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating CloudTrail Event Data Store (tf-acc-test-6934047121505972719): UnsupportedOperationException: The operation requested is not supported in the region.
with aws_cloudtrail_event_data_store.test,
on terraform_plugin_test.tf line 2, in resource "aws_cloudtrail_event_data_store" "test":
2: resource "aws_cloudtrail_event_data_store" "test" {
=== CONT TestAccEventDataStore_options
acctest.go:1008: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating CloudTrail Event Data Store (tf-acc-test-1237862277570900657): UnsupportedOperationException: The operation requested is not supported in the region.
with aws_cloudtrail_event_data_store.test,
on terraform_plugin_test.tf line 2, in resource "aws_cloudtrail_event_data_store" "test":
2: resource "aws_cloudtrail_event_data_store" "test" {
=== CONT TestAccEventDataStore_tags
acctest.go:1008: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating CloudTrail Event Data Store (tf-acc-test-6132664734702259425): UnsupportedOperationException: The operation requested is not supported in the region.
with aws_cloudtrail_event_data_store.test,
on terraform_plugin_test.tf line 2, in resource "aws_cloudtrail_event_data_store" "test":
2: resource "aws_cloudtrail_event_data_store" "test" {
--- SKIP: TestAccEventDataStore_disappears (9.13s)
--- SKIP: TestAccEventDataStore_advancedEventSelector (9.19s)
--- SKIP: TestAccEventDataStore_options (9.21s)
--- SKIP: TestAccEventDataStore_basic (9.21s)
--- SKIP: TestAccEventDataStore_tags (9.22s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudtrail 12.617s
@bschaatsbergen Thanks for the contribution 🎉 👏. |
@ewbankkit. that's great to hear and for sure more contributions will follow. Thanks for adding the touch-ups! |
…NotFound. Acceptance test output: % make testacc TESTS=TestAccEventDataStore_ PKG=cloudtrail ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudtrail/... -v -count 1 -parallel 20 -run='TestAccEventDataStore_' -timeout 180m === RUN TestAccEventDataStore_basic === PAUSE TestAccEventDataStore_basic === RUN TestAccEventDataStore_disappears === PAUSE TestAccEventDataStore_disappears === RUN TestAccEventDataStore_tags === PAUSE TestAccEventDataStore_tags === RUN TestAccEventDataStore_options === PAUSE TestAccEventDataStore_options === RUN TestAccEventDataStore_advancedEventSelector === PAUSE TestAccEventDataStore_advancedEventSelector === CONT TestAccEventDataStore_basic === CONT TestAccEventDataStore_options === CONT TestAccEventDataStore_tags === CONT TestAccEventDataStore_disappears === CONT TestAccEventDataStore_advancedEventSelector === CONT TestAccEventDataStore_options acctest.go:701: this AWS account must be the management account of an AWS Organization --- SKIP: TestAccEventDataStore_options (1.09s) --- PASS: TestAccEventDataStore_disappears (21.03s) --- PASS: TestAccEventDataStore_advancedEventSelector (28.89s) --- PASS: TestAccEventDataStore_tags (49.38s) --- PASS: TestAccEventDataStore_basic (71.26s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudtrail 77.703s
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. |
Community Note
Relates #22434
Output from acceptance testing: