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

Can't update existing resources with new EBS block device settings #1367

Closed
chrisferry opened this Issue Apr 2, 2015 · 5 comments

Comments

Projects
None yet
4 participants
@chrisferry

chrisferry commented Apr 2, 2015

When running a plan with new 0.4.0 I get the following output:
~ module.inf-consul.aws_launch_configuration.launch_config
ebs_optimized: "" => "0"
ephemeral_block_device.#: "" => ""
root_block_device.#: "" => ""

I'm not specifying a block device in the launch_config.

When I try to apply I receive:

  • 1 error(s) occurred:
  • 1 error(s) occurred:
  • 1 error(s) occurred:
  • doesn't support update
@jwaldrip

This comment has been minimized.

Show comment
Hide comment
@jwaldrip

jwaldrip Apr 2, 2015

Contributor

Can you post your configuration for that resource?

Contributor

jwaldrip commented Apr 2, 2015

Can you post your configuration for that resource?

@phinze phinze self-assigned this Apr 2, 2015

@phinze

This comment has been minimized.

Show comment
Hide comment
@phinze

phinze Apr 2, 2015

Member

Looking into this now. Will try to repro from here, but a config would definitely be helpful!

Member

phinze commented Apr 2, 2015

Looking into this now. Will try to repro from here, but a config would definitely be helpful!

@chrisferry

This comment has been minimized.

Show comment
Hide comment
@phinze

This comment has been minimized.

Show comment
Hide comment
@phinze

phinze Apr 2, 2015

Member

Reproduced locally with a pretty minimal config.

resource "aws_launch_configuration" "bar" {
   name = "dontupdatemebro"
   image_id = "ami-21f78e11"
   instance_type = "t1.micro"
}

Digging in for root issue now.

Member

phinze commented Apr 2, 2015

Reproduced locally with a pretty minimal config.

resource "aws_launch_configuration" "bar" {
   name = "dontupdatemebro"
   image_id = "ami-21f78e11"
   instance_type = "t1.micro"
}

Digging in for root issue now.

phinze added a commit that referenced this issue Apr 3, 2015

helper/schema: ensure ForceNew set when Update is not
If a given resource does not define an `Update` function, then all of
its attributes must be specified as `ForceNew`, lest Applys fail with
"doesn't support update" like #1367.

This is something we can detect automatically, so this adds a check for
it when we validate provider implementations.

phinze added a commit that referenced this issue Apr 3, 2015

providers/aws: don't force update for existing launch configs
These changes should fix #1367:

 * `ebs_optimized` gets `Computed: true` and set from `Read`
 * `ephemeral_block_device` loses `Computed: true`
 * explicitly set `root_block_device` to empty from `Read`

While I was in there (tm):

 * Send pointers to `d.Set` so we can use its internal nil check.
@chrisferry

This comment has been minimized.

Show comment
Hide comment
@chrisferry

chrisferry Apr 6, 2015

@phinze This fixes the issue. Thx

chrisferry commented Apr 6, 2015

@phinze This fixes the issue. Thx

@phinze phinze closed this in #1371 Apr 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment