-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
New Resource aws_sesv2_dedicated_ip_assignment
#27361
Conversation
Community NoteVoting for Prioritization
For Submitters
|
a68f7fe
to
03a49b7
Compare
"destination_pool_name": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opted for ForceNew
here, even though technically the IP could be moved via an update. This felt cleaner for the case where a config like the following has a pool_name
change:
resource "aws_sesv2_dedicated_ip_pool" "test" {
pool_name = "my-pool" # ex. change to my-pool2
}
resource "aws_sesv2_dedicated_ip_assignment" "test" {
ip = "0.0.0.0"
destination_pool_name = aws_sesv2_dedicated_ip_pool.test.pool_name
}
Without ForceNew
:
apply
attempts to deleteaws_sesv2_dedicated_ip_pool.test
first, but fails because the pool isn't empty. This is resolved by a two-step apply. First, removing the assignment resource and applying to destroy it. Then the pool name can be updated and the assignment safely added back.- Adding logic to the dedicated IP pool destroy function to empty it first can't be done safely because it will cause a state change for assignment resources mid-apply.
With ForceNew
:
- Both resources are destroyed and re-created with no side effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc PKG=sesv2 TESTS="TestAccSESV2DedicatedIPAssignment_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sesv2/... -v -count 1 -parallel 20 -run='TestAccSESV2DedicatedIPAssignment_' -timeout 180m
=== RUN TestAccSESV2DedicatedIPAssignment_serial
=== RUN TestAccSESV2DedicatedIPAssignment_serial/basic
dedicated_ip_assignment_test.go:37: Environment variable SES_DEDICATED_IP is not set
=== RUN TestAccSESV2DedicatedIPAssignment_serial/disappears
dedicated_ip_assignment_test.go:69: Environment variable SES_DEDICATED_IP is not set
--- PASS: TestAccSESV2DedicatedIPAssignment_serial (0.00s)
--- SKIP: TestAccSESV2DedicatedIPAssignment_serial/basic (0.00s)
--- SKIP: TestAccSESV2DedicatedIPAssignment_serial/disappears (0.00s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/sesv2 4.482s
03a49b7
to
c7729d6
Compare
This functionality has been released in v4.37.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! |
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. |
Description
This resource will manage assignment of "standard" SES dedicated IP addresses to a dedicated IP pool.
Relations
Relates #26796
References
Requesting a dedicated IP address from AWS
https://docs.aws.amazon.com/ses/latest/dg/dedicated-ip-case.html
Bring your own IP address
https://docs.aws.amazon.com/ses/latest/dg/dedicated-ip-byo.html
Default IP pool
ses-default-dedicated-ip-pool
https://docs.aws.amazon.com/ses/latest/dg/managing-ip-pools.html
Output from Acceptance Testing