diff --git a/db/Task.go b/db/Task.go index 0e38f9b6..5afb735b 100644 --- a/db/Task.go +++ b/db/Task.go @@ -15,12 +15,11 @@ type DefaultTaskParams struct { } type TerraformTaskParams struct { - Plan bool `json:"plan"` - Destroy bool `json:"destroy"` - AutoApprove bool `json:"auto_approve"` - Upgrade bool `json:"upgrade"` - MigrateState bool `json:"migrate_state"` - Reconfigure bool `json:"reconfigure"` + Plan bool `json:"plan"` + Destroy bool `json:"destroy"` + AutoApprove bool `json:"auto_approve"` + Upgrade bool `json:"upgrade"` + Reconfigure bool `json:"reconfigure"` } type AnsibleTaskParams struct { diff --git a/db_lib/TerraformApp.go b/db_lib/TerraformApp.go index 1a2b6db4..d24e7766 100644 --- a/db_lib/TerraformApp.go +++ b/db_lib/TerraformApp.go @@ -98,12 +98,10 @@ func (t *TerraformApp) init(environmentVars []string, params *db.TerraformTaskPa args = append(args, "-upgrade") } - if params.MigrateState { - args = append(args, "-migrate-state") - } - if params.Reconfigure { args = append(args, "-reconfigure") + } else { + args = append(args, "-migrate-state") } cmd := t.makeCmd(t.Name, args, environmentVars) diff --git a/go.mod b/go.mod index 3a12cc04..3e707bba 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( github.com/go-gorp/gorp/v3 v3.1.0 github.com/go-ldap/ldap/v3 v3.4.8 github.com/go-sql-driver/mysql v1.8.1 + github.com/golang-jwt/jwt/v4 v4.5.1 github.com/google/go-github v17.0.0+incompatible github.com/gorilla/context v1.1.2 github.com/gorilla/handlers v1.5.2 diff --git a/go.sum b/go.sum index b2bd9cfe..cd503f7a 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,8 @@ github.com/go-ldap/ldap/v3 v3.4.8 h1:loKJyspcRezt2Q3ZRMq2p/0v8iOurlmeXDPw6fikSvQ github.com/go-ldap/ldap/v3 v3.4.8/go.mod h1:qS3Sjlu76eHfHGpUdWkAXQTw4beih+cHsco2jXlIXrk= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo= +github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= diff --git a/web/src/components/TaskParamsForm.vue b/web/src/components/TaskParamsForm.vue index 3f4ba47d..8d996b45 100644 --- a/web/src/components/TaskParamsForm.vue +++ b/web/src/components/TaskParamsForm.vue @@ -86,18 +86,6 @@ - - - - - -