|
@ -5,6 +5,7 @@ import ( |
|
|
"os" |
|
|
"os" |
|
|
|
|
|
|
|
|
"github.com/Sirupsen/logrus" |
|
|
"github.com/Sirupsen/logrus" |
|
|
|
|
|
"github.com/joho/godotenv" |
|
|
"github.com/urfave/cli" |
|
|
"github.com/urfave/cli" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
@ -125,6 +126,10 @@ func run(c *cli.Context) error { |
|
|
"Revision": revision, |
|
|
"Revision": revision, |
|
|
}).Info("Drone Terraform Plugin Version") |
|
|
}).Info("Drone Terraform Plugin Version") |
|
|
|
|
|
|
|
|
|
|
|
if c.String("env_file") != "" { |
|
|
|
|
|
_ = godotenv.Load(c.String("env_file")) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var vars map[string]string |
|
|
var vars map[string]string |
|
|
if c.String("vars") != "" { |
|
|
if c.String("vars") != "" { |
|
|
if err := json.Unmarshal([]byte(c.String("vars")), &vars); err != nil { |
|
|
if err := json.Unmarshal([]byte(c.String("vars")), &vars); err != nil { |
|
@ -157,7 +162,6 @@ func run(c *cli.Context) error { |
|
|
Parallelism: c.Int("parallelism"), |
|
|
Parallelism: c.Int("parallelism"), |
|
|
Targets: c.StringSlice("targets"), |
|
|
Targets: c.StringSlice("targets"), |
|
|
VarFiles: c.StringSlice("var_files"), |
|
|
VarFiles: c.StringSlice("var_files"), |
|
|
EnvFile: c.String("env_file"), |
|
|
|
|
|
TerraformDataDir: c.String("tf_data_dir"), |
|
|
TerraformDataDir: c.String("tf_data_dir"), |
|
|
}, |
|
|
}, |
|
|
Netrc: Netrc{ |
|
|
Netrc: Netrc{ |
|
|