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

Add support for registering new domains via aws_route53domains_registered_domain #37885

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

Conversation

davidmohar
Copy link

@davidmohar davidmohar commented Jun 7, 2024

Description

Adding support to aws_route53domains_registered_domain that would also allow registration of new domains, not just adopting existing ones. PR is keeping the existing "adopt" implementation as well so that we don't introduce any unwanted or breaking changes. The registration itself is also explicit for now to prevent accidents.

Relations

Closes #37670

Testing Registration

Manually tested with the following base configuration:

resource "aws_route53domains_registered_domain" "this" {
  domain_name = "[domain_name]"
  register    = true
  auto_renew  = true

  admin_privacy      = true
  registrant_privacy = true
  tech_privacy       = true

  ...

  timeouts {
    create = "60m"
    update = "60m"
  }
}

New domain gets properly registered with Route53 Domains ✅

Output from Acceptance Testing

% make testacc TESTS=TestAccRoute53Domains PKG=route53domains
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/route53domains/... -v -count 1 -parallel 20 -run='TestAccRoute53Domains'  -timeout 360m
=== RUN   TestAccRoute53Domains_serial
=== PAUSE TestAccRoute53Domains_serial
=== CONT  TestAccRoute53Domains_serial
=== RUN   TestAccRoute53Domains_serial/RegisteredDomain
=== RUN   TestAccRoute53Domains_serial/RegisteredDomain/tags
=== RUN   TestAccRoute53Domains_serial/RegisteredDomain/autoRenew
=== RUN   TestAccRoute53Domains_serial/RegisteredDomain/contacts
=== RUN   TestAccRoute53Domains_serial/RegisteredDomain/contactPrivacy
=== RUN   TestAccRoute53Domains_serial/RegisteredDomain/nameservers
=== RUN   TestAccRoute53Domains_serial/RegisteredDomain/transferLock
=== RUN   TestAccRoute53Domains_serial/RegisteredDomain/createRegisterFails
=== RUN   TestAccRoute53Domains_serial/DelegationSignerRecord
=== RUN   TestAccRoute53Domains_serial/DelegationSignerRecord/basic
=== RUN   TestAccRoute53Domains_serial/DelegationSignerRecord/disappears
--- PASS: TestAccRoute53Domains_serial (725.93s)
    --- PASS: TestAccRoute53Domains_serial/RegisteredDomain (548.47s)
        --- PASS: TestAccRoute53Domains_serial/RegisteredDomain/tags (71.83s)
        --- PASS: TestAccRoute53Domains_serial/RegisteredDomain/autoRenew (48.65s)
        --- PASS: TestAccRoute53Domains_serial/RegisteredDomain/contacts (99.09s)
        --- PASS: TestAccRoute53Domains_serial/RegisteredDomain/contactPrivacy (73.59s)
        --- PASS: TestAccRoute53Domains_serial/RegisteredDomain/nameservers (135.52s)
        --- PASS: TestAccRoute53Domains_serial/RegisteredDomain/transferLock (109.50s)
        --- PASS: TestAccRoute53Domains_serial/RegisteredDomain/createRegisterFails (10.28s)
    --- PASS: TestAccRoute53Domains_serial/DelegationSignerRecord (177.46s)
        --- PASS: TestAccRoute53Domains_serial/DelegationSignerRecord/basic (104.41s)
        --- PASS: TestAccRoute53Domains_serial/DelegationSignerRecord/disappears (73.05s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/route53domains     730.078s

Copy link

github-actions bot commented Jun 7, 2024

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 documentation Introduces or discusses updates to documentation. service/route53domains Issues and PRs that pertain to the route53domains service. size/M Managed by automation to categorize the size of a PR. labels Jun 7, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 7, 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 @davidmohar 👋

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! 😃

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 11, 2024
@davidmohar davidmohar requested a review from a team as a code owner June 26, 2024 14:09
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed size/M Managed by automation to categorize the size of a PR. labels Jun 26, 2024
@davidmohar davidmohar changed the title [WIP] Add support for registering new domains via aws_route53domains_registered_domain Add support for registering new domains via aws_route53domains_registered_domain Jun 26, 2024
@davidmohar davidmohar force-pushed the f-create_route53domains_registered_domain branch from 2caece3 to 786c9b6 Compare August 16, 2024 14:00
@ewbankkit ewbankkit self-assigned this Dec 10, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 10, 2024
% make testacc TESTARGS='-run=TestAccRoute53Domains_serial/^Domain$$' PKG=route53domains
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/route53domains/... -v -count 1 -parallel 20  -run=TestAccRoute53Domains_serial/^Domain$ -timeout 360m -vet=off
2025/01/16 14:09:22 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Domains_serial
=== PAUSE TestAccRoute53Domains_serial
=== CONT  TestAccRoute53Domains_serial
=== RUN   TestAccRoute53Domains_serial/Domain
=== RUN   TestAccRoute53Domains_serial/Domain/basic
    domain_test.go:26: Route 53 dmain registration acceptance test skipped
=== RUN   TestAccRoute53Domains_serial/Domain/disappears
    domain_test.go:65: Route 53 dmain registration acceptance test skipped
=== RUN   TestAccRoute53Domains_serial/Domain/tags
    domain_test.go:91: Route 53 dmain registration acceptance test skipped
--- PASS: TestAccRoute53Domains_serial (0.00s)
    --- PASS: TestAccRoute53Domains_serial/Domain (0.00s)
        --- SKIP: TestAccRoute53Domains_serial/Domain/basic (0.00s)
        --- SKIP: TestAccRoute53Domains_serial/Domain/disappears (0.00s)
        --- SKIP: TestAccRoute53Domains_serial/Domain/tags (0.00s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53domains	5.549s
ewbankkit
ewbankkit previously approved these changes Jan 17, 2025
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=TestAccRoute53ZonesDataSource_' PKG=route53 ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/route53/... -v -count 1 -parallel 3  -run=TestAccRoute53ZonesDataSource_ -timeout 360m -vet=off
2025/01/16 14:17:12 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53ZonesDataSource_basic
=== PAUSE TestAccRoute53ZonesDataSource_basic
=== CONT  TestAccRoute53ZonesDataSource_basic
--- PASS: TestAccRoute53ZonesDataSource_basic (79.71s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53	84.991s
% make testacc TESTARGS='-run=TestAccRoute53Zone_' PKG=route53 ACCTEST_PARALLELISM=3  
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/route53/... -v -count 1 -parallel 3  -run=TestAccRoute53Zone_ -timeout 360m -vet=off
2025/01/16 14:19:52 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Zone_basic
=== PAUSE TestAccRoute53Zone_basic
=== RUN   TestAccRoute53Zone_disappears
=== PAUSE TestAccRoute53Zone_disappears
=== RUN   TestAccRoute53Zone_multiple
=== PAUSE TestAccRoute53Zone_multiple
=== RUN   TestAccRoute53Zone_comment
=== PAUSE TestAccRoute53Zone_comment
=== RUN   TestAccRoute53Zone_delegationSetID
=== PAUSE TestAccRoute53Zone_delegationSetID
=== RUN   TestAccRoute53Zone_forceDestroy
=== PAUSE TestAccRoute53Zone_forceDestroy
=== RUN   TestAccRoute53Zone_ForceDestroy_trailingPeriod
=== PAUSE TestAccRoute53Zone_ForceDestroy_trailingPeriod
=== RUN   TestAccRoute53Zone_tags
=== PAUSE TestAccRoute53Zone_tags
=== RUN   TestAccRoute53Zone_VPC_single
=== PAUSE TestAccRoute53Zone_VPC_single
=== RUN   TestAccRoute53Zone_VPC_multiple
=== PAUSE TestAccRoute53Zone_VPC_multiple
=== RUN   TestAccRoute53Zone_VPC_updates
=== PAUSE TestAccRoute53Zone_VPC_updates
=== RUN   TestAccRoute53Zone_VPC_single_forceDestroy
=== PAUSE TestAccRoute53Zone_VPC_single_forceDestroy
=== RUN   TestAccRoute53Zone_escapedCharacter
=== PAUSE TestAccRoute53Zone_escapedCharacter
=== RUN   TestAccRoute53Zone_classlessDelegation
=== PAUSE TestAccRoute53Zone_classlessDelegation
=== RUN   TestAccRoute53Zone_escapedSlash
=== PAUSE TestAccRoute53Zone_escapedSlash
=== RUN   TestAccRoute53Zone_escapedSpace
=== PAUSE TestAccRoute53Zone_escapedSpace
=== CONT  TestAccRoute53Zone_basic
=== CONT  TestAccRoute53Zone_VPC_single
=== CONT  TestAccRoute53Zone_delegationSetID
--- PASS: TestAccRoute53Zone_basic (86.08s)
=== CONT  TestAccRoute53Zone_tags
--- PASS: TestAccRoute53Zone_delegationSetID (100.92s)
=== CONT  TestAccRoute53Zone_ForceDestroy_trailingPeriod
--- PASS: TestAccRoute53Zone_VPC_single (158.06s)
=== CONT  TestAccRoute53Zone_forceDestroy
--- PASS: TestAccRoute53Zone_tags (103.66s)
=== CONT  TestAccRoute53Zone_escapedCharacter
--- PASS: TestAccRoute53Zone_escapedCharacter (97.87s)
=== CONT  TestAccRoute53Zone_escapedSpace
--- PASS: TestAccRoute53Zone_ForceDestroy_trailingPeriod (240.12s)
=== CONT  TestAccRoute53Zone_escapedSlash
--- PASS: TestAccRoute53Zone_escapedSpace (95.88s)
=== CONT  TestAccRoute53Zone_classlessDelegation
--- PASS: TestAccRoute53Zone_forceDestroy (246.26s)
=== CONT  TestAccRoute53Zone_multiple
=== CONT  TestAccRoute53Zone_comment
--- PASS: TestAccRoute53Zone_escapedSlash (89.23s)
--- PASS: TestAccRoute53Zone_classlessDelegation (80.89s)
=== CONT  TestAccRoute53Zone_disappears
--- PASS: TestAccRoute53Zone_multiple (95.57s)
=== CONT  TestAccRoute53Zone_VPC_single_forceDestroy
--- PASS: TestAccRoute53Zone_comment (91.80s)
=== CONT  TestAccRoute53Zone_VPC_updates
--- PASS: TestAccRoute53Zone_disappears (92.72s)
=== CONT  TestAccRoute53Zone_VPC_multiple
--- PASS: TestAccRoute53Zone_VPC_single_forceDestroy (254.70s)
--- PASS: TestAccRoute53Zone_VPC_multiple (205.14s)
--- PASS: TestAccRoute53Zone_VPC_updates (279.56s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53	806.910s
% make testacc TESTARGS='-run=TestAccRoute53Domains_serial/^Domain$$' PKG=route53domains
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/route53domains/... -v -count 1 -parallel 20  -run=TestAccRoute53Domains_serial/^Domain$ -timeout 360m -vet=off
2025/01/16 15:44:11 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Domains_serial
=== PAUSE TestAccRoute53Domains_serial
=== CONT  TestAccRoute53Domains_serial
=== RUN   TestAccRoute53Domains_serial/Domain
=== RUN   TestAccRoute53Domains_serial/Domain/basic
=== RUN   TestAccRoute53Domains_serial/Domain/disappears
=== RUN   TestAccRoute53Domains_serial/Domain/tags
--- PASS: TestAccRoute53Domains_serial (2172.68s)
    --- PASS: TestAccRoute53Domains_serial/Domain (2172.68s)
        --- PASS: TestAccRoute53Domains_serial/Domain/basic (732.22s)
        --- PASS: TestAccRoute53Domains_serial/Domain/disappears (718.05s)
        --- PASS: TestAccRoute53Domains_serial/Domain/tags (715.74s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53domains	2178.107s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. new-resource Introduces a new resource. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/route53domains Issues and PRs that pertain to the route53domains service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Unable to create new domains via aws_route53domains_registered_domain
3 participants