-
Notifications
You must be signed in to change notification settings - Fork 69
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
bug with required provider attributes w/ env variables #12
Comments
See upstream [bug report](hashicorp/terraform-plugin-docs#12).
See upstream [bug report](hashicorp/terraform-plugin-docs#12). ## Test Plan * [ ] CI ## References * hashicorp/terraform-plugin-docs#12
This is a tough one and I agree its confusing. In terms of how Terraform views this flag (ie. if someone were to run Typically how I solve this now though is to just indicate in the description if there is some defaulting mechanism or an environment variable read for a value. For example see this: https://github.com/paultyng/terraform-provider-unifi/blob/464f55255fafedf62fd3edcd7df678aa9d61e517/internal/provider/provider.go#L38-L39 You can override how the description text is generated in the SDK as well if you want to further customize those strings, see this example: https://github.com/hashicorp/terraform-provider-scaffolding/blob/bec212504f3fc7ad42e5f3a80425cb95872dda28/internal/provider/provider.go#L15-L23 |
…e-Labs#343) See upstream [bug report](hashicorp/terraform-plugin-docs#12). ## Test Plan * [ ] CI ## References * hashicorp/terraform-plugin-docs#12
…e-Labs#343) See upstream [bug report](hashicorp/terraform-plugin-docs#12). ## Test Plan * [ ] CI ## References * hashicorp/terraform-plugin-docs#12
…e-Labs#343) See upstream [bug report](hashicorp/terraform-plugin-docs#12). ## Test Plan * [ ] CI ## References * hashicorp/terraform-plugin-docs#12
UnicornGlobal/has-changes-action#5 There is a bug in ghe generator where the presence of the env var will cause a diff during generation. We hack around this by blanking out the env var during generation. hashicorp/terraform-plugin-docs#12
I have been trying to make use of this project with terraform-provider-snowflake and am very excited for it, since it means I could delete my half-baked code that did similar work.
We have run into one limitation – required provider configuration which accepts environment variables.
When using this configuration, running
terraform providers schema -json
will vary its configuration for these inputs based on whether or not the environment variables are present. For the linked example, if theSNOWFLAKE_USER
environment variable is set, thenusername
will be marked as "optional". If the env variable is not preset, it will be set as "required".For purposes of documentation, it seems like it should always be marked as "required".
The text was updated successfully, but these errors were encountered: