Merge pull request #9062 from hashicorp/jbardin/race-fix

Fix race on Provisioner.RawConfig
This commit is contained in:
James Bardin 2016-10-04 12:23:31 -04:00 committed by GitHub
commit 828aa7cfb4
1 changed files with 2 additions and 2 deletions

View File

@ -215,13 +215,13 @@ func (n *EvalApplyProvisioners) apply(ctx EvalContext) error {
provisioner := ctx.Provisioner(prov.Type)
// Interpolate the provisioner config
provConfig, err := ctx.Interpolate(prov.RawConfig, n.InterpResource)
provConfig, err := ctx.Interpolate(prov.RawConfig.Copy(), n.InterpResource)
if err != nil {
return err
}
// Interpolate the conn info, since it may contain variables
connInfo, err := ctx.Interpolate(prov.ConnInfo, n.InterpResource)
connInfo, err := ctx.Interpolate(prov.ConnInfo.Copy(), n.InterpResource)
if err != nil {
return err
}