-
Notifications
You must be signed in to change notification settings - Fork 21
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
schema: Account for short (Registry) module source address #94
Conversation
@@ -51,7 +51,7 @@ func (m *SchemaMerger) SchemaForModule(meta *module.Meta) (*schema.BodySchema, e | |||
return nil, coreSchemaRequiredErr{} | |||
} | |||
|
|||
if meta == nil || m.schemaReader == nil { | |||
if meta == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just makes testing a bit easier as less tests require provider schema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just questions about the code structure.
Feel free to merge any time
}, | ||
} | ||
|
||
depSchema, err := schemaForDependentModuleBlock(module.LocalName, modMeta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the schemaForDependentModuleBlock
call here as we already fetched depSchema
in line 209?
Prior to this patch we'd expect all module manifest entries to match exactly with the
source
value, which is true in most/all cases of local modules, but not in case of remote modules - esp. those in the TF Registry.manifest entries
corresponding config
This therefore enables completion, hover, go-to-definition/reference etc. when remote modules from the Registry are involved: