core: use absolute address in CloserProvider

Otherwsie relative addresses may collide and close the incorrect
provider.
This commit is contained in:
James Bardin 2018-06-01 22:05:08 -04:00 committed by Martin Atkins
parent a2c76a28f5
commit 82d2c5b484
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ func (ctx *BuiltinEvalContext) CloseProvider(addr addrs.ProviderConfig) error {
ctx.ProviderLock.Lock()
defer ctx.ProviderLock.Unlock()
key := addr.String()
key := addr.Absolute(ctx.Path()).String()
var provider interface{}
provider = ctx.ProviderCache[key]
if provider != nil {