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

CRITICAL: aws_instance.root_block_device.volume_size not working in AWS "Govcloud" region #4469

Closed
herbrandson opened this issue May 7, 2018 · 6 comments · Fixed by #4489
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@herbrandson
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.7

  • provider.aws v1.17.0

Affected Resource(s)

  • aws_instance

Terraform Configuration Files

provider "aws" {
  profile = "govcloud"
  region = "us-gov-west-1"
}

resource "aws_vpc" "default" {
    cidr_block = "10.10.0.0/16"
}

resource "aws_subnet" "default" {
    vpc_id = "${aws_vpc.default.id}"
    cidr_block = "10.10.0.0/20"
}

resource "aws_instance" "worker" {
    instance_type = "r4.xlarge"
    key_name = "liveearth"
    subnet_id = "${aws_subnet.default.id}"
    ami = "ami-e0aa3f81"

    root_block_device {
        volume_size = 50
    }
}

Expected Behavior

This should create an instance with a root device of 50gb

Actual Behavior

Terraform creates a new instance with 2 devices.

  • /dev/xvda (8 gb), which is the root device
  • /dev/xvdb (50 gb), which is not used

Steps to Reproduce

  1. terraform apply
  2. Run terraform apply a second time and see that Terraform wants to delete and recreate the instance because the root device size is not correct

Important Factoids

This is only happening when run in the AWS "Govcloud" region. The "East 1" regions works fine.

@herbrandson
Copy link
Author

Sorry for the "CRITICAL" title, but this is causing huge issues for us right now. We currently can't run our Terraform scripts because it will delete and recreate all of our EC2 instances every time. We had scheduled some downtime last night and rebuilt our entire production cluster. Today, our servers have been crashing due to being out of disk space. I'm having to rebuild them manually one by one :(

Please help

jmcarp added a commit to jmcarp/terraform-provider-aws that referenced this issue May 9, 2018
@bflad bflad added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. partition/aws-us-gov Pertains to the aws-us-gov partition. labels May 9, 2018
jmcarp added a commit to jmcarp/terraform-provider-aws that referenced this issue May 9, 2018
@bflad bflad added this to the v1.18.0 milestone May 9, 2018
@bflad
Copy link
Contributor

bflad commented May 9, 2018

The fix for this will be released in v1.18.0 of the AWS provider, later today. This bug has been present for a very long time but only surfaces under very specific conditions depending on EC2 API caching of different BlockDeviceMappings response ordering from DescribeImages. Some more details about that investigation can be seen in #4489.

@bflad bflad removed the partition/aws-us-gov Pertains to the aws-us-gov partition. label May 9, 2018
@herbrandson
Copy link
Author

Thanks so much. You guys are awesome!

@bflad
Copy link
Contributor

bflad commented May 10, 2018

This has been released in version 1.18.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@herbrandson
Copy link
Author

I have confirmed that this issue is resolved for us with v1.18.0. Thanks again!

@ghost
Copy link

ghost commented Apr 6, 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 6, 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 a pull request may close this issue.

2 participants