-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat: Support MarkAsComputed
Flag in SchemaInfo struct
#1570
Comments
@iwahbe @t0yv0 I already started an implementation for this. https://github.com/tmeckel/pulumi-terraform-bridge/tree/feat/mark-as-computed |
SchemaInfo struct
MarkAsComputed
Flag in SchemaInfo struct
Hi @tmeckel. I'm having trouble understanding how |
@iwahbe Terraform Resource properties come with the following matrix of combinations of hashicorp/terraform-plugin-framework#31
From my understanding the existing The proposed Because it's most of the time quicker to handle such errors directly in the wrapped Pulumi provider instead in the upstream TF provider, although this might contradict the spirit of open source, having the new flag CC @t0yv0 |
There's 4 kinds of attributes, Required, Optional, Computed, and Computed Optional. The latter are the most complex ones. I haven't had a look to dive deeper here but I can easily believe we might have some gap in switches that make this work as you'd expect if you want to change upstream attribute kind. |
@t0yv0 That's what I meant: we might have the same flags in the bridge as in the Terraform SDK/PF so that we can override the settings made in the upstream provider. So perhaps |
Hello!
Issue details
In the past there were issues with various Terraform providers where people carelessly removed
the
computed` flag from a property so that the value can't be read after a deployment only when the value is set in the first place as configuration value.Currently the
SchmaInfo
struct contains the flagMarkAsComputedOnly
that copes with the way around, because it will mark the parameter ascomputed
and not allow the user to set it.Adding a flag
MarkAsComputed *bool
toSchemaInfo struct
would allow to enforce a property from an upstream resource to be computed.Perhaps it would be necessary to reduce the proliferation of the various resource flags, by mimic the flags which are available for a resource inside the Terraform SDK or Plugin Framework, even if this would mean to introduce a breaking change.
Affected area/feature
Controlling provider schema generation
The text was updated successfully, but these errors were encountered: