Git Product home page Git Product logo

Comments (5)

apparentlymart avatar apparentlymart commented on June 1, 2024 2

Thanks to @jvoorhis we have a simple repro of this that doesn't require creating any AWS resources:

data "archive_file" "icollide" {
  type = "zip"

  source {
    content = ""
    filename = "plumless"
  }

  source {
    content = ""
    filename = "buckeroo"
  }

  output_path = "buckeroo.zip"
}

from terraform-plugin-sdk.

jen20 avatar jen20 commented on June 1, 2024

Hi @mattmoyer - you're right, this is particularly nasty if you happen to encounter it. I'll give it some thought with @phinze and @mitchellh and come back to this issue once we have a plan.

from terraform-plugin-sdk.

mitchellh avatar mitchellh commented on June 1, 2024

So I think the only thing we can do here is:

  • For primitive types we can do equality automatically
  • For non-primitive types we'd need a equality function provided.

I don't think there is any automatic way for us to determine equality for all set elements without that. Unfortunately, most set elements are not primitives...

from terraform-plugin-sdk.

apparentlymart avatar apparentlymart commented on June 1, 2024

@mitchellh we already have a bunch of code that generates a proprietary string serialization of complex structures for use in the default hashing implementation. For cases where the default hash implementation is being used (I think that everything that's been added since it's existed), could we just compare the strings that produces to get deep-equality?

Presuming that there aren't any issues with that which I'm not seeing, we could plan to shift all of the older stuff (carefully) onto the default set implementation, since AFAIK there's no good reason to override the hash function and plenty of confusing behavior if you don't get it right. (such was the motivation for adding the default implementation in the first place)

from terraform-plugin-sdk.

apparentlymart avatar apparentlymart commented on June 1, 2024

Hi all! Sorry for the long silence here.

v0.12 includes some work towards a solution here, by switching to a new set implementation that is not subject to hash key collisions.

I've relabelled this issue as a provider-sdk one rather than a config one to reflect the fact that for the moment the provider SDK must unfortunately continue to use its own set implementation (converting from the new Terraform Core one on entry to the SDK) because the providers remain compatible with v0.11 and prior releases for the moment.

Fully addressing this problem will therefore require some revisions to the provider SDK which will come at a future point where we are comfortable ending support for Terraform v0.10 and v0.11 for new provider releases, which'll depend on how quickly the user community is able to adopt v0.12. We'll revisit this again later along with other work to introduce v0.12-specific features into the provider SDK.

from terraform-plugin-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.