Skip to content
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

Enhance log statements #3442

Merged
merged 2 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 30 additions & 32 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2021-11-30T21:58:45Z",
"generated_at": "2021-12-15T06:20:37Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
},
{
"name": "ArtifactoryDetector"
},
{
"name": "AzureStorageKeyDetector"
},
{
"base64_limit": 4.5,
"name": "Base64HighEntropyString"
Expand All @@ -31,9 +28,6 @@
"ghe_instance": "github.ibm.com",
"name": "GheDetector"
},
{
"name": "GitHubTokenDetector"
},
{
"hex_limit": 3,
"name": "HexHighEntropyString"
Expand All @@ -54,9 +48,6 @@
{
"name": "MailchimpDetector"
},
{
"name": "NpmDetector"
},
{
"name": "PrivateKeyDetector"
},
Expand All @@ -66,9 +57,6 @@
{
"name": "SoftlayerDetector"
},
{
"name": "SquareOAuthDetector"
},
{
"name": "StripeDetector"
},
Expand Down Expand Up @@ -626,31 +614,31 @@
"hashed_secret": "c427f185ddcb2440be9b77c8e45f1cd487a2e790",
"is_secret": false,
"is_verified": false,
"line_number": 1232,
"line_number": 1258,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "1f614c2eb6b3da22d89bd1b9fd47d7cb7c8fc670",
"is_secret": false,
"is_verified": false,
"line_number": 2736,
"line_number": 2762,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "7abfce65b8504403afc25c9790f358d513dfbcc6",
"is_secret": false,
"is_verified": false,
"line_number": 2749,
"line_number": 2775,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "0c2d85bf9a9b1579b16f220a4ea8c3d62b2e24b1",
"is_secret": false,
"is_verified": false,
"line_number": 2787,
"line_number": 2816,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -846,7 +834,7 @@
"hashed_secret": "884a58e4c2c5d195d3876787bdc63af6c5af2924",
"is_secret": false,
"is_verified": false,
"line_number": 340,
"line_number": 344,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -966,15 +954,15 @@
"hashed_secret": "c8b6f5ef11b9223ac35a5663975a466ebe7ebba9",
"is_secret": false,
"is_verified": false,
"line_number": 1033,
"line_number": 1051,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "8abf4899c01104241510ba87685ad4de76b0c437",
"is_secret": false,
"is_verified": false,
"line_number": 1039,
"line_number": 1057,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -984,7 +972,7 @@
"hashed_secret": "813274ccae5b6b509379ab56982d862f7b5969b6",
"is_secret": false,
"is_verified": false,
"line_number": 593,
"line_number": 603,
"type": "Base64 High Entropy String",
"verified_result": null
}
Expand Down Expand Up @@ -1323,6 +1311,16 @@
"verified_result": null
}
],
"ibm/resource_ibm_container_alb_cert.go": [
{
"hashed_secret": "b732fb611fd46a38e8667f9972e0cde777fbe37f",
"is_secret": false,
"is_verified": false,
"line_number": 318,
"type": "Secret Keyword",
"verified_result": null
}
],
"ibm/resource_ibm_container_cluster.go": [
{
"hashed_secret": "b732fb611fd46a38e8667f9972e0cde777fbe37f",
Expand All @@ -1338,7 +1336,7 @@
"hashed_secret": "884a58e4c2c5d195d3876787bdc63af6c5af2924",
"is_secret": false,
"is_verified": false,
"line_number": 1306,
"line_number": 1303,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -1358,7 +1356,7 @@
"hashed_secret": "988ff3bd9a74260f3e32e115fdd6535aaa5c531a",
"is_secret": false,
"is_verified": false,
"line_number": 694,
"line_number": 695,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -1368,31 +1366,31 @@
"hashed_secret": "7deb7557ec8b36e7d5958afe3e08959e7f1ba813",
"is_secret": false,
"is_verified": false,
"line_number": 1164,
"line_number": 1165,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "b62aab00e3bf482bfb75e3e42fd5d1be72f33ec0",
"is_secret": false,
"is_verified": false,
"line_number": 1259,
"line_number": 1260,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "b732fb611fd46a38e8667f9972e0cde777fbe37f",
"is_secret": false,
"is_verified": false,
"line_number": 1744,
"line_number": 1745,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "1f5e25be9b575e9f5d39c82dfd1d9f4d73f1975c",
"is_secret": false,
"is_verified": false,
"line_number": 1861,
"line_number": 1862,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -1502,15 +1500,15 @@
"hashed_secret": "b02fa7fd7ca08b5dc86c2548e40f8a21171ef977",
"is_secret": false,
"is_verified": false,
"line_number": 233,
"line_number": 257,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "d4c3d66fd0c38547a3c7a4c6bdc29c36911bc030",
"is_secret": false,
"is_verified": false,
"line_number": 270,
"line_number": 294,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -1790,7 +1788,7 @@
"hashed_secret": "da8cae6284528565678de15e03d461e23fe22538",
"is_secret": false,
"is_verified": false,
"line_number": 1464,
"line_number": 1465,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -2102,7 +2100,7 @@
"hashed_secret": "19463ab0c6cf2c8f229c8c9666f2f784edf6bb4f",
"is_secret": false,
"is_verified": false,
"line_number": 159,
"line_number": 160,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -2138,7 +2136,7 @@
}
]
},
"version": "0.13.1+ibm.46.dss",
"version": "0.13.1+ibm.40.dss",
"word_list": {
"file": null,
"hash": null
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ func resourceIBMAppExists(d *schema.ResourceData, meta interface{}) (bool, error
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting app: %s", err)
}

return app.Metadata.GUID == id, nil
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_app_domain_private.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func resourceIBMAppDomainPrivateExists(d *schema.ResourceData, meta interface{})
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("Error getting private app domains: %s", err)
}

