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

resource/aws_acmpca_certificate: Add api_passthrough argument #28142

Merged

Conversation

StupidScience
Copy link
Contributor

@StupidScience StupidScience commented Dec 2, 2022

Description

This PR add support for APIPassthrough argument for aws_acmpca_certificate resource that can be provided for certain templates.

Relations

Closes #25520

References

https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaIssueCert.html
https://docs.aws.amazon.com/acm-pca/latest/userguide/JavaApi-CustomExtensions.html#Sub_CA_NameConstraints

Output from Acceptance Testing

make testacc TESTS=TestAccACMPCACertificate PKG=acmpca
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/acmpca/... -v -count 1 -parallel 20 -run='TestAccACMPCACertificate'  -timeout 180m
=== RUN   TestAccACMPCACertificateAuthorityCertificate_rootCA
=== PAUSE TestAccACMPCACertificateAuthorityCertificate_rootCA
=== RUN   TestAccACMPCACertificateAuthorityCertificate_updateRootCA
=== PAUSE TestAccACMPCACertificateAuthorityCertificate_updateRootCA
=== RUN   TestAccACMPCACertificateAuthorityCertificate_subordinateCA
=== PAUSE TestAccACMPCACertificateAuthorityCertificate_subordinateCA
=== RUN   TestAccACMPCACertificateAuthorityDataSource_basic
=== PAUSE TestAccACMPCACertificateAuthorityDataSource_basic
=== RUN   TestAccACMPCACertificateAuthorityDataSource_s3ObjectACL
=== PAUSE TestAccACMPCACertificateAuthorityDataSource_s3ObjectACL
=== RUN   TestAccACMPCACertificateAuthority_basic
=== PAUSE TestAccACMPCACertificateAuthority_basic
=== RUN   TestAccACMPCACertificateAuthority_disappears
=== PAUSE TestAccACMPCACertificateAuthority_disappears
=== RUN   TestAccACMPCACertificateAuthority_enabledDeprecated
=== PAUSE TestAccACMPCACertificateAuthority_enabledDeprecated
=== RUN   TestAccACMPCACertificateAuthority_usageMode
=== PAUSE TestAccACMPCACertificateAuthority_usageMode
=== RUN   TestAccACMPCACertificateAuthority_deleteFromActiveState
=== PAUSE TestAccACMPCACertificateAuthority_deleteFromActiveState
=== RUN   TestAccACMPCACertificateAuthority_RevocationConfiguration_empty
=== PAUSE TestAccACMPCACertificateAuthority_RevocationConfiguration_empty
=== RUN   TestAccACMPCACertificateAuthority_RevocationCrl_customCNAME
=== PAUSE TestAccACMPCACertificateAuthority_RevocationCrl_customCNAME
=== RUN   TestAccACMPCACertificateAuthority_RevocationCrl_enabled
=== PAUSE TestAccACMPCACertificateAuthority_RevocationCrl_enabled
=== RUN   TestAccACMPCACertificateAuthority_RevocationCrl_expirationInDays
=== PAUSE TestAccACMPCACertificateAuthority_RevocationCrl_expirationInDays
=== RUN   TestAccACMPCACertificateAuthority_RevocationCrl_s3ObjectACL
=== PAUSE TestAccACMPCACertificateAuthority_RevocationCrl_s3ObjectACL
=== RUN   TestAccACMPCACertificateAuthority_RevocationOcsp_enabled
=== PAUSE TestAccACMPCACertificateAuthority_RevocationOcsp_enabled
=== RUN   TestAccACMPCACertificateAuthority_RevocationOcsp_customCNAME
=== PAUSE TestAccACMPCACertificateAuthority_RevocationOcsp_customCNAME
=== RUN   TestAccACMPCACertificateAuthority_tags
=== PAUSE TestAccACMPCACertificateAuthority_tags
=== RUN   TestAccACMPCACertificateDataSource_basic
=== PAUSE TestAccACMPCACertificateDataSource_basic
=== RUN   TestAccACMPCACertificate_rootCertificate
=== PAUSE TestAccACMPCACertificate_rootCertificate
=== RUN   TestAccACMPCACertificate_rootCertificateWithApiPassthrough
=== PAUSE TestAccACMPCACertificate_rootCertificateWithApiPassthrough
=== RUN   TestAccACMPCACertificate_subordinateCertificate
=== PAUSE TestAccACMPCACertificate_subordinateCertificate
=== RUN   TestAccACMPCACertificate_endEntityCertificate
=== PAUSE TestAccACMPCACertificate_endEntityCertificate
=== RUN   TestAccACMPCACertificate_Validity_endDate
=== PAUSE TestAccACMPCACertificate_Validity_endDate
=== RUN   TestAccACMPCACertificate_Validity_absolute
=== PAUSE TestAccACMPCACertificate_Validity_absolute
=== CONT  TestAccACMPCACertificateAuthorityCertificate_rootCA
=== CONT  TestAccACMPCACertificateAuthority_RevocationCrl_expirationInDays
=== CONT  TestAccACMPCACertificate_Validity_absolute
=== CONT  TestAccACMPCACertificateAuthority_tags
=== CONT  TestAccACMPCACertificate_subordinateCertificate
=== CONT  TestAccACMPCACertificateAuthority_enabledDeprecated
=== CONT  TestAccACMPCACertificate_rootCertificateWithApiPassthrough
=== CONT  TestAccACMPCACertificateAuthority_usageMode
=== CONT  TestAccACMPCACertificateAuthority_deleteFromActiveState
=== CONT  TestAccACMPCACertificate_endEntityCertificate
=== CONT  TestAccACMPCACertificate_rootCertificate
=== CONT  TestAccACMPCACertificate_Validity_endDate
=== CONT  TestAccACMPCACertificateAuthority_RevocationOcsp_customCNAME
=== CONT  TestAccACMPCACertificateDataSource_basic
=== CONT  TestAccACMPCACertificateAuthority_RevocationConfiguration_empty
=== CONT  TestAccACMPCACertificateAuthority_RevocationCrl_enabled
=== CONT  TestAccACMPCACertificateAuthority_RevocationCrl_customCNAME
=== CONT  TestAccACMPCACertificateAuthority_disappears
=== CONT  TestAccACMPCACertificateAuthority_RevocationOcsp_enabled
=== CONT  TestAccACMPCACertificateAuthorityDataSource_s3ObjectACL
--- PASS: TestAccACMPCACertificateAuthority_disappears (34.37s)
=== CONT  TestAccACMPCACertificateAuthority_basic
--- PASS: TestAccACMPCACertificateAuthorityDataSource_s3ObjectACL (47.20s)
=== CONT  TestAccACMPCACertificateAuthorityCertificate_subordinateCA
--- PASS: TestAccACMPCACertificateAuthority_deleteFromActiveState (47.92s)
=== CONT  TestAccACMPCACertificateAuthorityCertificate_updateRootCA
--- PASS: TestAccACMPCACertificateAuthority_usageMode (49.05s)
=== CONT  TestAccACMPCACertificateAuthorityDataSource_basic
--- PASS: TestAccACMPCACertificateAuthority_RevocationConfiguration_empty (49.26s)
=== CONT  TestAccACMPCACertificateAuthority_RevocationCrl_s3ObjectACL
--- PASS: TestAccACMPCACertificateDataSource_basic (49.43s)
--- PASS: TestAccACMPCACertificate_rootCertificate (54.54s)
--- PASS: TestAccACMPCACertificate_rootCertificateWithApiPassthrough (54.81s)
--- PASS: TestAccACMPCACertificateAuthorityCertificate_rootCA (55.45s)
--- PASS: TestAccACMPCACertificate_subordinateCertificate (56.26s)
--- PASS: TestAccACMPCACertificate_Validity_endDate (61.43s)
--- PASS: TestAccACMPCACertificate_Validity_absolute (62.99s)
--- PASS: TestAccACMPCACertificate_endEntityCertificate (63.04s)
--- PASS: TestAccACMPCACertificateAuthority_basic (37.83s)
--- PASS: TestAccACMPCACertificateAuthorityDataSource_basic (38.28s)
--- PASS: TestAccACMPCACertificateAuthorityCertificate_subordinateCA (43.01s)
--- PASS: TestAccACMPCACertificateAuthority_enabledDeprecated (94.57s)
--- PASS: TestAccACMPCACertificateAuthorityCertificate_updateRootCA (60.55s)
--- PASS: TestAccACMPCACertificateAuthority_RevocationOcsp_enabled (111.02s)
--- PASS: TestAccACMPCACertificateAuthority_RevocationCrl_expirationInDays (111.73s)
--- PASS: TestAccACMPCACertificateAuthority_tags (112.73s)
--- PASS: TestAccACMPCACertificateAuthority_RevocationCrl_s3ObjectACL (72.56s)
--- PASS: TestAccACMPCACertificateAuthority_RevocationOcsp_customCNAME (139.25s)
--- PASS: TestAccACMPCACertificateAuthority_RevocationCrl_enabled (139.46s)
--- PASS: TestAccACMPCACertificateAuthority_RevocationCrl_customCNAME (166.56s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/acmpca     173.485s

@github-actions
Copy link

github-actions bot commented Dec 2, 2022

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/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/acmpca Issues and PRs that pertain to the acmpca service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. labels Dec 2, 2022
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 @StupidScience 👋

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 enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 5, 2022
@StupidScience StupidScience force-pushed the acm-pca-certificate-api-passthrough branch from 7046cae to a9bca73 Compare January 30, 2023 09:57
@StupidScience StupidScience force-pushed the acm-pca-certificate-api-passthrough branch from a46da6e to 1fa17da Compare March 8, 2023 14:02
@riuvshyn
Copy link

cc @ewbankkit 🙏🏽

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=TestAccACMPCACertificate_' PKG=acmpca ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/acmpca/... -v -count 1 -parallel 3  -run=TestAccACMPCACertificate_ -timeout 180m
=== RUN   TestAccACMPCACertificate_rootCertificate
=== PAUSE TestAccACMPCACertificate_rootCertificate
=== RUN   TestAccACMPCACertificate_rootCertificateWithAPIPassthrough
=== PAUSE TestAccACMPCACertificate_rootCertificateWithAPIPassthrough
=== RUN   TestAccACMPCACertificate_subordinateCertificate
=== PAUSE TestAccACMPCACertificate_subordinateCertificate
=== RUN   TestAccACMPCACertificate_endEntityCertificate
=== PAUSE TestAccACMPCACertificate_endEntityCertificate
=== RUN   TestAccACMPCACertificate_Validity_endDate
=== PAUSE TestAccACMPCACertificate_Validity_endDate
=== RUN   TestAccACMPCACertificate_Validity_absolute
=== PAUSE TestAccACMPCACertificate_Validity_absolute
=== CONT  TestAccACMPCACertificate_rootCertificate
=== CONT  TestAccACMPCACertificate_endEntityCertificate
=== CONT  TestAccACMPCACertificate_Validity_absolute
--- PASS: TestAccACMPCACertificate_rootCertificate (38.32s)
=== CONT  TestAccACMPCACertificate_subordinateCertificate
--- PASS: TestAccACMPCACertificate_Validity_absolute (55.68s)
=== CONT  TestAccACMPCACertificate_Validity_endDate
--- PASS: TestAccACMPCACertificate_endEntityCertificate (59.38s)
=== CONT  TestAccACMPCACertificate_rootCertificateWithAPIPassthrough
--- PASS: TestAccACMPCACertificate_subordinateCertificate (36.08s)
--- PASS: TestAccACMPCACertificate_rootCertificateWithAPIPassthrough (31.28s)
--- PASS: TestAccACMPCACertificate_Validity_endDate (43.16s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/acmpca	131.397s

@ewbankkit
Copy link
Contributor

@StupidScience Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit a46529b into hashicorp:main Apr 11, 2023
@github-actions github-actions bot added this to the v4.63.0 milestone Apr 11, 2023
@github-actions
Copy link

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

@github-actions
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 May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/acmpca Issues and PRs that pertain to the acmpca 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.

API pass-through for aws_acmpca_certificate
7 participants