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

Changing volume_size on root_block_device does not trigger a new aws_launch_configuration. #14650

Closed
rynbrd opened this issue May 19, 2017 · 2 comments

Comments

@rynbrd
Copy link

rynbrd commented May 19, 2017

Terraform Version

Terraform v0.9.5

Affected Resource(s)

aws_launch_configuration

Terraform Configuration Files

resource "aws_launch_configuration" "kafka" {
  name_prefix = "${var.name_prefix}kafka-${var.cluster_name}-"

  key_name             = "${var.key}"
  iam_instance_profile = "${aws_iam_instance_profile.kafka.id}"
  security_groups      = ["${aws_security_group.kafka_brokers.id}", "${var.extra_security_groups}"]

  image_id      = "${var.ami}"
  instance_type = "${var.instance_type}"
  user_data     = "${data.template_file.userdata.rendered}"

  root_block_device {
    volume_type           = "gp2"
    volume_size           = 100
    delete_on_termination = true
  }

  lifecycle {
    create_before_destroy = true
  }
}

Output of terraform state show module.kafka_platform.aws_launch_configuration.kafka:

id                                        = zd-uw2-kafka-platform-0099400bc3b1640b7b33371d2e
associate_public_ip_address               = false
ebs_block_device.#                        = 0
ebs_optimized                             = false
enable_monitoring                         = true
ephemeral_block_device.#                  = 0
iam_instance_profile                      = zd-uw2-kafka-platform
image_id                                  = ami-f5d2b795
instance_type                             = m4.large
key_name                                  = zd-uw2-provisioner
name                                      = zd-uw2-kafka-platform-0099400bc3b1640b7b33371d2e
name_prefix                               = zd-uw2-kafka-platform-
root_block_device.#                       = 1
root_block_device.0.delete_on_termination = true
root_block_device.0.iops                  = 0
root_block_device.0.volume_size           = 50
root_block_device.0.volume_type           = gp2
security_groups.#                         = 2
security_groups.1395670089                = sg-48305833
security_groups.2436087799                = sg-2fa21754
spot_price                                = 
user_data                                 = d3e676dda92af9d18b1fbb1f0c67f3f72f5481d5
vpc_classic_link_id                       = 
vpc_classic_link_security_groups.#        = 0

Expected Behavior

A new aws_launch_configuration resource is created.

Actual Behavior

Terraform outputs No changes. Infrastructure is up-to-date..

Steps to Reproduce

  1. Create a launch configuration similar to the above with a root_block_device section.
  2. Run terraform apply to create it.
  3. Change the value of volume_size.
  4. Run terraform apply to (attempt to) update the launch configuration.

Important Factoids

I initially set the size from a variable passed into the module. I discovered this problem after changing that variable rather than directly setting the volume_size. However, I set it directly to ensure that no mistakes were being made when setting one of the intermediate variables. The above output is a result of that test.

@stack72
Copy link
Contributor

stack72 commented May 19, 2017

Hi @bluedragonx

Thanks for raising the bug report here - I am happy to report that this has been fixed by #14507 and will be released in Terraform 0.9.6

Thanks

Paul

@ghost
Copy link

ghost commented Apr 12, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants