Skip to content

Commit e84777a

Browse files
authored
Create CSR returns the wrong error (#1206)
Log the error returned by `CertificateSigningRequests().Create`.
1 parent ac6f58b commit e84777a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kubernetes/resource_kubernetes_certificate_signing_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func resourceKubernetesCertificateSigningRequestCreate(ctx context.Context, d *s
102102
log.Printf("[INFO] Creating new certificate signing request: %#v", csr)
103103
newCSR, createErr := conn.CertificatesV1beta1().CertificateSigningRequests().Create(ctx, &csr, metav1.CreateOptions{})
104104
if createErr != nil {
105-
return diag.Errorf("Failed to create certificate signing request: %s", err)
105+
return diag.Errorf("Failed to create certificate signing request: %s", createErr)
106106
}
107107

108108
// Get the name, since it might have been randomly generated during create.

0 commit comments

Comments
 (0)