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

Fixed name on resource_aws_ebs_snapshot kms_key_id #3085

Merged
merged 2 commits into from
Jan 23, 2018

Conversation

jwieringa
Copy link
Contributor

Looks like there is an naming error when setting the kms_key_id on aws_ebs_snapshot.

Please let me know if there is anything else needed here.

@radeksimko radeksimko added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Jan 22, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Thank you for this fix! It turns out that if we had an acceptance test covering this functionality, Terraform would have generated an error in the testing and this would have been caught sooner. Would you feel comfortable adding an acceptance test that creates an encrypted EBS volume and snapshot in https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_ebs_snapshot_test.go? If not, no worries we can followup your commit with one. Thanks!

@jwieringa
Copy link
Contributor Author

@bflad No problem, would you be willing to take a look at 350c7f9 to see if it is what you had in mind?

Rebased on master and ran acceptance tests on this resource.

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSSnapshot'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSEBSSnapshot -timeout 120m
=== RUN   TestAccAWSEBSSnapshot_basic
--- PASS: TestAccAWSEBSSnapshot_basic (56.81s)
=== RUN   TestAccAWSEBSSnapshot_withDescription
--- PASS: TestAccAWSEBSSnapshot_withDescription (54.96s)
=== RUN   TestAccAWSEBSSnapshot_withKms
--- PASS: TestAccAWSEBSSnapshot_withKms (63.25s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	175.403s

@bflad
Copy link
Contributor

bflad commented Jan 23, 2018

This is perfect! Previously (curiously Terraform core did not generate an error as expected),

 make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSSnapshot_withKms'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSEBSSnapshot_withKms -timeout 120m
=== RUN   TestAccAWSEBSSnapshot_withKms
--- FAIL: TestAccAWSEBSSnapshot_withKms (65.14s)
	testing.go:513: Step 0 error: Check failed: Check 2/2 error: aws_ebs_snapshot.test: Attribute 'kms_key_id' didn't match "^arn:aws:kms:[a-z]{2}-[a-z]+-\\d{1}:[0-9]{12}:key/[a-z0-9-]{36}$", got ""
FAIL
exit status 1
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	65.187s
make: *** [testacc] Error 1

Passes for me as well:

make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSSnapshot'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSEBSSnapshot -timeout 120m
=== RUN   TestAccAWSEBSSnapshot_basic
--- PASS: TestAccAWSEBSSnapshot_basic (25.49s)
=== RUN   TestAccAWSEBSSnapshot_withDescription
--- PASS: TestAccAWSEBSSnapshot_withDescription (41.83s)
=== RUN   TestAccAWSEBSSnapshot_withKms
--- PASS: TestAccAWSEBSSnapshot_withKms (69.19s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	136.558s

@bflad bflad added this to the v1.8.0 milestone Jan 23, 2018
@bflad bflad merged commit fa3a4fc into hashicorp:master Jan 23, 2018
@jwieringa
Copy link
Contributor Author

@bflad great, thanks!

bflad added a commit that referenced this pull request Jan 23, 2018
@jwieringa jwieringa deleted the fix-ebs-snapshot branch January 23, 2018 18:30
@bflad
Copy link
Contributor

bflad commented Jan 29, 2018

This has been released in terraform-provider-aws version 1.8.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 8, 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 8, 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. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants