Open Nemental opened 9 months ago
Hi @Nemental what i figured out that client-certificate not depends on duration value it recreates each time when you request API, i'm sure that some logic beneath, based on current timestamp or maybe something else, but this is backend and we can't fix that. But you can create customer issue on helpcenter maybe we can get some updates for API.
Anyway, I can add additional parameter if you want, like expiry_date = "2024-02-01", from which we can calculate duration like:
currentTime := time.Now()
t, err := time.Parse(time.RFC3339, fmt.Sprintf("%sT00:00:00Z", expiryDate))
if err != nil {
return fmterr.Errorf("error Parsing Expiration Date: %s", err)
}
duration = int(t.Sub(currentTime).Hours() / 24)
this won't fix our problen, but can be usefull, what you think?
@anton-sidelnikov
I'll open a customer issue to address this topic... Maybe they'll add an API parameter to specify an absolute date or something like this.
I already tried a solution approach similar to yours but couldn't finish due to lack of time... (:
I'ld appreciate an additional parameter like expiry_date
, because it's way better like my temporary solution ;)
lifecycle {
ignore_changes = [content]
}
Terraform provider version
Affected Resource(s)
data/opentelekomcloud_cce_cluster_kubeconfig_v3
Terraform Configuration Files
Debug Output/Panic Output
Steps to Reproduce
terraform apply
Expected Behavior
Maybe an argument to specify absolute date instead of duration?
Actual Behavior
Kubeconfig forces replacement because of certificate validity, which is calculated based on duration-argument and current timestamp.
Important Factoids
References