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_amplify_domain_association.certificate_settings panic, diff and validation fixes #40351

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

taraspos
Copy link

@taraspos taraspos commented Nov 28, 2024

Description

Fixing multiple issue with Amplify Domains:

Relations

Closes #39890
Closes #38387
Closes #38410

Output from Acceptance Testing

Seems like those tests were not run in a long time because of extra AMPLIFY_DOMAIN_NAME env variable needed. For example they were skipped in: #37105.

One test doesn't work because it tries to update domain without actually waiting for DNS/Certificate propagation to complete.

Error: updating Amplify Domain Association (): operation error Amplify: UpdateDomainAssociation, https response error StatusCode: 400, RequestID: 4f8e870f-e1d4-460b-8058-4c142862092b, BadRequestException: You cannot update a domain association while the certificate is updating. Try again once the ongoing update has completed.


AMPLIFY_DOMAIN_NAME=<redacted> make testacc TESTS=TestAccAmplify_serial/DomainAssociation PKG=amplify
2024/11/28 17:43:45 Initializing Terraform AWS Provider...
=== RUN   TestAccAmplify_serial
=== PAUSE TestAccAmplify_serial
=== CONT  TestAccAmplify_serial
=== RUN   TestAccAmplify_serial/DomainAssociation
=== RUN   TestAccAmplify_serial/DomainAssociation/disappears
=== RUN   TestAccAmplify_serial/DomainAssociation/update
    domain_association_test.go:112: Step 3/3 error: Error running apply: exit status 1
        
        Error: updating Amplify Domain Association (<REDACED>): operation error Amplify: UpdateDomainAssociation, https response error StatusCode: 400, RequestID: 4f8e870f-e1d4-460b-8058-4c142862092b, BadRequestException: You cannot update a domain association while the certificate is updating. Try again once the ongoing update has completed.
        
          with aws_amplify_domain_association.test,
          on terraform_plugin_test.tf line 26, in resource "aws_amplify_domain_association" "test":
          26: resource "aws_amplify_domain_association" "test" {
        
=== RUN   TestAccAmplify_serial/DomainAssociation/basic
=== RUN   TestAccAmplify_serial/DomainAssociation/certificateSettings

--- FAIL: TestAccAmplify_serial (929.78s)
    --- FAIL: TestAccAmplify_serial/DomainAssociation (929.78s)
        --- PASS: TestAccAmplify_serial/DomainAssociation/disappears (295.69s)
        --- FAIL: TestAccAmplify_serial/DomainAssociation/update (42.26s)
        --- PASS: TestAccAmplify_serial/DomainAssociation/basic (295.70s)
        --- PASS: TestAccAmplify_serial/DomainAssociation/certificateSettings (296.13s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/amplify    937.268s
FAIL

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 tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/amplify Issues and PRs that pertain to the amplify service. needs-triage Waiting for first response or review from a maintainer. labels Nov 28, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @taraspos 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@taraspos taraspos marked this pull request as ready for review November 28, 2024 18:04
@taraspos taraspos requested a review from a team as a code owner November 28, 2024 18:04
@taraspos taraspos changed the title [Amplify] fix panic when updating certificate_settings [Amplify] certificate_settings panic, diff and validation fixes Nov 28, 2024
@taraspos taraspos changed the title [Amplify] certificate_settings panic, diff and validation fixes fix(aws_amplify_domain_association.certificate_settings) panic, diff and validation fixes Nov 28, 2024
@taraspos taraspos changed the title fix(aws_amplify_domain_association.certificate_settings) panic, diff and validation fixes r/aws_amplify_domain_association.certificate_settings panic, diff and validation fixes Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Waiting for first response or review from a maintainer. service/amplify Issues and PRs that pertain to the amplify service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
1 participant