pulumi / pulumi-std

Standard library functions implemented as a native Pulumi provider to be consumed from all Pulumi supported languages
Apache License 2.0
2 stars 2 forks source link

matchkeys doesn't match terraform matchkeys #21

Open Frassle opened 1 year ago

Frassle commented 1 year ago

matchkeys in std (https://github.com/pulumi/pulumi-std/blob/master/std/matchkeys.go) is only take two parameters, "values" and "searchList". Terraform documents matchkeys as taking three parameters, "valuesList", "keysList" and "searchSet": https://developer.hashicorp.com/terraform/language/functions/matchkeys

We should update our matchkeys to match.

RobbieMcKinstry commented 1 year ago

I marked this as "breaking" because changing the API is technically a breaking change, but because this package doesn't currently have any semantic versioning guarantees, I don't think that should dissuade us from making this change.

Frassle commented 1 year ago

👍 as you point out this is pre-v1 so we're ok to make breaking changes, and that is the current expectation for this provider (we're not yet advertising as something for people to really use yet)

justinvp commented 6 months ago

We've already shipped 1.x, but I think it's still reasonable to make this change as this provider is currently primarily used for converted programs and I don't expect anyone to be currently using matchkeys.

justinvp commented 6 months ago

Although, this is one of those that likely falls in the bucket of https://github.com/pulumi/pulumi-std/issues/19. Currently, our matchkeys operates on strings, but in TF, it's operating on collections of any type.