rake-terraform 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmZiOTEzNThjZDlkMDU1MmQzOTJiMmNlMGFhY2E0ODg3ODdjMzQ1NA==
4
+ MWFiNjc0NjliYzBiNGEyNTUzZWUzMTIyOGIwNTM3NjUyMjkxNjAwZg==
5
5
  data.tar.gz: !binary |-
6
- YWFlOWViNWExNTNkNDhiYTZiMTg3Mjg3NWQ1MTQ2ZTliMzEzMTFmNQ==
6
+ MGU4ZTNlZDk2ODdmZWMyMGNjZjljZmY0NjUzN2YxZGNlYWMyYTkyYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmMzMDlhZTFiYmM0OGViOWRiYjYzZGYzMmI3YTA3Mjk4YjM4MTg1ZDQyZDU1
10
- Y2M2M2ZmN2E3MzQyZjBhYWMyZjk1MDkyZDU5YmY1ZDY0YjdiMjk5MDhiNTNm
11
- YzA3ZGVhMWQ0ZmZkODk1ZDU4NzA0N2FjZDJjYjU3ZWFiZjJkNjg=
9
+ Y2Q5NTdlZjk4YjNhN2NhOTE0ZTliNmU5M2VjYTUwZDRjZWI4MTcxOTUwM2Q3
10
+ MjZjODg3ZTFlMmM3OTQyODU2Y2RlNjkyN2VmNzExOGU5YjgwNWI5ZWQzNTQ4
11
+ NzM0MThkMTMwMjM1MDFjODQ1NjEzODg3YTZmMGJmZTg5Y2ZhMmU=
12
12
  data.tar.gz: !binary |-
13
- NTA2NGYxNThhZDZlZmIzYmVlNGYwZDFhY2ZmNDVmZTIxMzI3YjYxMjc1YzZk
14
- NDQ5OGIzMjQyYWEwYmY3NTc3ODc5YjE3ZDQ5OTIzYjZmYjBlZDY0MzcxMmM3
15
- ZTQ1ZWJhNGNjYjhkMGMyMmViNDYxZDYyOWNjYTg1NGU3NzRiOTE=
13
+ ZGNhYjA1Zjk1MWRjYWFlNWJhODAxMTBhMjAwYmY2MjZjNTUwNzI3ZjM5YThj
14
+ N2RiNGE3MWQ1MjgwYmU3YzNlOTNiNzMxMjQ2YTEwZTBjNDNhNGU3NTE5NGIz
15
+ MDcwNDczNjI4ZGNjNmZlZTlmYjEyYjZjNDY5MmQyMzBjNDgyNGY=
data/.gitignore CHANGED
@@ -13,4 +13,5 @@
13
13
  *.a
14
14
  mkmf.log
15
15
  terraform/
16
- .idea/
16
+ .idea/
17
+ output/
data/README.md CHANGED
@@ -95,6 +95,7 @@ The following environment variables can be set to tweak `default_task`'s behavio
95
95
  * `ENV['TERRAFORM_AWS_PROJECT']` - Sets `t.aws_project` on the `terraform_plan` tasks (default: `default`)
96
96
  * `ENV['TERRAFORM_ENVIRONMENT_GLOB']` - Dir glob used to discover terraform environments (default: `terraform/**/*.tf`)
97
97
  * `ENV['TERRAFORM_OUTPUT_BASE']` - Directory to which plan files are saved/read. The environment name is appended to this automatically (default: `output/terraform`)
98
+ * `ENV['TERRAFORM_CREDENTIAL_FILE']` - The path to your AWS credentials file (default: `~/.aws/credentials`)
98
99
 
99
100
  ## Contributing
100
101
 
@@ -3,6 +3,9 @@ require 'rake_terraform'
3
3
  namespace :terraform do
4
4
  env_glob = ENV['TERRAFORM_ENVIRONMENT_GLOB'] || 'terraform/**/*.tf'
5
5
  output_base = ENV['TERRAFORM_OUTPUT_BASE'] || 'output/terraform'
6
+ credential_file = ENV['TERRAFORM_CREDENTIAL_FILE'] || '~/.aws/credentials'
7
+ aws_project = ENV['TERRAFORM_AWS_PROJECT'] || 'default'
8
+
6
9
  environments = (Dir.glob env_glob).map { |f| File.dirname f }.uniq
7
10
 
8
11
  environments.each do |env|
@@ -12,8 +15,9 @@ namespace :terraform do
12
15
  desc "Plan migration of #{short_name}"
13
16
  terraform_plan "plan_#{short_name}" do |t|
14
17
  t.input_dir = env
15
- t.aws_project = ENV['TERRAFORM_AWS_PROJECT'] || 'default'
18
+ t.aws_project = aws_project
16
19
  t.output_file = plan_path
20
+ t.credentials = credential_file
17
21
  end
18
22
 
19
23
  desc "Execute plan for #{short_name}"
@@ -1,4 +1,4 @@
1
1
  # Version of the gem
2
2
  module RakeTerraform
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-terraform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norm MacLennan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-15 00:00:00.000000000 Z
11
+ date: 2015-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler