terraform: if components is closed, initialize closed components
This was happening if the shadow initializes a provider that is never used by the real side. We need to make sure it starts closed.
This commit is contained in:
parent
d87bdc2d2b
commit
5d598ad217
|
@ -208,6 +208,10 @@ func (f *shadowComponentFactoryShared) ResourceProvider(
|
|||
real, shadow := newShadowResourceProvider(p)
|
||||
entry.Real = real
|
||||
entry.Shadow = shadow
|
||||
|
||||
if f.closed {
|
||||
shadow.CloseShadow()
|
||||
}
|
||||
}
|
||||
|
||||
// Store the value
|
||||
|
@ -246,6 +250,10 @@ func (f *shadowComponentFactoryShared) ResourceProvisioner(
|
|||
real, shadow := newShadowResourceProvisioner(p)
|
||||
entry.Real = real
|
||||
entry.Shadow = shadow
|
||||
|
||||
if f.closed {
|
||||
shadow.CloseShadow()
|
||||
}
|
||||
}
|
||||
|
||||
// Store the value
|
||||
|
|
Loading…
Reference in New Issue