Last active
June 25, 2019 22:00
-
-
Save ekini/2770b54ad619967928eaa04fc496a162 to your computer and use it in GitHub Desktop.
Fixes terraform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From dd541ab89ff6fb870994277cc846d844e9444f41 Mon Sep 17 00:00:00 2001 | |
From: Eugene Dementyev <e@dementyev.me> | |
Date: Tue, 25 Jun 2019 13:46:10 +1200 | |
Subject: [PATCH] Fixes undefined variables in terraform | |
--- | |
backend/unparsed_value.go | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/backend/unparsed_value.go b/backend/unparsed_value.go | |
index 5d7b4d3c4..6eaba91a8 100644 | |
--- a/backend/unparsed_value.go | |
+++ b/backend/unparsed_value.go | |
@@ -51,7 +51,7 @@ func ParseVariableValues(vv map[string]UnparsedVariableValue, decls map[string]* | |
if !declared { | |
switch val.SourceType { | |
- case terraform.ValueFromConfig, terraform.ValueFromAutoFile, terraform.ValueFromNamedFile: | |
+ case terraform.ValueFromConfig, terraform.ValueFromAutoFile: | |
// These source types have source ranges, so we can produce | |
// a nice error message with good context. | |
// | |
@@ -72,7 +72,7 @@ func ParseVariableValues(vv map[string]UnparsedVariableValue, decls map[string]* | |
} | |
seenUndeclaredInFile++ | |
- case terraform.ValueFromEnvVar: | |
+ case terraform.ValueFromEnvVar, terraform.ValueFromNamedFile: | |
// We allow and ignore undeclared names for environment | |
// variables, because users will often set these globally | |
// when they are used across many (but not necessarily all) | |
-- | |
2.21.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment