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
Reference validation was introduced as part of #1357 and further refactored in #1346
In short, this produces the following diagnostics
We have decided to implement only validation of variables (var.* references) and local values (local.*). All other references are currently excluded from validation.
data sources (data.*)
resources
modules
"extensions"
self.* references
each.*
count.index
provider aliases (e.g. aws.east in a provider attribute of a resource)
Most of these were initially excluded because they are fully or in part dependent on us knowing full schema where we more often may not. e.g. user may be using provider supercloud and has references to resources such as supercloud_instance.foo.public_ip and because we may not know the schema of supercloud we cannot tell whether the full reference is valid or not, i.e. whether public_ip exists on supercloud_instance.
Ideally we should be able to at least validate parts of the reference, e.g. tell whether supercloud_instance.foo is valid, i.e. whether resource "supercloud_instance" "foo" was declared or not, but this all requires a more complex solution we have not implemented yet.
Context
Reference validation was introduced as part of #1357 and further refactored in #1346
In short, this produces the following diagnostics
We have decided to implement only validation of variables (
var.*
references) and local values (local.*
). All other references are currently excluded from validation.data.*
)self.*
referenceseach.*
count.index
aws.east
in aprovider
attribute of aresource
)Most of these were initially excluded because they are fully or in part dependent on us knowing full schema where we more often may not. e.g. user may be using provider
supercloud
and has references to resources such assupercloud_instance.foo.public_ip
and because we may not know the schema ofsupercloud
we cannot tell whether the full reference is valid or not, i.e. whetherpublic_ip
exists onsupercloud_instance
.Ideally we should be able to at least validate parts of the reference, e.g. tell whether
supercloud_instance.foo
is valid, i.e. whetherresource "supercloud_instance" "foo"
was declared or not, but this all requires a more complex solution we have not implemented yet.Proposal
aws_instance.*
orresource.aws_instance.*
)data.*
)module.*
)aws.foo-alias
inprovider
attribute)self.*
each.*
count.index
dynamic
block'scontent
The text was updated successfully, but these errors were encountered: