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/apigateway_domain_name - support for private endpoints #40364

Merged
merged 10 commits into from
Dec 4, 2024

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Nov 29, 2024

Description

Relations

Relates #40274 - there are at least 2 more PRs needed for different resources: 1. base mapping support and 2. domain name association with VPC (new resource)

References

Output from Acceptance Testing

% make testacc TESTS=TestAccAPIGatewayDomainName_  PKG=apigateway

--- PASS: TestAccAPIGatewayDomainName_privatePolicy (15.84s)
--- PASS: TestAccAPIGatewayDomainName_private (15.84s)
--- PASS: TestAccAPIGatewayDomainName_securityPolicy (19.83s)

Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
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 documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/apigateway Issues and PRs that pertain to the apigateway service. needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Nov 29, 2024
@DrFaust92 DrFaust92 added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Nov 29, 2024
@github-actions github-actions bot added the external-maintainer Contribution from a trusted external contributor. label Nov 29, 2024
@DrFaust92 DrFaust92 changed the title r/apigateway_domain_name - support API Gateway custom domain names for private endpoints r/apigateway_domain_name - support for private endpoints Nov 29, 2024
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
@DrFaust92 DrFaust92 marked this pull request as ready for review November 29, 2024 20:15
@DrFaust92 DrFaust92 requested a review from a team as a code owner November 29, 2024 20:15
@ewbankkit ewbankkit self-assigned this Dec 4, 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 4, 2024
ewbankkit
ewbankkit previously approved these changes Dec 4, 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=TestAccAPIGatewayDomainName_\|TestAccAPIGatewayDomainNameDataSource_' PKG=apigateway 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/apigateway/... -v -count 1 -parallel 3  -run=TestAccAPIGatewayDomainName_\|TestAccAPIGatewayDomainNameDataSource_ -timeout 360m
2024/12/04 15:44:39 Initializing Terraform AWS Provider...
=== RUN   TestAccAPIGatewayDomainNameDataSource_tags
=== PAUSE TestAccAPIGatewayDomainNameDataSource_tags
=== RUN   TestAccAPIGatewayDomainNameDataSource_tags_NullMap
=== PAUSE TestAccAPIGatewayDomainNameDataSource_tags_NullMap
=== RUN   TestAccAPIGatewayDomainNameDataSource_tags_EmptyMap
=== PAUSE TestAccAPIGatewayDomainNameDataSource_tags_EmptyMap
=== RUN   TestAccAPIGatewayDomainNameDataSource_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccAPIGatewayDomainNameDataSource_tags_DefaultTags_nonOverlapping
=== RUN   TestAccAPIGatewayDomainNameDataSource_tags_IgnoreTags_Overlap_DefaultTag
=== PAUSE TestAccAPIGatewayDomainNameDataSource_tags_IgnoreTags_Overlap_DefaultTag
=== RUN   TestAccAPIGatewayDomainNameDataSource_tags_IgnoreTags_Overlap_ResourceTag
=== PAUSE TestAccAPIGatewayDomainNameDataSource_tags_IgnoreTags_Overlap_ResourceTag
=== RUN   TestAccAPIGatewayDomainNameDataSource_basic
=== PAUSE TestAccAPIGatewayDomainNameDataSource_basic
=== RUN   TestAccAPIGatewayDomainName_tags
=== PAUSE TestAccAPIGatewayDomainName_tags
=== RUN   TestAccAPIGatewayDomainName_tags_null
=== PAUSE TestAccAPIGatewayDomainName_tags_null
=== RUN   TestAccAPIGatewayDomainName_tags_EmptyMap
=== PAUSE TestAccAPIGatewayDomainName_tags_EmptyMap
=== RUN   TestAccAPIGatewayDomainName_tags_AddOnUpdate
=== PAUSE TestAccAPIGatewayDomainName_tags_AddOnUpdate
=== RUN   TestAccAPIGatewayDomainName_tags_EmptyTag_OnCreate
=== PAUSE TestAccAPIGatewayDomainName_tags_EmptyTag_OnCreate
=== RUN   TestAccAPIGatewayDomainName_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccAPIGatewayDomainName_tags_EmptyTag_OnUpdate_Add
=== RUN   TestAccAPIGatewayDomainName_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccAPIGatewayDomainName_tags_EmptyTag_OnUpdate_Replace
=== RUN   TestAccAPIGatewayDomainName_tags_DefaultTags_providerOnly
=== PAUSE TestAccAPIGatewayDomainName_tags_DefaultTags_providerOnly
=== RUN   TestAccAPIGatewayDomainName_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccAPIGatewayDomainName_tags_DefaultTags_nonOverlapping
=== RUN   TestAccAPIGatewayDomainName_tags_DefaultTags_overlapping
=== PAUSE TestAccAPIGatewayDomainName_tags_DefaultTags_overlapping
=== RUN   TestAccAPIGatewayDomainName_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccAPIGatewayDomainName_tags_DefaultTags_updateToProviderOnly
=== RUN   TestAccAPIGatewayDomainName_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccAPIGatewayDomainName_tags_DefaultTags_updateToResourceOnly
=== RUN   TestAccAPIGatewayDomainName_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccAPIGatewayDomainName_tags_DefaultTags_emptyResourceTag
=== RUN   TestAccAPIGatewayDomainName_tags_DefaultTags_emptyProviderOnlyTag
=== PAUSE TestAccAPIGatewayDomainName_tags_DefaultTags_emptyProviderOnlyTag
=== RUN   TestAccAPIGatewayDomainName_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccAPIGatewayDomainName_tags_DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccAPIGatewayDomainName_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccAPIGatewayDomainName_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccAPIGatewayDomainName_tags_ComputedTag_OnCreate
=== PAUSE TestAccAPIGatewayDomainName_tags_ComputedTag_OnCreate
=== RUN   TestAccAPIGatewayDomainName_tags_ComputedTag_OnUpdate_Add
=== PAUSE TestAccAPIGatewayDomainName_tags_ComputedTag_OnUpdate_Add
=== RUN   TestAccAPIGatewayDomainName_tags_ComputedTag_OnUpdate_Replace
=== PAUSE TestAccAPIGatewayDomainName_tags_ComputedTag_OnUpdate_Replace
=== RUN   TestAccAPIGatewayDomainName_tags_IgnoreTags_Overlap_DefaultTag
=== PAUSE TestAccAPIGatewayDomainName_tags_IgnoreTags_Overlap_DefaultTag
=== RUN   TestAccAPIGatewayDomainName_tags_IgnoreTags_Overlap_ResourceTag
=== PAUSE TestAccAPIGatewayDomainName_tags_IgnoreTags_Overlap_ResourceTag
=== RUN   TestAccAPIGatewayDomainName_certificateARN
    domain_name_test.go:29: Environment variable ACM_CERTIFICATE_ROOT_DOMAIN is not set. For DNS validation requests, this domain must be publicly accessible and configurable via Route53 during the testing. For email validation requests, you must have access to one of the five standard email addresses used (admin|administrator|hostmaster|postmaster|webmaster)@domain or one of the WHOIS contact addresses.
