hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.84k stars 9.19k forks source link

[Enhancement]: Add matching types `deliveryDelay` and `subscription` to SES EventDestination #33983

Open Jimmy89 opened 1 year ago

Jimmy89 commented 1 year ago

Description

SES Event destinations have multiple matching types. However, the types deliveryDelay and subscription are not programmed in the resource information of the SES EventDestination terraform resource, while they are available (through CLI/API)

You can find them in the AWS CloudFormation documentation:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-configurationseteventdestination-eventdestination.html#cfn-ses-configurationseteventdestination-eventdestination-matchingeventtypes

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "aws_ses_event_destination" "sns" {
  name                   = "event-destination-sns"
  configuration_set_name = aws_ses_configuration_set.example.name
  enabled                = true
  matching_types         = ["deliveryDelay", "subscription"]

  sns_destination {
    topic_arn = aws_sns_topic.example.arn
  }
}

References

Would you like to implement a fix?

No

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

danquack commented 1 year ago

The types are defined from the sdk. I also don't see it in the v2 sdk, so not sure I migration to v2 would work either. This may require some upstream change?

Jimmy89 commented 1 year ago

Thank you @danquack, I created a ticket in the v2 sdk repo (https://github.com/aws/aws-sdk-go-v2/issues/2342)

Jimmy89 commented 1 year ago

@danquack AWS has responded to my ticket: https://github.com/aws/aws-sdk-go-v2/issues/2342#issuecomment-1798677810

I hope this helps you

danquack commented 1 year ago

Their response is to use the ses-v2. This particular resource is for ses, I wonder if maybe we need to add this resource to #26796? By chance could you use https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sesv2_configuration_set_event_destination instead?

Jimmy89 commented 1 year ago

Unfortunately, I use Pulumi aws (classic) package for all my infra-as-code, which uses the v1 of the ses event destination. The aws-native package of Pulumi uses AWS Cloud API, which uses v2. However, that one has an active issue (https://github.com/pulumi/pulumi-aws-native/issues/1139) where the resource is created but not registered as one (and therefore my infra-as-code fails)