Skip to content
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_sesv2_configuration_set: new resource #27056

Merged
merged 16 commits into from
Oct 14, 2022

Conversation

kamilturek
Copy link
Collaborator

@kamilturek kamilturek commented Oct 2, 2022

Description

This PR adds the aws_sesv2_configuration_set resource.

Relations

Relates #26796.

References

https://docs.aws.amazon.com/ses/latest/APIReference-V2/Welcome.html

Output from Acceptance Testing

$ make testacc PKG=sesv2 TESTS="TestAccSESV2ConfigurationSet_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sesv2/... -v -count 1 -parallel 20 -run='TestAccSESV2ConfigurationSet_'  -timeout 180m
=== RUN   TestAccSESV2ConfigurationSet_basic
=== PAUSE TestAccSESV2ConfigurationSet_basic
=== RUN   TestAccSESV2ConfigurationSet_disappears
=== PAUSE TestAccSESV2ConfigurationSet_disappears
=== RUN   TestAccSESV2ConfigurationSet_tlsPolicy
=== PAUSE TestAccSESV2ConfigurationSet_tlsPolicy
=== RUN   TestAccSESV2ConfigurationSet_reputationMetricsEnabled
=== PAUSE TestAccSESV2ConfigurationSet_reputationMetricsEnabled
=== RUN   TestAccSESV2ConfigurationSet_sendingEnabled
=== PAUSE TestAccSESV2ConfigurationSet_sendingEnabled
=== RUN   TestAccSESV2ConfigurationSet_suppressedReasons
=== PAUSE TestAccSESV2ConfigurationSet_suppressedReasons
=== RUN   TestAccSESV2ConfigurationSet_tags
=== PAUSE TestAccSESV2ConfigurationSet_tags
=== CONT  TestAccSESV2ConfigurationSet_basic
=== CONT  TestAccSESV2ConfigurationSet_sendingEnabled
=== CONT  TestAccSESV2ConfigurationSet_tags
=== CONT  TestAccSESV2ConfigurationSet_suppressedReasons
=== CONT  TestAccSESV2ConfigurationSet_disappears
=== CONT  TestAccSESV2ConfigurationSet_tlsPolicy
=== CONT  TestAccSESV2ConfigurationSet_reputationMetricsEnabled
--- PASS: TestAccSESV2ConfigurationSet_disappears (23.22s)
--- PASS: TestAccSESV2ConfigurationSet_basic (30.96s)
--- PASS: TestAccSESV2ConfigurationSet_reputationMetricsEnabled (51.09s)
--- PASS: TestAccSESV2ConfigurationSet_suppressedReasons (51.16s)
--- PASS: TestAccSESV2ConfigurationSet_sendingEnabled (51.63s)
--- PASS: TestAccSESV2ConfigurationSet_tlsPolicy (51.74s)
--- PASS: TestAccSESV2ConfigurationSet_tags (67.80s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sesv2      69.548s

@github-actions
Copy link

github-actions bot commented Oct 2, 2022

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. generators Relates to code generators. provider Pertains to the provider itself, rather than any interaction with AWS. needs-triage Waiting for first response or review from a maintainer. service/sesv2 Issues and PRs that pertain to the sesv2 service. tags Pertains to resource tagging. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 2, 2022
@kamilturek kamilturek changed the title F aws sesv2 configuration set r/aws_sesv2_configuration_set: new resource Oct 2, 2022
@kamilturek kamilturek marked this pull request as ready for review October 4, 2022 17:58
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Oct 5, 2022
@ewbankkit
Copy link
Contributor

@kamilturek When testing I keep getting these errors:

% make testacc TESTARGS='-run=TestAccSESV2ConfigurationSet_basic' PKG=sesv2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sesv2/... -v -count 1 -parallel 3  -run=TestAccSESV2ConfigurationSet_basic -timeout 180m
=== RUN   TestAccSESV2ConfigurationSet_basic
=== PAUSE TestAccSESV2ConfigurationSet_basic
=== CONT  TestAccSESV2ConfigurationSet_basic
    configuration_set_test.go:25: Step 1/2 error: Error running apply: exit status 1
        
        Error: reading Amazon SESv2 (Simple Email V2) Configuration Set (tf-acc-test-6907488776219186461): operation error SESv2: ListTagsForResource, exceeded maximum number of attempts, 25, https response error StatusCode: 500, RequestID: cf63abf4-e8f1-405b-840b-c15a64987e8a, api error InternalFailure: UnknownError
        
          with aws_sesv2_configuration_set.test,
          on terraform_plugin_test.tf line 2, in resource "aws_sesv2_configuration_set" "test":
           2: resource "aws_sesv2_configuration_set" "test" {
        
--- FAIL: TestAccSESV2ConfigurationSet_basic (430.85s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/sesv2	434.772s
FAIL
make: *** [testacc] Error 1

@kamilturek
Copy link
Collaborator Author

Hey @ewbankkit, really weird. I just tried again and it passes for me.

$ make testacc TESTARGS='-run=TestAccSESV2ConfigurationSet_basic' PKG=sesv2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sesv2/... -v -count 1 -parallel 3  -run=TestAccSESV2ConfigurationSet_basic -timeout 180m
=== RUN   TestAccSESV2ConfigurationSet_basic
=== PAUSE TestAccSESV2ConfigurationSet_basic
=== CONT  TestAccSESV2ConfigurationSet_basic
--- PASS: TestAccSESV2ConfigurationSet_basic (37.09s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sesv2      38.829s

From the error you got looks like it was an internal error on AWS side. Can you please try running these tests again?

@breathingdust breathingdust added new-resource Introduces a new resource. and removed documentation Introduces or discusses updates to documentation. labels Oct 11, 2022
@kamilturek
Copy link
Collaborator Author

Hey @ewbankkit, do you have any updates? Let me know if there's anything I can do to resolve the issues 👍

@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Oct 14, 2022
@jar-b
Copy link
Member

jar-b commented Oct 14, 2022

Hey @kamilturek - this looks great. Just made a couple small changes:

  • added changelog entry
  • changed the ARN generation to use ses instead of sesv2. The SES V2 IAM docs use the former in the configuration_set ARN format, and it resolved acceptance test errors Kit and I were observing.
$ aws sesv2 list-tags-for-resource --resource-arn arn:aws:sesv2:us-west-2:012345678901:configuration-set/jb-test

An error occurred (InternalFailure) when calling the ListTagsForResource operation (reached max retries: 2): None

$ aws sesv2 list-tags-for-resource --resource-arn arn:aws:ses:us-west-2:012345678901:configuration-set/jb-test
{
    "Tags": []
}

@jar-b
Copy link
Member

jar-b commented Oct 14, 2022

make testacc PKG=sesv2 TESTS="TestAccSESV2ConfigurationSet_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sesv2/... -v -count 1 -parallel 20 -run='TestAccSESV2ConfigurationSet_'  -timeout 180m
=== RUN   TestAccSESV2ConfigurationSet_basic
=== PAUSE TestAccSESV2ConfigurationSet_basic
=== RUN   TestAccSESV2ConfigurationSet_disappears
=== PAUSE TestAccSESV2ConfigurationSet_disappears
=== RUN   TestAccSESV2ConfigurationSet_tlsPolicy
=== PAUSE TestAccSESV2ConfigurationSet_tlsPolicy
=== RUN   TestAccSESV2ConfigurationSet_reputationMetricsEnabled
=== PAUSE TestAccSESV2ConfigurationSet_reputationMetricsEnabled
=== RUN   TestAccSESV2ConfigurationSet_sendingEnabled
=== PAUSE TestAccSESV2ConfigurationSet_sendingEnabled
=== RUN   TestAccSESV2ConfigurationSet_suppressedReasons
=== PAUSE TestAccSESV2ConfigurationSet_suppressedReasons
=== RUN   TestAccSESV2ConfigurationSet_tags
=== PAUSE TestAccSESV2ConfigurationSet_tags
=== CONT  TestAccSESV2ConfigurationSet_basic
=== CONT  TestAccSESV2ConfigurationSet_sendingEnabled
=== CONT  TestAccSESV2ConfigurationSet_tlsPolicy
=== CONT  TestAccSESV2ConfigurationSet_disappears
=== CONT  TestAccSESV2ConfigurationSet_tags
=== CONT  TestAccSESV2ConfigurationSet_suppressedReasons
=== CONT  TestAccSESV2ConfigurationSet_reputationMetricsEnabled
--- PASS: TestAccSESV2ConfigurationSet_disappears (14.49s)
--- PASS: TestAccSESV2ConfigurationSet_basic (19.43s)
--- PASS: TestAccSESV2ConfigurationSet_suppressedReasons (30.76s)
--- PASS: TestAccSESV2ConfigurationSet_sendingEnabled (30.95s)
--- PASS: TestAccSESV2ConfigurationSet_tlsPolicy (31.07s)
--- PASS: TestAccSESV2ConfigurationSet_reputationMetricsEnabled (31.09s)
--- PASS: TestAccSESV2ConfigurationSet_tags (42.00s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sesv2      44.613s

@kamilturek
Copy link
Collaborator Author

Hey @jar-b. Perfect, many thanks for handling that! 🙌

Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for your contribution! 🚀

@jar-b jar-b merged commit 5d9122f into hashicorp:main Oct 14, 2022
@github-actions github-actions bot added this to the v4.35.0 milestone Oct 14, 2022
@kamilturek kamilturek deleted the f-aws-sesv2-configuration-set branch October 14, 2022 17:46
@jar-b jar-b linked an issue Oct 17, 2022 that may be closed by this pull request
@github-actions
Copy link

This functionality has been released in v4.35.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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. generators Relates to code generators. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/sesv2 Issues and PRs that pertain to the sesv2 service. size/XL Managed by automation to categorize the size of a PR. tags Pertains to resource tagging. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to specify suppression options on SES configuration set
4 participants