]>
Commit | Line | Data |
---|---|---|
bae9f6d2 JC |
1 | package terraform |
2 | ||
3 | import ( | |
107c1cdb ND |
4 | "fmt" |
5 | ||
6 | "github.com/hashicorp/terraform/addrs" | |
bae9f6d2 JC |
7 | ) |
8 | ||
107c1cdb ND |
9 | // PathObjectCacheKey is like PathCacheKey but includes an additional name |
10 | // to be included in the key, for module-namespaced objects. | |
11 | // | |
12 | // The result of this function is guaranteed unique for any distinct pair | |
13 | // of path and name, but is not guaranteed to be in any particular format | |
14 | // and in particular should never be shown to end-users. | |
15 | func PathObjectCacheKey(path addrs.ModuleInstance, objectName string) string { | |
16 | return fmt.Sprintf("%s|%s", path.String(), objectName) | |
bae9f6d2 | 17 | } |