--- SKIP: TestAccAPIGatewayDomainName_certificateARN (0.00s)
=== RUN   TestAccAPIGatewayDomainName_certificateName
    domain_name_test.go:65: Environment variable AWS_API_GATEWAY_DOMAIN_NAME_CERTIFICATE_BODY is not set. This environment variable must be set to any non-empty value with a publicly trusted certificate body to enable the test.
--- SKIP: TestAccAPIGatewayDomainName_certificateName (0.00s)
=== RUN   TestAccAPIGatewayDomainName_regionalCertificateARN
=== PAUSE TestAccAPIGatewayDomainName_regionalCertificateARN
=== RUN   TestAccAPIGatewayDomainName_regionalCertificateName
    domain_name_test.go:161: Environment variable AWS_API_GATEWAY_DOMAIN_NAME_REGIONAL_CERTIFICATE_NAME_ENABLED is not set. This environment variable must be set to any non-empty value in a region where uploading REGIONAL certificates is allowed to enable the test.
--- SKIP: TestAccAPIGatewayDomainName_regionalCertificateName (0.00s)
=== RUN   TestAccAPIGatewayDomainName_securityPolicy
=== PAUSE TestAccAPIGatewayDomainName_securityPolicy
=== RUN   TestAccAPIGatewayDomainName_private
=== PAUSE TestAccAPIGatewayDomainName_private
=== RUN   TestAccAPIGatewayDomainName_privatePolicy
=== PAUSE TestAccAPIGatewayDomainName_privatePolicy
=== RUN   TestAccAPIGatewayDomainName_disappears
=== PAUSE TestAccAPIGatewayDomainName_disappears
=== RUN   TestAccAPIGatewayDomainName_MutualTLSAuthentication_basic
    domain_name_test.go:321: Environment variable ACM_CERTIFICATE_ROOT_DOMAIN is not set. For DNS validation requests, this domain must be publicly accessible and configurable via Route53 during the testing. For email validation requests, you must have access to one of the five standard email addresses used (admin|administrator|hostmaster|postmaster|webmaster)@domain or one of the WHOIS contact addresses.
