|
|
|
|
@ -254,15 +254,19 @@ func decodeProviderInstallationFromConfig(hclFile *hclast.File) ([]*ProviderInst
|
|
|
|
|
))
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
unsetEnvVars := make(map[string]bool)
|
|
|
|
|
interpolatedPath := os.Expand(rawPath, func(envVarName string) string {
|
|
|
|
|
if value, ok := os.LookupEnv(envVarName); ok {
|
|
|
|
|
return value
|
|
|
|
|
} else {
|
|
|
|
|
diags = diags.Append(tfdiags.Sourceless(
|
|
|
|
|
tfdiags.Error,
|
|
|
|
|
"Interpolated environment variable not set",
|
|
|
|
|
fmt.Sprintf("The environment variable %s is not set or empty and can result in undesired behavior", envVarName),
|
|
|
|
|
))
|
|
|
|
|
if _, reported := unsetEnvVars[envVarName]; !reported {
|
|
|
|
|
diags = diags.Append(tfdiags.Sourceless(
|
|
|
|
|
tfdiags.Error,
|
|
|
|
|
"Interpolated environment variable not set",
|
|
|
|
|
fmt.Sprintf("The environment variable %s is not set or empty and can result in undesired behavior", envVarName),
|
|
|
|
|
))
|
|
|
|
|
unsetEnvVars[envVarName] = true
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|