@ -2,16 +2,16 @@ package main
import (
import (
"fmt"
"fmt"
"io/ioutil"
"os"
"os/exec"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sts"
"github.com/aws/aws-sdk-go/service/sts"
"github.com/drone/drone-plugin-go/plugin"
"github.com/drone/drone-plugin-go/plugin"
"io/ioutil"
"os"
"os/exec"
"strings"
"time"
)
)
var (
var (
@ -25,6 +25,7 @@ type terraform struct {
Cacert string ` json:"ca_cert" `
Cacert string ` json:"ca_cert" `
Sensitive bool ` json:"sensitive" `
Sensitive bool ` json:"sensitive" `
RoleARN string ` json:"role_arn_to_assume" `
RoleARN string ` json:"role_arn_to_assume" `
RootDir string ` json:"root_dir" `
}
}
type remote struct {
type remote struct {
@ -64,6 +65,9 @@ func main() {
for _ , c := range commands {
for _ , c := range commands {
c . Env = os . Environ ( )
c . Env = os . Environ ( )
c . Dir = workspace . Path
c . Dir = workspace . Path
if vargs . RootDir != "" {
c . Dir = c . Dir + "/" + vargs . RootDir
}
c . Stdout = os . Stdout
c . Stdout = os . Stdout
c . Stderr = os . Stderr
c . Stderr = os . Stderr
if ! vargs . Sensitive {
if ! vargs . Sensitive {