--- SKIP: TestAccAPIGatewayDomainName_MutualTLSAuthentication_basic (0.00s)
=== RUN   TestAccAPIGatewayDomainName_MutualTLSAuthentication_ownership
    domain_name_test.go:377: Environment variable ACM_CERTIFICATE_ROOT_DOMAIN is not set. For DNS validation requests, this domain must be publicly accessible and configurable via Route53 during the testing. For email validation requests, you must have access to one of the five standard email addresses used (admin|administrator|hostmaster|postmaster|webmaster)@domain or one of the WHOIS contact addresses.
--- SKIP: TestAccAPIGatewayDomainName_MutualTLSAuthentication_ownership (0.00s)
=== RUN   TestAccAPIGatewayDomainName_updateIDFormat
=== PAUSE TestAccAPIGatewayDomainName_updateIDFormat
=== CONT  TestAccAPIGatewayDomainNameDataSource_tags
=== CONT  TestAccAPIGatewayDomainName_tags_DefaultTags_updateToProviderOnly
=== CONT  TestAccAPIGatewayDomainName_tags_IgnoreTags_Overlap_DefaultTag
--- PASS: TestAccAPIGatewayDomainNameDataSource_tags (19.46s)
=== CONT  TestAccAPIGatewayDomainName_tags_DefaultTags_nullNonOverlappingResourceTag
--- PASS: TestAccAPIGatewayDomainName_tags_DefaultTags_nullNonOverlappingResourceTag (56.85s)
=== CONT  TestAccAPIGatewayDomainName_tags_ComputedTag_OnUpdate_Replace
--- PASS: TestAccAPIGatewayDomainName_tags_ComputedTag_OnUpdate_Replace (68.51s)
=== CONT  TestAccAPIGatewayDomainName_tags_ComputedTag_OnUpdate_Add
--- PASS: TestAccAPIGatewayDomainName_tags_DefaultTags_updateToProviderOnly (159.88s)
=== CONT  TestAccAPIGatewayDomainName_tags_ComputedTag_OnCreate
--- PASS: TestAccAPIGatewayDomainName_tags_ComputedTag_OnUpdate_Add (48.43s)
=== CONT  TestAccAPIGatewayDomainName_tags_DefaultTags_emptyProviderOnlyTag
--- PASS: TestAccAPIGatewayDomainName_tags_ComputedTag_OnCreate (89.68s)
=== CONT  TestAccAPIGatewayDomainName_tags_DefaultTags_nullOverlappingResourceTag
--- PASS: TestAccAPIGatewayDomainName_tags_DefaultTags_emptyProviderOnlyTag (70.13s)
=== CONT  TestAccAPIGatewayDomainName_tags_EmptyMap
--- PASS: TestAccAPIGatewayDomainName_tags_DefaultTags_nullOverlappingResourceTag (22.22s)
=== CONT  TestAccAPIGatewayDomainName_tags_DefaultTags_overlapping
--- PASS: TestAccAPIGatewayDomainName_tags_EmptyMap (84.64s)
=== CONT  TestAccAPIGatewayDomainName_tags_DefaultTags_nonOverlapping
--- PASS: TestAccAPIGatewayDomainName_tags_DefaultTags_overlapping (106.15s)
=== CONT  TestAccAPIGatewayDomainName_tags_DefaultTags_providerOnly
--- PASS: TestAccAPIGatewayDomainName_tags_DefaultTags_nonOverlapping (60.98s)
=== CONT  TestAccAPIGatewayDomainName_tags_EmptyTag_OnUpdate_Replace
--- PASS: TestAccAPIGatewayDomainName_tags_DefaultTags_providerOnly (94.74s)
=== CONT  TestAccAPIGatewayDomainName_tags_EmptyTag_OnUpdate_Add
--- PASS: TestAccAPIGatewayDomainName_tags_EmptyTag_OnUpdate_Replace (85.04s)
=== CONT  TestAccAPIGatewayDomainName_tags_EmptyTag_OnCreate
--- PASS: TestAccAPIGatewayDomainName_tags_EmptyTag_OnUpdate_Add (66.82s)
=== CONT  TestAccAPIGatewayDomainName_tags_AddOnUpdate
--- PASS: TestAccAPIGatewayDomainName_tags_EmptyTag_OnCreate (68.96s)
=== CONT  TestAccAPIGatewayDomainName_private
--- PASS: TestAccAPIGatewayDomainName_tags_AddOnUpdate (44.78s)
=== CONT  TestAccAPIGatewayDomainName_updateIDFormat
--- PASS: TestAccAPIGatewayDomainName_tags_IgnoreTags_Overlap_DefaultTag (613.03s)
=== CONT  TestAccAPIGatewayDomainName_disappears
--- PASS: TestAccAPIGatewayDomainName_updateIDFormat (91.55s)
=== CONT  TestAccAPIGatewayDomainName_privatePolicy
--- PASS: TestAccAPIGatewayDomainName_private (132.54s)
=== CONT  TestAccAPIGatewayDomainNameDataSource_tags_IgnoreTags_Overlap_ResourceTag
--- PASS: TestAccAPIGatewayDomainNameDataSource_tags_IgnoreTags_Overlap_ResourceTag (24.30s)
=== CONT  TestAccAPIGatewayDomainName_tags_DefaultTags_emptyResourceTag
--- PASS: TestAccAPIGatewayDomainName_privatePolicy (97.26s)
=== CONT  TestAccAPIGatewayDomainName_tags_null
--- PASS: TestAccAPIGatewayDomainName_tags_DefaultTags_emptyResourceTag (80.52s)
=== CONT  TestAccAPIGatewayDomainName_tags
--- PASS: TestAccAPIGatewayDomainName_tags_null (84.52s)
=== CONT  TestAccAPIGatewayDomainName_tags_DefaultTags_updateToResourceOnly
--- PASS: TestAccAPIGatewayDomainName_disappears (254.09s)
=== CONT  TestAccAPIGatewayDomainNameDataSource_basic
--- PASS: TestAccAPIGatewayDomainName_tags (90.83s)
=== CONT  TestAccAPIGatewayDomainNameDataSource_tags_DefaultTags_nonOverlapping
--- PASS: TestAccAPIGatewayDomainNameDataSource_tags_DefaultTags_nonOverlapping (19.39s)
=== CONT  TestAccAPIGatewayDomainNameDataSource_tags_EmptyMap
--- PASS: TestAccAPIGatewayDomainNameDataSource_basic (89.48s)
=== CONT  TestAccAPIGatewayDomainNameDataSource_tags_IgnoreTags_Overlap_DefaultTag
--- PASS: TestAccAPIGatewayDomainName_tags_DefaultTags_updateToResourceOnly (121.19s)
=== CONT  TestAccAPIGatewayDomainName_regionalCertificateARN
--- PASS: TestAccAPIGatewayDomainNameDataSource_tags_EmptyMap (109.29s)
=== CONT  TestAccAPIGatewayDomainName_securityPolicy
--- PASS: TestAccAPIGatewayDomainName_regionalCertificateARN (67.34s)
=== CONT  TestAccAPIGatewayDomainName_tags_IgnoreTags_Overlap_ResourceTag
--- PASS: TestAccAPIGatewayDomainName_securityPolicy (75.23s)
=== CONT  TestAccAPIGatewayDomainNameDataSource_tags_NullMap
--- PASS: TestAccAPIGatewayDomainNameDataSource_tags_NullMap (18.97s)
--- PASS: TestAccAPIGatewayDomainName_tags_IgnoreTags_Overlap_ResourceTag (70.18s)
--- PASS: TestAccAPIGatewayDomainNameDataSource_tags_IgnoreTags_Overlap_DefaultTag (246.75s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/apigateway	1210.848s

jar-b
jar-b previously approved these changes Dec 4, 2024
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

One suggestion on the new multi-part ID delimiter, but otherwise LGTM 👍

internal/service/apigateway/domain_name.go Outdated Show resolved Hide resolved
@ewbankkit ewbankkit dismissed stale reviews from jar-b and themself via 6e3cbf9 December 4, 2024 21:34
@ewbankkit
Copy link
Contributor

After changed of resource ID separator:

% make testacc TESTARGS='-run=TestAccAPIGatewayDomainName_regionalCertificateARN\|TestAccAPIGatewayDomainName_updateIDFormat\|TestAccAPIGatewayDomainName_private$$' PKG=apigateway
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/apigateway/... -v -count 1 -parallel 20  -run=TestAccAPIGatewayDomainName_regionalCertificateARN\|TestAccAPIGatewayDomainName_updateIDFormat\|TestAccAPIGatewayDomainName_private$ -timeout 360m
2024/12/04 16:43:15 Initializing Terraform AWS Provider...
=== RUN   TestAccAPIGatewayDomainName_regionalCertificateARN
=== PAUSE TestAccAPIGatewayDomainName_regionalCertificateARN
=== RUN   TestAccAPIGatewayDomainName_private
=== PAUSE TestAccAPIGatewayDomainName_private
=== RUN   TestAccAPIGatewayDomainName_updateIDFormat
=== PAUSE TestAccAPIGatewayDomainName_updateIDFormat
=== CONT  TestAccAPIGatewayDomainName_regionalCertificateARN
=== CONT  TestAccAPIGatewayDomainName_updateIDFormat
=== CONT  TestAccAPIGatewayDomainName_private
--- PASS: TestAccAPIGatewayDomainName_regionalCertificateARN (20.69s)
--- PASS: TestAccAPIGatewayDomainName_private (62.89s)
--- PASS: TestAccAPIGatewayDomainName_updateIDFormat (145.97s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/apigateway	151.637s

@ewbankkit ewbankkit merged commit 7dbb951 into hashicorp:main Dec 4, 2024
41 checks passed
@ewbankkit
Copy link
Contributor

@DrFaust92 Thanks for the contribution 🎉 👏.

@github-actions github-actions bot added this to the v5.81.0 milestone Dec 4, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 12, 2024
Copy link

This functionality has been released in v5.81.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. external-maintainer Contribution from a trusted external contributor. service/apigateway Issues and PRs that pertain to the apigateway service. 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.

3 participants