Terraform v0.11.14
+ provider.aws v2.63.0
resource "aws_ses_event_destination" "sns-static-ip" {
name = "event-destination-sns-static-ip${local.name_suffix}"
configuration_set_name = "${aws_ses_configuration_set.config_set_static_ip.name}"
enabled = true
matching_types = ["bounce", "complaint", "delivery"]
sns_destination {
topic_arn = "${aws_sns_topic.mail_feedback_topic.arn}"
}
}
No diff should be generated.
A diff after upgrading to v2.63.0, released today:
~ aws_ses_event_destination.sns-static-ip
sns_destination.0.topic_arn: "" => "arn:aws:sns:ap-southeast-2:xxxxx:portalmail-feedback-prod"
(the event destination is still set in AWS - we haven't touched this resource for some time, and the diff was generated by CI today after upgrading the provider, where the same run yesterday generated no diff)
There's nothing in the CHANGELOG for v2.63.0 about this, but looking at the commit diff, I think it's caused by https://github.com/terraform-providers/terraform-provider-aws/pull/13344, which is part of https://github.com/terraform-providers/terraform-provider-aws/issues/9956
@tdmalone Thanks for raising this issue.
It may be that this is caused by the fact that the resourceAwsSesEventDestinationRead() function
doesn't actually read the resource back 😄.
Usually when the schema changes slightly, such as in the linked change, the resource's Read function run during terraform plan (or the first part of terraform apply) will overwrite the schema read from state and all would look fine. That doesn't happen for this resource and hence the visible diff.
The SES DescribeConfigurationSet API with the eventDestinations option set should return the relevant event destination.
@ewbankkit Thanks for looking into it so quickly, and for prepping a patch! That makes sense.
It sounds like a quick fix then would be applying these changes, which would result in no functional change but which should correct the state?
Actually - it looks like the resource doesn't support updating either:
Error: Error applying plan:
1 error occurred:
* aws_ses_event_destination.sns-static-ip: 1 error occurred:
* aws_ses_event_destination.sns-static-ip: doesn't support update
I've worked around this for now by tainting and re-applying.
Not for the faint of heart, but you could also manipulate the state file.
The fix for this has been merged and will release with version 2.64.0 of the Terraform AWS Provider, later this week. Thanks to @ewbankkit for the quick implementation. 👍
This has been released in version 2.64.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 for triage. Thanks!
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!