core: use absolute address in CloserProvider
Otherwsie relative addresses may collide and close the incorrect provider.
This commit is contained in:
parent
a2c76a28f5
commit
82d2c5b484
|
@ -146,7 +146,7 @@ func (ctx *BuiltinEvalContext) CloseProvider(addr addrs.ProviderConfig) error {
|
||||||
ctx.ProviderLock.Lock()
|
ctx.ProviderLock.Lock()
|
||||||
defer ctx.ProviderLock.Unlock()
|
defer ctx.ProviderLock.Unlock()
|
||||||
|
|
||||||
key := addr.String()
|
key := addr.Absolute(ctx.Path()).String()
|
||||||
var provider interface{}
|
var provider interface{}
|
||||||
provider = ctx.ProviderCache[key]
|
provider = ctx.ProviderCache[key]
|
||||||
if provider != nil {
|
if provider != nil {
|
||||||
|
|
Loading…
Reference in New Issue