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 email address #548

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

Conversation

iishabakaev
Copy link

Same as #405, because PR not merged since 2018

Fix this problem #35

@iishabakaev iishabakaev requested a review from a team as a code owner August 19, 2024 10:09
Copy link

hashicorp-cla-app bot commented Aug 19, 2024

CLA assistant check
All committers have signed the CLA.

@iishabakaev
Copy link
Author

@austinvalle hello!

Sorry to bother you, could you review this PR, this?
Its will be great if provider support email address field in csr generation

Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

Hey @iishabakaev 👋🏻 , thanks for submitting the PR and apologies for the delay in review!

I have left some specific code feedback on the PR as well as I have some general feedback that will need to be addressed before we can accept the change:

docs/cdktf/python/resources/cert_request.md Outdated Show resolved Hide resolved
docs/cdktf/python/resources/self_signed_cert.md Outdated Show resolved Hide resolved
internal/provider/resource_cert_request.go Outdated Show resolved Hide resolved
internal/provider/common_cert.go Outdated Show resolved Hide resolved
internal/provider/common_cert.go Outdated Show resolved Hide resolved
@austinvalle
Copy link
Member

Some general housekeeping things:

  • You'll need to run the documentation generator to update the markdown docs: make generate
  • Our CI acceptance tests won't run from a forked PR, so once you make the changes and test locally, I'll open a mirror PR to confirm the tests are all green ✅

@github-actions github-actions bot added size/M and removed size/XS labels Jan 16, 2025
@iishabakaev
Copy link
Author

Updated PR based on all comments

For testing I had to tinker a bit, the standard function x509.ParseCertificate parses ExtraNames in raw, so I added the creation of email_address

Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

Thanks for the updates @iishabakaev!

I've opened a mirror PR which we can eventually use to run the CI tests (I still need to manually move the changes/approve them 😄 )
#599

Currently I think the remaining items for this PR are:

  • Run the doc generator locally to fix that diff in our CI
  • Remove the changes to docs/cdktf
  • Verify the tests are all green ✅

After that I can push a changelog and merge it.

docs/resources/cert_request.md Outdated Show resolved Hide resolved
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

Looks like there is a test failure in the PR, see comment in review.

Also you can run the tests locally by just running make testacc or just running with any go test command equivalent with the env variable TF_ACC=1

@@ -586,6 +596,7 @@ func selfSignedCertConfig(validity, earlyRenewal uint32) string {
country = "US"
postal_code = "95559-1227"
serial_number = "2"
email_address = "[email protected]"
Copy link
Member

Choose a reason for hiding this comment

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

You won't be able to add this here since tests like TestAccResourceSelfSignedCert_UpgradeFromVersion3_4_0 also use this function, which tests migration from an older version of the provider that doesn't have the email_address attribute

https://github.com/hashicorp/terraform-provider-tls/actions/runs/12956793277/job/36143882711?pr=599

You can duplicate the config in TestResourceSelfSignedCert to just add email address there, or make it a parameter in this function, whichever you prefer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants