You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we produce diagnostics for any attribute which is marked as "required" in the [JSON] provider schema. This is often correct in the simple cases, e.g. value in the output block:
However, it is incorrect/misleading in more complex cases, typically in provider blocks, which frequently get configured via environment variables:
The distinction between "just required" and "required if not supplied as environment variable" is currently embedded in the providers, as can be shown for the two cases above:
Unfortunately, this distinction (the existence of a possible default) is not surfaced in an accessible way - i.e. it's not part of the JSON machine-readable schema (terraform providers schema -json) we use to inform the validation.
Proposal
Consider disabling validation of required attributes
Background
This is more of a meta issue describing a problem with "required-ness" of attributes, which was originally reported in
Currently, we produce diagnostics for any attribute which is marked as "required" in the [JSON] provider schema. This is often correct in the simple cases, e.g.
value
in theoutput
block:However, it is incorrect/misleading in more complex cases, typically in
provider
blocks, which frequently get configured via environment variables:The distinction between "just required" and "required if not supplied as environment variable" is currently embedded in the providers, as can be shown for the two cases above:
Unfortunately, this distinction (the existence of a possible default) is not surfaced in an accessible way - i.e. it's not part of the JSON machine-readable schema (
terraform providers schema -json
) we use to inform the validation.Proposal
The text was updated successfully, but these errors were encountered: