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

[Bug]: SESv2: aws_sesv2_configuration_set does not allow empty list for suppressed_reasons to disable suppression list #28669

Closed
F21 opened this issue Jan 4, 2023 · 7 comments · Fixed by #29671
Assignees
Labels
bug Addresses a defect in current functionality. service/sesv2 Issues and PRs that pertain to the sesv2 service.
Milestone

Comments

@F21
Copy link
Contributor

F21 commented Jan 4, 2023

Terraform Core Version

1.3.6

AWS Provider Version

4.48.0

Affected Resource(s)

aws_sesv2_configuration_set

Expected Behavior

Using the following configuration for the resource should allow a configuration set with the suppression list disabled to be created:

resource "aws_sesv2_configuration_set" "example" {
  configuration_set_name = "example"

  suppression_options {
    suppressed_reasons = []
  }
}

Actual Behavior

The resource could not be created, because it expects at least one of BOUNCE and or COMPLAINT in the suppressed_reasons attribute

Relevant Error/Panic Output Snippet

│ Error: Not enough list items
│
│   with aws_sesv2_configuration_set.test,
│   on main.tf line 21, in resource "aws_sesv2_configuration_set" "test":
│   21:     suppressed_reasons = []
│
│ Attribute suppression_options.0.suppressed_reasons requires 1 item minimum, but config has only 0 declared.


### Terraform Configuration Files

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.0"
    }
  }
}

# Configure the AWS Provider
provider "aws" {
  region = "us-east-1"
  access_key = var.access_key
  secret_key = var.secret_key
}

resource "aws_sesv2_configuration_set" "test" {
  configuration_set_name = "example"

  suppression_options {
    suppressed_reasons = []
  }
}

### Steps to Reproduce

Run `terraform apply` with the above configuration file.

### Debug Output

https://gist.github.com/F21/7ce1daa2846d55827d6e19664fcdc0df

### Panic Output

_No response_

### Important Factoids

_No response_

### References

https://github.com/hashicorp/terraform-provider-aws/issues/26796

### Would you like to implement a fix?

None
@F21 F21 added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Jan 4, 2023

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/sesv2 Issues and PRs that pertain to the sesv2 service. label Jan 4, 2023
@bschaatsbergen
Copy link
Member

Thanks for taking the time to raise this issue @F21, have you tried creating a configuration set without the entire suppression_options attribute block?

resource "aws_sesv2_configuration_set" "example" {
  configuration_set_name = "example"
}

By quickly looking over the provider code it seems that if you specify the argument block, it's expected that you also put something into it, instead of declaring an empty list.

Is there some default value being set by the AWS API if you don't specify an empty list?

@bschaatsbergen bschaatsbergen removed the needs-triage Waiting for first response or review from a maintainer. label Jan 4, 2023
@bschaatsbergen bschaatsbergen self-assigned this Jan 4, 2023
@F21
Copy link
Contributor Author

F21 commented Jan 4, 2023

@bschaatsbergen

If I omit the suppression_options block, the created configuration set uses the account's suppression settings. The AWS API allows the following suppression_reasons for overriding the account's suppression list settings (I confirmed this using aws-go-sdk-v2):

  • Empty list ([]): Disable the suppression list for the configuration set
  • Bounces (["BOUNCE"]): Add only bounces to the suppression list for the configuration set
  • Complaints (["COMPLAINT"]): Add only complaints to the suppression list for the configuration set
  • Complaints and bounces (["BOUNCE", "COMPLAINT"]) Add both bounces and complaints to the suppression list for the configuration set.

@bschaatsbergen
Copy link
Member

Thanks for that @F21, that's very useful 👍

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.67.0 milestone Sep 11, 2024
Copy link

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

Copy link

I'm going to lock this issue 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 similar to this, 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 Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.