Skip to content

Commit c213e3d

Browse files
authored
fix: always keep original client certificate key, backend no longer returns it (#308)
1 parent 0b0447b commit c213e3d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

checkly/resource_client_certificate.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ func clientCertificateFromResourceData(d *schema.ResourceData) (checkly.ClientCe
9494
func resourceDataFromClientCertificate(c *checkly.ClientCertificate, d *schema.ResourceData) error {
9595
d.Set("host", c.Host)
9696
d.Set("certificate", c.Certificate)
97-
d.Set("private_key", c.PrivateKey)
97+
// The backend does not return a value for PrivateKey anymore, though it
98+
// used to. The value should not change by itself, so we can simply keep
99+
// the original state.
100+
// d.Set("private_key", c.PrivateKey)
98101
d.Set("trusted_ca", c.TrustedCA)
99102
// The backend does not return a value for Passphrase and even it did, the
100103
// value would be encrypted. Thus, the value should never be modified.

0 commit comments

Comments
 (0)