hcl2 maps now work
This commit is contained in:
parent
2e505083cd
commit
fe0957deb7
|
@ -82,12 +82,11 @@ func (t *hcl2Configurable) Config() (*Config, error) {
|
||||||
Config hcl2.Body `hcl:",remain"`
|
Config hcl2.Body `hcl:",remain"`
|
||||||
}
|
}
|
||||||
type module struct {
|
type module struct {
|
||||||
Name string `hcl:"name,label"`
|
Name string `hcl:"name,label"`
|
||||||
Source string `hcl:"source,attr"`
|
Source string `hcl:"source,attr"`
|
||||||
Version *string `hcl:"version,attr"`
|
Version *string `hcl:"version,attr"`
|
||||||
// FIXME, maps not working
|
Providers *map[string]string `hcl:"providers,attr"`
|
||||||
// Providers *map[string]string `hcl:"providers,attr"`
|
Config hcl2.Body `hcl:",remain"`
|
||||||
Config hcl2.Body `hcl:",remain"`
|
|
||||||
}
|
}
|
||||||
type resourceLifecycle struct {
|
type resourceLifecycle struct {
|
||||||
CreateBeforeDestroy *bool `hcl:"create_before_destroy,attr"`
|
CreateBeforeDestroy *bool `hcl:"create_before_destroy,attr"`
|
||||||
|
@ -256,9 +255,9 @@ func (t *hcl2Configurable) Config() (*Config, error) {
|
||||||
m.Version = *rawM.Version
|
m.Version = *rawM.Version
|
||||||
}
|
}
|
||||||
|
|
||||||
//if rawM.Providers != nil {
|
if rawM.Providers != nil {
|
||||||
// m.Providers = *rawM.Providers
|
m.Providers = *rawM.Providers
|
||||||
//}
|
}
|
||||||
|
|
||||||
config.Modules = append(config.Modules, m)
|
config.Modules = append(config.Modules, m)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue