Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #246 from mattgartman/cert-bundle-fix
Browse files Browse the repository at this point in the history
Added option to use AWS bundled ca cert Fixes #171
  • Loading branch information
dtan4 authored Jul 26, 2016
2 parents 6ae7c37 + 21f027f commit 1596db2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ aws_secret_access_key = FugaFuga
$ terraforming s3 --profile hoge
```

You can force the AWS SDK to utilize the CA certificate that is bundled with the SDK for systems where the default OpenSSL certificate is not installed (e.g. Windows) by utilizing the `--use-bundled-cert` option.

```bash
PS C:\> terraforming ec2 --use-bundled-cert
```

## Usage

```bash
Expand Down
4 changes: 4 additions & 0 deletions lib/terraforming/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ class CLI < Thor
class_option :tfstate, type: :boolean, desc: "Generate tfstate"
class_option :profile, type: :string, desc: "AWS credentials profile"
class_option :region, type: :string, desc: "AWS region"
class_option :use_bundled_cert,
type: :boolean,
desc: "Use the bundled CA certificate from AWS SDK"

desc "asg", "AutoScaling Group"
def asg
Expand Down Expand Up @@ -202,6 +205,7 @@ def vgw
def execute(klass, options)
Aws.config[:credentials] = Aws::SharedCredentials.new(profile_name: options[:profile]) if options[:profile]
Aws.config[:region] = options[:region] if options[:region]
Aws.use_bundled_cert! if options[:use_bundled_cert]
result = options[:tfstate] ? tfstate(klass, options[:merge]) : tf(klass)

if options[:tfstate] && options[:merge] && options[:overwrite]
Expand Down

0 comments on commit 1596db2

Please sign in to comment.