mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
terraform: make sure the config is initialized
This commit is contained in:
parent
8f4cd641df
commit
d0dc045282
@ -201,6 +201,7 @@ func graphAddConfigResources(
|
|||||||
Resource: &Resource{
|
Resource: &Resource{
|
||||||
Id: name,
|
Id: name,
|
||||||
State: state,
|
State: state,
|
||||||
|
Config: NewResourceConfig(r.RawConfig),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -431,6 +432,7 @@ func graphAddOrphans(g *depgraph.Graph, c *config.Config, s *State) {
|
|||||||
Resource: &Resource{
|
Resource: &Resource{
|
||||||
Id: k,
|
Id: k,
|
||||||
State: rs,
|
State: rs,
|
||||||
|
Config: NewResourceConfig(nil),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -135,8 +135,11 @@ func (c *ResourceConfig) interpolate(ctx *Context) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.raw != nil {
|
||||||
c.ComputedKeys = c.raw.UnknownKeys()
|
c.ComputedKeys = c.raw.UnknownKeys()
|
||||||
c.Raw = c.raw.Raw
|
c.Raw = c.raw.Raw
|
||||||
c.Config = c.raw.Config()
|
c.Config = c.raw.Config()
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user