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 logic to renew the origin_ca_certificate when expires #2048

Merged
merged 11 commits into from Nov 28, 2022

Conversation

peruzzof
Copy link
Contributor

@peruzzof peruzzof commented Nov 22, 2022

This is an attempt to implement #2043.
I based the logic in the hashicorp self signed and AWS providers, I have no previous experience with Go so any suggestion of improvement is welcome.

Closes #2043

@peruzzof peruzzof marked this pull request as ready for review November 22, 2022 22:01
@github-actions
Copy link
Contributor

changelog detected ✅

@peruzzof peruzzof marked this pull request as draft November 23, 2022 09:26
@peruzzof
Copy link
Contributor Author

I changed the attribute UpdateContext from Create to Read as the previous was generating uneeded certificates. I could not find any issue with this change as most of the attributes will trigger a new certificate anyway.

@peruzzof
Copy link
Contributor Author

I fixed the merge conflicts and set the Update as Read, as we have the "remaining_days" property that should be set locally, but there is no change to be done upstream. Any property change in a certificate should trigger a renew.
Let me know if I misunderstood anything.

@jacobbednarz
Copy link
Member

thanks @peruzzof. i updated the schema definition and called out specifically that a Terraform operation has to be run as this isn't a service side option.

@jacobbednarz
Copy link
Member

i've also just updated the attribute to be min_days_for_renewal to align with another resource that we do this with - https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/access_service_token

@jacobbednarz jacobbednarz merged commit bc0b630 into cloudflare:master Nov 28, 2022
@github-actions github-actions bot added this to the v3.29.0 milestone Nov 28, 2022
github-actions bot pushed a commit that referenced this pull request Nov 28, 2022
@github-actions
Copy link
Contributor

This functionality has been released in v3.29.0 of the Terraform Cloudflare 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement the logic to auto renew origin_ca certificate
2 participants