Error Codes - cloudigrade/cloudigrade GitHub Wiki

When Cloudmeter fails to create or enable a cloud account, it will return a message with an error code. If the account is created via sources, this message can be found on the "availability_error_message" on the created Application. If the account is created via Cloudmeter's API, this message can be found in the HTTP Response.

We currently denote 3 classes or errors.

  • CG1*** errors indicates that we could not create an account because the information given was not able to pass cloudigrade's validation.
  • CG2*** errors indicates that we could not create an account because the there is some missing information in sources.
  • CG3*** errors indicates that we were not able to enable the account.

CG1***

Error codes in the CG1000 level indicates Cloudigrade ran into validation errors when creating the account. The cloud account is not created when any of these errors are thrown.

CG1000 - Username Not Found

This error occurs when we cannot find the user for the created account. Since we create a user if we do not have one stored, this should only occur in the case that the user is deleted after user creation, but before cloud account creation.

CG1001 - Duplicate ARN

This error occurs when the ARN provided is not unique. We currently only allow one cloud account for a given ARN.

CG1002 - Duplicate AWS Account ID

This error occurs when the ARN is unique, but the AWS account id is not. For example: arn:aws:iam::0123456789:role/role1 and arn:aws:iam::0123456789:role/role2 are distinct ARNs that belong to the same AWS account 0123456789. We currently only allow one cloud account for an AWS account id.

CG1003 - Duplicate Cloud Account Name

This error occurs when the Cloud Account Name is not unique. This is the name parameter when creating the account through the Cloudmeter API, or the Source name, when creating the account through Sources.

CG1004 - Invalid ARN format

This error occurs when the provided ARN format is invalid.

CG2***

Error codes in the CG2000 level indicates that there is something wrong with the Sources data. The cloud account is not created when any of these errors are thrown.

CG2000 - Sources Authentication Not Found

A Sources Authentication must be linked to the Source and Application. If the Authentication has been deleted by the time we try to create the cloud account, we throw this error

CG2001 - Bad Authentication Type

The Sources Authencation auth_type must be of type a type we support. Currently the only type supported is cloud-meter-arn.

CG2002 - Bad Resource Type

Every Authentication is linked to a Resource by resource_type and resource_id. Currently cloudmeter only support the Endpoint resource_type.

CG2003 - Endpoint Does not Exist

A Sources Endpoint must be linked to the Source and Authentication. If this endpoint has been deleted when we attempt to create the cloud account, we throw this error.

CG2004 No Authentication Password Provided

The ARN must be psased through the password field on the Sources Authentication object.

CG3***

Error codes in the CG3000 level indicate that something went wrong when we tried to enable the cloud account. When this error is triggered by an account creation, the account does not get created. This error could also be caused by attempting to enable a disabled account, in such a case, the account will continue to exist, but in a disabled state.

Some possible causes for this error include:

  • The given ARN not having sufficient permissions
  • Cloudmeter cannot create a new cloudtrail because AWS cloudtrail limit has been reached

CG3001 AWS CloudTrail Limit Reached

You've reached the AWS CloudTrail limit for your account. Please contact AWS to either increase the CloudTrail limit, or delete an existing CloudTrail.

CG3002 AWS AccessDenied error encountered

We encountered an AccessDenied error when trying to communicate with AWS about your account. This error suggests that your AWS IAM Role is not configured correctly. Please recreate it following the exact instructions provided on console.redhat.com.

CG3003 Failed to verify at least one policy action

We failed to verify at least one of the required actions in your AWS IAM Policy. This error suggests that your AWS IAM Policy is not configured correctly. Please recreate it following the exact instructions provided on console.redhat.com.