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_ses_configuration_set: reflect tracking_options in state #35056

Conversation

kamilturek
Copy link
Collaborator

@kamilturek kamilturek commented Dec 22, 2023

Description

This PR fixes a bug that caused omitting tracking_options from aws_ses_configuration_set state and resulted in persistent diff.

No acceptance tests added/updated as this functionality is best-effort. Tests would require a verified SES domain identity. Please see:

// TestAccSESConfigurationSet_trackingOptions requires a verified domain
// which poses a problem for testing.

Performed manual test instead:

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

provider "aws" {
  region = "eu-central-1"
}

variable "domain" {
  type = string
}

resource "aws_route53_zone" "this" {
  name = var.domain
}

resource "aws_ses_domain_identity" "this" {
  domain = var.domain
}

resource "aws_ses_domain_dkim" "this" {
  domain = aws_ses_domain_identity.this.domain
}

resource "aws_route53_record" "dkim_record" {
  count   = 3
  zone_id = aws_route53_zone.this.zone_id
  name    = "${aws_ses_domain_dkim.this.dkim_tokens[count.index]}._domainkey"
  type    = "CNAME"
  ttl     = "600"
  records = ["${aws_ses_domain_dkim.this.dkim_tokens[count.index]}.dkim.amazonses.com"]
}

resource "aws_ses_configuration_set" "this" {
  name  = "some-configuration-set-test"

  tracking_options {
    custom_redirect_domain = var.domain
  }
}

Relations

Closes #26229.

Output from Acceptance Testing

% make testacc TESTARGS="-run=TestAccSESConfigurationSet_" PKG=ses 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ses/... -v -count 1 -parallel 20  -run=TestAccSESConfigurationSet_ -timeout 360m
=== RUN   TestAccSESConfigurationSet_basic
=== PAUSE TestAccSESConfigurationSet_basic
=== RUN   TestAccSESConfigurationSet_sendingEnabled
=== PAUSE TestAccSESConfigurationSet_sendingEnabled
=== RUN   TestAccSESConfigurationSet_reputationMetricsEnabled
=== PAUSE TestAccSESConfigurationSet_reputationMetricsEnabled
=== RUN   TestAccSESConfigurationSet_deliveryOptions
=== PAUSE TestAccSESConfigurationSet_deliveryOptions
=== RUN   TestAccSESConfigurationSet_Update_deliveryOptions
=== PAUSE TestAccSESConfigurationSet_Update_deliveryOptions
=== RUN   TestAccSESConfigurationSet_emptyDeliveryOptions
=== PAUSE TestAccSESConfigurationSet_emptyDeliveryOptions
=== RUN   TestAccSESConfigurationSet_Update_emptyDeliveryOptions
=== PAUSE TestAccSESConfigurationSet_Update_emptyDeliveryOptions
=== RUN   TestAccSESConfigurationSet_disappears
=== PAUSE TestAccSESConfigurationSet_disappears
=== CONT  TestAccSESConfigurationSet_basic
=== CONT  TestAccSESConfigurationSet_Update_deliveryOptions
=== CONT  TestAccSESConfigurationSet_disappears
=== CONT  TestAccSESConfigurationSet_reputationMetricsEnabled
=== CONT  TestAccSESConfigurationSet_deliveryOptions
=== CONT  TestAccSESConfigurationSet_emptyDeliveryOptions
=== CONT  TestAccSESConfigurationSet_sendingEnabled
=== CONT  TestAccSESConfigurationSet_Update_emptyDeliveryOptions
--- PASS: TestAccSESConfigurationSet_disappears (70.23s)
--- PASS: TestAccSESConfigurationSet_emptyDeliveryOptions (80.14s)
--- PASS: TestAccSESConfigurationSet_deliveryOptions (84.93s)
--- PASS: TestAccSESConfigurationSet_basic (85.04s)
--- PASS: TestAccSESConfigurationSet_sendingEnabled (152.32s)
--- PASS: TestAccSESConfigurationSet_reputationMetricsEnabled (153.95s)
--- PASS: TestAccSESConfigurationSet_Update_emptyDeliveryOptions (159.98s)
--- PASS: TestAccSESConfigurationSet_Update_deliveryOptions (187.10s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ses        189.370s

Copy link

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/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/ses Issues and PRs that pertain to the ses service. labels Dec 22, 2023
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Dec 22, 2023
@kamilturek kamilturek marked this pull request as ready for review December 22, 2023 22:36
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jan 2, 2024
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccSESConfigurationSet_basic' PKG=ses
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ses/... -v -count 1 -parallel 20  -run=TestAccSESConfigurationSet_basic -timeout 360m
=== RUN   TestAccSESConfigurationSet_basic
=== PAUSE TestAccSESConfigurationSet_basic
=== CONT  TestAccSESConfigurationSet_basic
--- PASS: TestAccSESConfigurationSet_basic (38.65s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ses	45.294s

@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Jan 2, 2024
@ewbankkit
Copy link
Contributor

@kamilturek Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit e4f62a0 into hashicorp:main Jan 2, 2024
68 checks passed
@github-actions github-actions bot added this to the v5.32.0 milestone Jan 2, 2024
Copy link

This functionality has been released in v5.32.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 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 Feb 13, 2024
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. documentation Introduces or discusses updates to documentation. external-maintainer Contribution from a trusted external contributor. service/ses Issues and PRs that pertain to the ses service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_ses_configuration_set state doesn't reflect tracking_options
2 participants