Skip to content

Commit

Permalink
Merge pull request #36 from UKHomeOffice/add-path-style-flag
Browse files Browse the repository at this point in the history
Add a s3 path style option
  • Loading branch information
lewismarshall committed Sep 18, 2018
2 parents cda4eef + 55b70c5 commit d544ef2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ func newCliApplication() *cli.App {
Name: "endpoint-url",
Usage: "the aws s3 endpoint to use",
},
cli.BoolFlag{
Name: "s3-path-style",
Usage: "use a path instead of DNS for bucket name",
},
cli.StringFlag{
Name: "environment-file",
Usage: "a file containing a list of environment variables",
Expand Down Expand Up @@ -194,6 +198,9 @@ func (r *cliCommand) getCredentials() func(cx *cli.Context) error {
endpoint := cx.GlobalString("endpoint-url")
config.Endpoint = &endpoint
}
if cx.GlobalBool("s3-path-style") {
config.S3ForcePathStyle = aws.Bool(true)
}

// step: are we using static credentials
if cx.GlobalString("access-key") != "" || cx.GlobalString("secret-ket") != "" {
Expand Down

0 comments on commit d544ef2

Please sign in to comment.