You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnil, true, fmt.Errorf("[ERROR] Error getting Site to mutual TLS Client to Imperva Certificate association for Site ID %d, certificate ID %d\n%v", siteID, certificateID, err)
returnfmt.Errorf("[ERROR] Error creating Incapsula Site to mutual TLS Client to Imperva Certificate Association for certificate ID %d, Site ID %d\n%s", certificateID, siteID, err)
returnfmt.Errorf("[ERROR] Error deleting Incapsula Site to mutual TLS Client to Imperva Certificate Association certificate ID %d for Site ID %d\n%s", certificateID, siteID, err)
returnnil, fmt.Errorf("unexpected format of Incapsula Client to Imperva CA Certificate Site Association resource ID, expected site_id/certificate_id, got %s", d.Id())
returnnil, fmt.Errorf("unexpected format of Incapsula Client to Imperva CA Certificate Site Association resource ID, expected site_id/certificate_id/account_id(optional), got %s", d.Id())
23
23
}
24
24
25
25
_, err:=strconv.Atoi(idSlice[0])
26
26
iferr!=nil {
27
-
fmt.Errorf("failed to convert Site Id from import command, actual value: %s, expected numeric id", idSlice[0])
27
+
returnnil, fmt.Errorf("failed to convert Site Id from import command, actual value: %s, expected numeric id", idSlice[0])
28
28
}
29
29
30
30
_, err=strconv.Atoi(idSlice[1])
31
31
iferr!=nil {
32
-
fmt.Errorf("failed to convert Certificate Id from import command, actual value: %s, expected numeric id", idSlice[1])
32
+
returnnil, fmt.Errorf("failed to convert Certificate Id from import command, actual value: %s, expected numeric id", idSlice[1])
33
33
}
34
34
35
35
d.Set("site_id", idSlice[0])
36
36
d.Set("certificate_id", idSlice[1])
37
37
38
+
iflen(idSlice) ==3 {
39
+
_, err=strconv.Atoi(idSlice[2])
40
+
iferr!=nil||idSlice[2] =="" {
41
+
returnnil, fmt.Errorf("failed to convert account Id from import command, actual value: %s, expected numeric id", idSlice[2])
42
+
}
43
+
44
+
d.Set("account_id", idSlice[2])
45
+
}
46
+
38
47
log.Printf("[DEBUG] Importing Incapsula Client to Imperva CA Certificate Site Association for Site ID %s, mutual TLS Certificate Id %s,", idSlice[0], idSlice[1])
Description: "(Optional) The account to operate on. If not specified, operation will be performed on the account identified by the authentication parameters.",
Copy file name to clipboardExpand all lines: website/docs/r/mtls_client_to_imperva_ca_certificate_site_association.html.markdown
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@ The following arguments are supported:
49
49
50
50
*`certificate_id` - (Required) The Mutual TLS Client to Imperva CA Certificate ID.
51
51
*`site_id` - (Required) Numeric identifier of the site to operate on.
52
+
*`account_id` - (Optional) The account to operate on. If not specified, operation will be performed on the account identified by the authentication parameters.
0 commit comments