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

Support computed values in TypeSet #195

Open
mavogel opened this issue Oct 7, 2019 · 3 comments
Open

Support computed values in TypeSet #195

mavogel opened this issue Oct 7, 2019 · 3 comments
Labels
enhancement New feature or request subsystem/types Issues and feature requests related to the type system of Terraform and our shims around it. terraform-plugin-framework Resolved in terraform-plugin-framework

Comments

@mavogel
Copy link

mavogel commented Oct 7, 2019

Currently Computed within lists work but no in sets. Each time they give a dirty plan due to the hash change.

Steps to reproduce are in the branch: https://github.com/terraform-providers/terraform-provider-docker/tree/investigate-type-set-list-fail

@gdavison
Copy link
Contributor

I've confirmed that this same error occurs when updating a TypeSet with TypeString elements, so it likely affects TypeSet in general.

We're encountering the error when updating an aws_elasticache_replication_group (hashicorp/terraform-provider-aws#17161). Creation works as expected, and a subsequent refresh will correct state.

@gdavison
Copy link
Contributor

As pointed out in hashicorp/terraform-provider-aws#17161 (comment), this needs a CustomizeDiff function with a call to diff.SetNewComputed()

@smaeda-ks
Copy link

Hi @gdavison and @bflad,

I was looking at your comment: hashicorp/terraform-provider-aws#17161 (comment) as we're also facing the same issue in our provider, which we're trying to fix.

One thing I wanted to get your confirmation is that, is this the case only for TypeSet computed attributes? I've been testing this but looks like other schema types computed attributes are being updated correctly upon an update action, but not TypeSet.

The above comment, as well as this community post, was giving me the impression that it's a generic limitation for all computed attributes regardless of the schema types. So just wanted to clarify that before implementing the fix using d.SetNewComputed().

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request subsystem/types Issues and feature requests related to the type system of Terraform and our shims around it. terraform-plugin-framework Resolved in terraform-plugin-framework
Projects
None yet
Development

No branches or pull requests

6 participants