return prdomain.Metadata.GUID == prdomainGUID, nil
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_app_domain_shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func resourceIBMAppDomainSharedExists(d *schema.ResourceData, meta interface{})
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("Error getting shared domains: %s", err)
}

return shdomain.Metadata.GUID == shdomainGUID, nil
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_app_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func resourceIBMAppRouteExists(d *schema.ResourceData, meta interface{}) (bool,
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting app routes: %s", err)
}

return route.Metadata.GUID == routeGUID, nil
Expand Down
6 changes: 4 additions & 2 deletions ibm/resource_ibm_certificate_manager_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ func resourceIBMCertificateManagerGet(d *schema.ResourceData, meta interface{})
}
certID := d.Id()
certificatedata, err := cmService.Certificate().GetCertData(certID)

if err != nil {
return fmt.Errorf("Error getting certificate during import: %s", err)
}
cminstanceid := strings.Split(certID, ":certificate:")
d.Set("certificate_manager_instance_id", cminstanceid[0]+"::")
d.Set("name", certificatedata.Name)
Expand Down Expand Up @@ -221,7 +223,7 @@ func resourceIBMCertificateManagerExists(d *schema.ResourceData, meta interface{
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error gettting certificate details in exists %s", err)
}

return true, nil
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_cis.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func resourceIBMCISInstanceExists(d *schema.ResourceData, meta interface{}) (boo
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s %s", err, response)
return false, fmt.Errorf("[ERROR] Error getting cis instance: %s %s", err, response)
}
if instance != nil && (strings.Contains(*instance.State, "removed") || strings.Contains(*instance.State, cisInstanceReclamation)) {
log.Printf("[WARN] Removing instance from state because it's in removed or pending_reclamation state")
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_compute_autoscale_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ func resourceIBMComputeAutoScaleGroupExists(d *schema.ResourceData, meta interfa
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting compute autoscale group: %s", err)
}
return result.Id != nil && *result.Id == groupId, nil
}
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_compute_autoscale_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func resourceIBMComputeAutoScalePolicyExists(d *schema.ResourceData, meta interf
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting compute autoscale policy: %s", err)
}
return result.Id != nil && *result.Id == policyId, nil

Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_compute_dedicated_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func resourceIBMComputeDedicatedHostExists(d *schema.ResourceData, meta interfac
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting compute dedicated hosts: %s", err)
}

return result.Id != nil && *result.Id == dedicatedID, nil
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_compute_placement_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func resourceIBMComputePlacementGroupExists(d *schema.ResourceData, meta interfa
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting compute placement group: %s", err)
}
return result.Id != nil && *result.Id == pgrpID, nil
}
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_compute_provisioning_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func resourceIBMComputeProvisioningHookExists(d *schema.ResourceData, meta inter
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting compute provisioning hooks: %s", err)
}
return result.Id != nil && *result.Id == hookId, nil
}
2 changes: 1 addition & 1 deletion ibm/resource_ibm_compute_ssh_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func resourceIBMComputeSSHKeyExists(d *schema.ResourceData, meta interface{}) (b
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting compute ssh key: %s", err)
}
return result.Id != nil && *result.Id == keyID, nil
}
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_compute_ssl_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func resourceIBMComputeSSLCertificateExists(d *schema.ResourceData, meta interfa
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting compute ssl certificate: %s", err)
}
return cert.Id != nil && *cert.Id == id, nil
}
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_compute_vm_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,7 @@ func resourceIBMComputeVmInstanceExists(d *schema.ResourceData, meta interface{}
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting compute vm instance: %s", err)
}

return result.Id != nil && *result.Id == guestID, nil
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_container_addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ func resourceIBMContainerAddOnsExists(d *schema.ResourceData, meta interface{})
return false, nil
}
}
return false, fmt.Errorf("[ERROR] Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting container addons: %s", err)
}

return true, nil
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_container_alb_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func resourceIBMContainerALBCertExists(d *schema.ResourceData, meta interface{})
return false, nil
}
}
return false, fmt.Errorf("Error communicating with the API: %s", err)
return false, fmt.Errorf("[ERROR] Error getting ingress secret: %s", err)
}

return ingressSecretConfig.Cluster == clusterID && ingressSecretConfig.Name == secretName, nil
Expand Down
Loading