mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-27 09:21:14 -06:00
d8f4c1f618
Previously when looking up cached provider input, the Input was taken in its entirety, and only provider configuration fields that weren't in the saved input were added. This would cause providers in modules to use the entire configuration from parent modules, even if they themselves had entirely different configs. Note: this is only marginally beter than the old behavior. It may be slightly more correct, but stil can't account for the user's intent, and may be adding configured values from one provider into another. Change the PathCacheKey to just join the path on a non-path character (|), which makes for easier debugging.
11 lines
173 B
Go
11 lines
173 B
Go
package terraform
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// PathCacheKey returns a cache key for a module path.
|
|
func PathCacheKey(path []string) string {
|
|
return strings.Join(path, "|")
|
|
}
|