Comments (5)
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.
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.
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.
@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.
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)
- Behaviour of `terraform providers schema` command for computed fields HOT 4
- `diff.GetOk` return `nil` for the value of `TypeList` defined in `TypeSet` HOT 1
- Not Helpful Err When Running Tests For Provider HOT 4
- Unsupported Field Type for Resource
- TypeSet resource wanting to destroy and recreate everything when diff is found HOT 2
- losing precision when using maximum value for a 64-bit signed integer
- helper/schema: Provide Functionality to Reduce Resident Memory Usage from Schemas HOT 1
- Consider Method for Disabling Legacy SDK Data Consistency Warning Log Demotion HOT 7
- Updates for Protocol Version 5.4 HOT 1
- Value out of range on 32-bit architecture HOT 3
- Update Go Module to Go 1.20 Minimum HOT 1
- `Schema.Set` adds an empty value when attempting to Patch HOT 1
- `meta.SDKVersion` reporting incorrect version HOT 6
- Terraform CloudFormation Multi Region Stacksets HOT 3
- Is it possible to have a dependency between 2 attributes? HOT 2
- `schema.ResourceData.GetRaw<whatever>()` not populated during provider configuration HOT 3
- Consider Migrating from mitchellh/mapstructure to go-viper/mapstructure
- Low performance in deduplicate strings function HOT 4
- ForceNew doesn't trigger resource recreation when defined on TypeSet, which leads to Update error HOT 1
- helper/resource: Add Go Deprecation Messages That Point To terraform-plugin-testing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-plugin-sdk.