Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Resource references not being populated properly #142

Open
morgante opened this issue Jun 10, 2020 · 2 comments
Open

Resource references not being populated properly #142

morgante opened this issue Jun 10, 2020 · 2 comments
Assignees
Labels
persistent-bug Hard to diagnose or long lived bugs for which resolutions are more like feature work than bug work

Comments

@morgante
Copy link
Contributor

When resources are cross-referenced, the dependent field is computed (not known until after apply). Currently, we omit computed fields entirely but this breaks validations (for example).

Instead, we should fill in computed fields with a sensible default/fake value which can be used to pass validations.

@morgante morgante added the bug Something isn't working label Jun 10, 2020
@morgante morgante self-assigned this Jun 10, 2020
@morgante
Copy link
Contributor Author

I took an initial stab at this in #143 which injects _computed_ for all computed properties but this ends up polluting output quite a bit. It's also not type-aware.

Overall, I think we want to take a more fundamental look at how generation happens before trying to fix this. In particular, I think our customer TerraformResourceData approach seems potentially misguided in the 0.12 world and we should look at integrating https://github.com/hashicorp/terraform-plugin-sdk more.

@melinath melinath added persistent-bug Hard to diagnose or long lived bugs for which resolutions are more like feature work than bug work and removed bug Something isn't working labels May 3, 2021
@marktru
Copy link

marktru commented Dec 23, 2021

Internal issue: b/211887747

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
persistent-bug Hard to diagnose or long lived bugs for which resolutions are more like feature work than bug work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants