From 82d2c5b4848c172798af9a7e9c0cc48961592c5d Mon Sep 17 00:00:00 2001 From: James Bardin Date: Fri, 1 Jun 2018 22:05:08 -0400 Subject: [PATCH] core: use absolute address in CloserProvider Otherwsie relative addresses may collide and close the incorrect provider. --- terraform/eval_context_builtin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/eval_context_builtin.go b/terraform/eval_context_builtin.go index af46a23bb..4d0cc590b 100644 --- a/terraform/eval_context_builtin.go +++ b/terraform/eval_context_builtin.go @@ -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 {