GCP Cred: Not defining a MID Server from the "Specific MID Servers"


Description

Receiving the following error message when we run a Discover Now from the Cloud Resource for GCP:


Exception occurred while executing operation Cloud REST Query. Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Cloud credentials are missing for https://cloudresourcemanager.googleapis.com/v1/projects .Missing credentials ID. Check that cloud credentials are configured on the service account. (script_include:GoogleApiCommand; line 289). Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Cloud credentials are missing for https://cloudresourcemanager.googleapis.com/v1/projects .Missing credentials ID. Check that cloud credentials are configured on the service account. (script_include:GoogleApiCommand; line 289)

Cause

From the gcp_credentials if we have a selection that is set for "Specific MID Servers" and we did not define a MID Server, you will noticed a similar error below:

Exception occurred while executing operation Cloud REST Query. Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Cloud credentials are missing for https://cloudresourcemanager.googleapis.com/v1/projects .Missing credentials ID. Check that cloud credentials are configured on the service account. (script_include:GoogleApiCommand; line 289). Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Cloud credentials are missing for https://cloudresourcemanager.googleapis.com/v1/projects .Missing credentials ID. Check that cloud credentials are configured on the service account.

So the Cred is defined as "Specific MID servers" but no MIDs are assigned. This means none of the MIDs will try to load that cred into memory, so when they search for a cred in memory with sysid it will fail, hence the above error.

Resolution

From the gcp_credentials add in the appropriate MID Server.