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

Possible old/new property confusion for arrays #99

Closed
joeduffy opened this issue Jan 21, 2018 · 2 comments
Closed

Possible old/new property confusion for arrays #99

joeduffy opened this issue Jan 21, 2018 · 2 comments
Assignees
Labels
area/providers kind/bug Some behavior is incorrect or out of spec
Milestone

Comments

@joeduffy
Copy link
Member

A customer reported a problem when replacing an array value with another. The particular example was with the aws.cloudfront.Distribution object, namely its aliases property. The resource was provisioned with one (string) value, and then a simple update to a different (string) value triggered a strange error that implies maybe Terraform was seeing two values instead of the expected one.

The update was:

      ~ aliases             : [
          - [0]: "old.domain.io"
          + [0]: "old.domain.com"
        ]

And the update led to the following error:

error PU2003: Plan apply failed: rpc error: code = Unknown desc = updating urn:pulumi:cts-prod::cts::aws:cloudfront/distribution:Distribution::cts-prod-cdn: InconsistentQuantities: The specified quantity of Aliases (2) does not match the actual quantity supplied (1).
    status code: 400, request id: c187413f-fee2-11e7-b4ba-21238073c963
Step #48 failed [update]: this failure was catastrophic and the provider cannot guarantee recovery
info: no changes required:
      47 resources unchanged
A catastrophic error occurred; resources states may be unknown
rpc error: code = Unknown desc = updating urn:pulumi:cts-prod::cts::aws:cloudfront/distribution:Distribution::cts-prod-cdn: InconsistentQuantities: The specified quantity of Aliases (2) does not match the actual quantity supplied (1).
    status code: 400, request id: c187413f-fee2-11e7-b4ba-21238073c963
error: update unsuccessful: status failed

It is very possible this was fixed with the many updates to update logic we've made in the past few weeks, since both the SDK and the PPC that the customer is using are quite out of date.

@joeduffy joeduffy added area/providers kind/bug Some behavior is incorrect or out of spec labels Jan 21, 2018
@joeduffy joeduffy added this to the 0.10 milestone Jan 21, 2018
@lukehoban
Copy link
Member

Looking at TF AWS provider code - looks like this condition is triggered here: https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/cloudfront_distribution_configuration_structure.go#L966

@pgavlin
Copy link
Member

pgavlin commented Jan 26, 2018

I believe that this is now fixed after #104.

@pgavlin pgavlin closed this as completed Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/providers kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

3 participants