-
Notifications
You must be signed in to change notification settings - Fork 626
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
cloudflare_access_service_token should allow automatic rotation #1041
Comments
Thanks for raising this one, it is definitely an interesting proposal. I think for starters, we don't need an additional resource. The service token itself provides an expires on value which we could store and on validation, force a new resource if the date has passed or is within a configured threshold. The thing that I keep coming back to though is that Terraform is encapsulating logic that isn't present in the API and that is sometimes surprising. Additionally, if an So far, I'm not sure if this is worth implementing for the little return the majority of users would see. |
Running Actually, this is the behavior of the acme_certificate resource for let's encrypt certificat renewal: https://registry.terraform.io/providers/vancluever/acme/latest/docs/resources/certificate#min_days_remaining |
I'll double check the ACME provider but I don't quite think that is how it works nor is it possible in the current state of Terraform. The provider keeps track of the certificate expiry and attempts the renewal should that elapse. There isn't a way to have Terraform operate in the background without some form of interaction (either intentional |
Yes, terraform do modification only when on |
I think there is some misunderstanding here so let me confirm where we currently are.
As we've mentioned above, this is a hurdle. Even if the attribute is added to the I don't mind if someone wants to take a pass at adding this using the following as a guideline but this isn't at the top of my list for now given the nuances I've mentioned with the implementation and expected usage.
To avoid downtime rotations, we will also need to include the examples with |
Current Terraform and Cloudflare provider version
Description
When a service token expire, the cloudflare_access_service_token resource is not tainted which cause disruption on service that depends on it.
Use cases
For example, a token that is used for healthcheck. In this use case, if the token expires, healthcheck will fail. The only way to fix the issue, is to issue "terraform taint cloudflare_access_service_token.healthcheck".
Potential Terraform configuration
We could leverage the "time_rotating" resource. But cloudflare_access_service_token resource doesnt have argument that force recreation. Maybe if there is an internal argument that trigger a recreation of the resource like this:
References
No response
The text was updated successfully, but these errors were encountered: