mirror of
https://github.com/thegeeklab/wp-opentofu.git
synced 2024-11-22 10:40:39 +00:00
Merge pull request #16 from jeffastorey/terraform-get
terraform get and gofmt
This commit is contained in:
commit
a61567ecef
@ -4,7 +4,7 @@
|
|||||||
# docker build --rm=true -t plugins/drone-terraform .
|
# docker build --rm=true -t plugins/drone-terraform .
|
||||||
|
|
||||||
FROM gliderlabs/alpine:3.2
|
FROM gliderlabs/alpine:3.2
|
||||||
RUN apk-install ca-certificates
|
RUN apk-install ca-certificates git
|
||||||
|
|
||||||
ENV TERRAFORM_VERSION 0.6.14
|
ENV TERRAFORM_VERSION 0.6.14
|
||||||
|
|
||||||
|
8
main.go
8
main.go
@ -56,6 +56,7 @@ func main() {
|
|||||||
commands = append(commands, deleteCache())
|
commands = append(commands, deleteCache())
|
||||||
commands = append(commands, remoteConfigCommand(remote))
|
commands = append(commands, remoteConfigCommand(remote))
|
||||||
}
|
}
|
||||||
|
commands = append(commands, getModules())
|
||||||
commands = append(commands, planCommand(vargs.Vars))
|
commands = append(commands, planCommand(vargs.Vars))
|
||||||
if !vargs.Plan {
|
if !vargs.Plan {
|
||||||
commands = append(commands, applyCommand())
|
commands = append(commands, applyCommand())
|
||||||
@ -115,6 +116,13 @@ func remoteConfigCommand(config remote) *exec.Cmd {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getModules() *exec.Cmd {
|
||||||
|
return exec.Command(
|
||||||
|
"terraform",
|
||||||
|
"get",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
func planCommand(variables map[string]string) *exec.Cmd {
|
func planCommand(variables map[string]string) *exec.Cmd {
|
||||||
args := []string{
|
args := []string{
|
||||||
"plan",
|
"plan",
|
||||||
|
Loading…
Reference in New Issue
Block a user