terraform: remove node module file

This commit is contained in:
Mitchell Hashimoto 2017-01-26 20:05:42 -08:00
parent 37294d5ad2
commit a6bab455cc
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 19 additions and 25 deletions

View File

@ -1,25 +0,0 @@
package terraform
import (
"fmt"
"strings"
)
func modulePrefixStr(p []string) string {
parts := make([]string, 0, len(p)*2)
for _, p := range p[1:] {
parts = append(parts, "module", p)
}
return strings.Join(parts, ".")
}
func modulePrefixList(result []string, prefix string) []string {
if prefix != "" {
for i, v := range result {
result[i] = fmt.Sprintf("%s.%s", prefix, v)
}
}
return result
}

View File

@ -300,3 +300,22 @@ func ReferenceFromInterpolatedVar(v config.InterpolatedVariable) []string {
return nil
}
}
func modulePrefixStr(p []string) string {
parts := make([]string, 0, len(p)*2)
for _, p := range p[1:] {
parts = append(parts, "module", p)
}
return strings.Join(parts, ".")
}
func modulePrefixList(result []string, prefix string) []string {
if prefix != "" {
for i, v := range result {
result[i] = fmt.Sprintf("%s.%s", prefix, v)
}
}
return result
}