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

Unexpected diffs on aws_ses_event_destination as of v2.63.0 #13464

Closed
tdmalone opened this issue May 22, 2020 · 7 comments · Fixed by #13466
Closed

Unexpected diffs on aws_ses_event_destination as of v2.63.0 #13464

tdmalone opened this issue May 22, 2020 · 7 comments · Fixed by #13466
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/ses Issues and PRs that pertain to the ses service.
Milestone

Comments

@tdmalone
Copy link
Contributor

tdmalone commented May 22, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.14
+ provider.aws v2.63.0

Affected Resource(s)

  • aws_ses_event_destination

Terraform Configuration Files

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}"
  }
}

Expected Behavior

No diff should be generated.

Actual Behavior

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)

References

There's nothing in the CHANGELOG for v2.63.0 about this, but looking at the commit diff, I think it's caused by #13344, which is part of #9956

@ghost ghost added the service/ses Issues and PRs that pertain to the ses service. label May 22, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label May 22, 2020
@ewbankkit
Copy link
Contributor

@tdmalone Thanks for raising this issue.
It may be that this is caused by the fact that the resourceAwsSesEventDestinationRead() function

https://github.com/terraform-providers/terraform-provider-aws/blob/2cc9c47a4f152c250609a88351dd72da3c2368e8/aws/resource_aws_ses_event_destination.go#L188-L191

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.

@tdmalone
Copy link
Contributor Author

@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?

@tdmalone
Copy link
Contributor Author

tdmalone commented May 23, 2020

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.

@ewbankkit
Copy link
Contributor

Not for the faint of heart, but you could also manipulate the state file.

@bflad bflad added bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels May 26, 2020
@bflad bflad added this to the v2.64.0 milestone May 26, 2020
@bflad
Copy link
Contributor

bflad commented May 26, 2020

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. 👍

bflad added a commit that referenced this issue May 26, 2020
@ghost
Copy link

ghost commented May 29, 2020

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!

@ghost
Copy link

ghost commented Jun 25, 2020

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!

@ghost ghost locked and limited conversation to collaborators Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/ses Issues and PRs that pertain to the ses service.
Projects
None yet
3 participants