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

resource/aws_volume_attachment: Support update #2810

Merged
merged 3 commits into from
Feb 8, 2018

Conversation

atsushi-ishibashi
Copy link
Contributor

@atsushi-ishibashi atsushi-ishibashi commented Dec 31, 2017

Fixes: #2520
Fixes: #1211

Implement resourceAwsVolumeAttachmentUpdate which does nothing and removed computed.

TF_ACC=1 go test ./aws -v -run=TestAccAWSVolumeAttachment_ -timeout 120m
=== RUN   TestAccAWSVolumeAttachment_basic
--- PASS: TestAccAWSVolumeAttachment_basic (151.78s)
=== RUN   TestAccAWSVolumeAttachment_skipDestroy
--- PASS: TestAccAWSVolumeAttachment_skipDestroy (148.37s)
=== RUN   TestAccAWSVolumeAttachment_attachStopped
--- PASS: TestAccAWSVolumeAttachment_attachStopped (209.48s)
=== RUN   TestAccAWSVolumeAttachment_update
--- PASS: TestAccAWSVolumeAttachment_update (184.05s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	693.704s

@radeksimko radeksimko added bug Addresses a defect in current functionality. upstream-terraform Addresses functionality related to the Terraform core binary. labels Jan 2, 2018
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.

Hi @atsushi-ishibashi

Thanks for the work here! 🚀
Just left a few nitpicks to address before merging.

@@ -205,6 +204,10 @@ func resourceAwsVolumeAttachmentRead(d *schema.ResourceData, meta interface{}) e
return nil
}

func resourceAwsVolumeAttachmentUpdate(d *schema.ResourceData, meta interface{}) error {
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a log statement explaining that we are actually doing nothing along with a comment for the reason behind?

func testAccVolumeAttachmentConfig_update(detach bool) string {
return fmt.Sprintf(`
resource "aws_instance" "web" {
ami = "ami-21f78e11"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you fix the indentation here?

Config: testAccVolumeAttachmentConfig_update(false),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(
"aws_volume_attachment.ebs_att", "force_detach", "false"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you do the same for skip_destroy ?

@atsushi-ishibashi
Copy link
Contributor Author

@Ninir Ok👍

@atsushi-ishibashi
Copy link
Contributor Author

@Ninir It's ready to get review!

@radeksimko radeksimko added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jan 16, 2018
@radeksimko radeksimko changed the title r/volume_attachment: Support update resource/aws_volume_attachment: Support update Jan 16, 2018
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

@atsushi-ishibashi LGTM, thanks for the PR.
Thanks @Ninir for the initial review.

All relevant acceptance tests are passing and last feedback was (AFAICT) implemented, so I'm going to merge this.

@radeksimko radeksimko merged commit 8a6b59f into hashicorp:master Feb 8, 2018
@radeksimko radeksimko added this to the v1.9.0 milestone Feb 9, 2018
@bflad
Copy link
Contributor

bflad commented Feb 9, 2018

This has been released in terraform-provider-aws version 1.9.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. upstream-terraform Addresses functionality related to the Terraform core binary.
Projects
None yet
4 participants