-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[WIP] New Resource: aws_acm_certificate (+ changes to data source to wait for certificate issuing) #2801
[WIP] New Resource: aws_acm_certificate (+ changes to data source to wait for certificate issuing) #2801
Conversation
…e one error non-retryable that was retryable unnecessarily
…esource at the same time
…nitially copy-pasting other resource...)
Update: I implemented a variation of this that uses a resource instead of a data source to implement waiting for the issued certificate: #2813 To me, it feels cleaner but I'll wait for feedback before continuing and then close one of the PRs |
Haven't received much feedback yet but the resource-based approach still seems more promising. Closing this PR in favour of #2813 and continue work there until we decide otherwise. |
Gentle ping @apparentlymart. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This is a first draft trying to implement automated ACM certificate issuing based on my suggestions in #2418.
Here is what it does:
aws_acm_certificate
resource that requests a new certificate and returns oncevalidationOptions
(the information what needs to be done to validate ownership of the domain) are available (for some reason, those aren't immediately available). Only supports DNS validation at this pointaws_acm_certificate
data source to wait until a matching certificate can be foundaws_acm_certificate
to search forarn
instead ofdomain
so we match exactly the certificate we requested from acmHere is what's still to do:
Here are a few things I'm unsure about:
wait_until_present
andwait_until_present_timeout
be two fields or one field where0
means "don't wait"?terraform plan
without any chance of ever succeeding. If you have the dependency, it looks like terraform will always produce a non-empty plan for it (depends_on
always triggers data source read terraform#11806).As an alternative, waiting for certificate issuing could also be implemented as a separate resource:
acm_certificate_validation
oracm_certificate
?subject_alternative_names
to contain values when requesting a certificate butDescribeCertificate
always includes thedomain_name
insubject_alternative_names
. I'm currently filtering this so terraform doesn't detect this as a change. Is there a better way to do this?I'm not a golang or terraform provider expert so any feedback is welcome!