mirror of
https://github.com/thegeeklab/wp-opentofu.git
synced 2024-11-22 10:40:39 +00:00
Add -var-file and -var to destroy operation ; Go fmt the code
This commit is contained in:
parent
08402ee4d0
commit
4ebb830452
@ -255,6 +255,13 @@ func tfDestroy(config Config) *exec.Cmd {
|
|||||||
for _, v := range config.Targets {
|
for _, v := range config.Targets {
|
||||||
args = append(args, fmt.Sprintf("-target=%s", v))
|
args = append(args, fmt.Sprintf("-target=%s", v))
|
||||||
}
|
}
|
||||||
|
for _, v := range config.VarFiles {
|
||||||
|
args = append(args, "-var-file", fmt.Sprintf("%s", v))
|
||||||
|
}
|
||||||
|
for k, v := range config.Vars {
|
||||||
|
args = append(args, "-var")
|
||||||
|
args = append(args, fmt.Sprintf("%s=%s", k, v))
|
||||||
|
}
|
||||||
if config.Parallelism > 0 {
|
if config.Parallelism > 0 {
|
||||||
args = append(args, fmt.Sprintf("-parallelism=%d", config.Parallelism))
|
args = append(args, fmt.Sprintf("-parallelism=%d", config.Parallelism))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user