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

r/kms_key: Retry getting key policy #1854

Merged
merged 1 commit into from
Oct 10, 2017
Merged

Conversation

radeksimko
Copy link
Member

This is to address the following test failure from this morning:

=== RUN   TestAccAWSEBSVolume_kmsKey
--- FAIL: TestAccAWSEBSVolume_kmsKey (22.84s)
    testing.go:434: Step 0 error: Error applying: 1 error(s) occurred:
        
        * aws_kms_key.foo: 1 error(s) occurred:
        
        * aws_kms_key.foo: NotFoundException: Key 'arn:aws:kms:us-west-2:*******:key/eb421bb3-2865-4d7d-b7c6-2c2c3a07dc40' does not exist
            status code: 400, request id: f2006223-ad80-11e7-8981-d922c7ad0e59

Snippet from related debug log:

-----------------------------------------------------
2017/10/10 06:04:58 [DEBUG] [aws-sdk-go] DEBUG: Response kms/DescribeKey Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Connection: close
Content-Length: 373
Content-Type: application/x-amz-json-1.1
X-Amzn-Requestid: f1fe8d88-ad80-11e7-a270-333f20b6475c


-----------------------------------------------------
2017/10/10 06:04:58 [DEBUG] [aws-sdk-go] {"KeyMetadata":{"AWSAccountId":"187416307283","Arn":"arn:aws:kms:us-west-2:187416307283:key/eb421bb3-2865-4d7d-b7c6-2c2c3a07dc40","CreationDate":1.507615498459E9,"Description":"Terraform acc test 4796457295038973391","Enabled":true,"KeyId":"eb421bb3-2865-4d7d-b7c6-2c2c3a07dc40","KeyManager":"CUSTOMER","KeyState":"Enabled","KeyUsage":"ENCRYPT_DECRYPT","Origin":"AWS_KMS"}}
2017/10/10 06:04:58 [DEBUG] [aws-sdk-go] DEBUG: Request kms/GetKeyPolicy Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST / HTTP/1.1
Host: kms.us-west-2.amazonaws.com
User-Agent: aws-sdk-go/1.12.6 (go1.9; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.10.0-dev
Content-Length: 71
Authorization: AWS4-HMAC-SHA256 Credential=*REDACTED/20171010/us-west-2/kms/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-target, Signature=*REDACTED*
Content-Type: application/x-amz-json-1.1
X-Amz-Date: 20171010T060458Z
X-Amz-Target: TrentService.GetKeyPolicy
Accept-Encoding: gzip

{"KeyId":"eb421bb3-2865-4d7d-b7c6-2c2c3a07dc40","PolicyName":"default"}
-----------------------------------------------------
2017/10/10 06:04:58 [DEBUG] [aws-sdk-go] DEBUG: Response kms/GetKeyPolicy Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 400 Bad Request
Connection: close
Content-Length: 139
Content-Type: application/x-amz-json-1.1
X-Amzn-Requestid: f2006223-ad80-11e7-8981-d922c7ad0e59


-----------------------------------------------------
2017/10/10 06:04:58 [DEBUG] [aws-sdk-go] {"__type":"NotFoundException","message":"Key 'arn:aws:kms:us-west-2:187416307283:key/eb421bb3-2865-4d7d-b7c6-2c2c3a07dc40' does not exist"}
2017/10/10 06:04:58 [DEBUG] [aws-sdk-go] DEBUG: Validate Response kms/GetKeyPolicy failed, not retrying, error NotFoundException: Key 'arn:aws:kms:us-west-2:187416307283:key/eb421bb3-2865-4d7d-b7c6-2c2c3a07dc40' does not exist
	status code: 400, request id: f2006223-ad80-11e7-8981-d922c7ad0e59

kitty-whack-a-mole1

@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Oct 10, 2017
Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@radeksimko radeksimko merged commit 6f1f9c2 into master Oct 10, 2017
@radeksimko radeksimko deleted the b-kms-key-retry-get-policy branch October 10, 2017 21:12
@ghost
Copy link

ghost commented Apr 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants