-
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_origin_ca_certificate requested_validity causes new certificates to be created on every apply #1276
Comments
#1078 was superseded by #1214 due to an underlying bug in
|
…unc` for `requested_validity` changes Re-introduces the `DiffSuppressFunc` to supplement handling the `requested_validity` countdown. Closes #1276
…unc` for `requested_validity` changes Re-introduces the `DiffSuppressFunc` to supplement handling the `requested_validity` countdown. Closes #1276
Alright, after a bit of head scratching, I got to the bottom of this. The short version is that we need both the |
Instead of trying and failing to calculate the requested validity of the certificate we can use the returned validity. It looks like `requested_validity` was being used in 2 ways. The first one was to request the certificate for a time period and the second to indicate the amount of day the certificate is still valid. The calculation is no longer done and could be seen as a BC break but since the current setup is causing issue like cloudflare#1148, cloudflare#1276 and cloudflare#1031. I expect that this is acceptable. Related API docs: https://api.cloudflare.com/#origin-ca-get-certificate
Instead of trying and failing to calculate the requested validity of the certificate we can use the returned validity. It looks like `requested_validity` was being used in 2 ways. The first one was to request the certificate for a time period and the second to indicate the amount of day the certificate is still valid. The calculation is no longer done and could be seen as a BC break but since the current setup is causing issue like cloudflare#1148, cloudflare#1276 and cloudflare#1031. I expect that this is acceptable. Related API docs: https://api.cloudflare.com/#origin-ca-get-certificate
Instead of trying and failing to calculate the requested validity of the certificate we can use the returned validity. It looks like `requested_validity` was being used in 2 ways. The first one was to request the certificate for a time period and the second to indicate the amount of day the certificate is still valid. The calculation is no longer done and could be seen as a BC break but since the current setup is causing issue like cloudflare#1148, cloudflare#1276 and cloudflare#1031. I expect that this is acceptable. Related API docs: https://api.cloudflare.com/#origin-ca-get-certificate
Instead of trying and failing to calculate the requested validity of the certificate we can use the returned validity. It looks like `requested_validity` was being used in 2 ways. The first one was to request the certificate for a time period and the second to indicate the amount of day the certificate is still valid. The calculation is no longer done and could be seen as a BC break but since the current setup is causing issue like cloudflare#1448, cloudflare#1276 and cloudflare#1031. I expect that this is acceptable. Related API docs: https://api.cloudflare.com/#origin-ca-get-certificate
Confirmation
Terraform and Cloudflare provider version
Terraform 1.0.4
cloudflare 3.3.0
Affected resource(s)
cloudflare_origin_ca_certificate
Terraform configuration files
Debug output
Panic output
Expected output
No change to resource.
Actual output
3 days after the last apply and the resource is showing a diff. A new certificate is generated causing any dependent resources to be updated as well (Azure App Service Certificate for example).
Steps to reproduce
cloudflare_origin_ca_certificate
resource withrequested_validity
.terraform apply
.terraform plan
and observe that thecloudflare_origin_ca_certificate
resource will be updated.Additional factoids
This was previously discussed in #1031 for version 2.x series. However, when I look at the current code I don't see the same logic as was implemented with PR #1078. The
ignore_changes
fix is still possible but it would be good to have a native fix. Is it possible to update the docs in the interim?The API is still not returning
requested_validity
; is there any issue or documentation that can be referenced or voted on?References
#1031
#1078
The text was updated successfully, but these errors were encountered: