fog_to_terraform 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/README.md +3 -3
- data/fog_to_terraform.gemspec +2 -2
- data/lib/fog_to_terraform/app.rb +3 -2
- data/lib/fog_to_terraform/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08cc58c4003126e8b1113a0d1b47e7da9a1e2498
|
4
|
+
data.tar.gz: f7913c9b51600eac1e3348538b7bd66405f600cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ee02f285082119ee1242ba7f3933bdf2fb79ff257360288a70ec16710eb3fdcbe530dd7bb92809f255b1e6979a402e6bcf747c72ee4f56c5e8cbec0b6d6d710
|
7
|
+
data.tar.gz: ce06bd4f35f0c16ca1600e93a573ff1ce33286c2fad9a99717710a72bc21c18e8ac64f158fbb614ae602fb772fd8e449094316a5288dea24281dec69bc0cba55
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
fog to terraform
|
2
2
|
================
|
3
3
|
|
4
|
-
Creates a `terraform.
|
4
|
+
Creates a `terraform.tfvars` input variable file for terraform plans using credentials from a fog-formatted YAML file.
|
5
5
|
|
6
6
|
Given the following example fog file (defaults to `~/.fog`\):
|
7
7
|
|
@@ -12,13 +12,13 @@ Given the following example fog file (defaults to `~/.fog`\):
|
|
12
12
|
:aws_secret_access_key: SECRET
|
13
13
|
```
|
14
14
|
|
15
|
-
A `terraform.
|
15
|
+
A `terraform.tfvars` file will be created in the current folder with the following command:
|
16
16
|
|
17
17
|
```
|
18
18
|
fog_to_terraform -C path/to/fog.yml student1
|
19
19
|
```
|
20
20
|
|
21
|
-
The output `/path/to/terraform.
|
21
|
+
The output `/path/to/terraform.tfvars` will look like:
|
22
22
|
|
23
23
|
```hcl
|
24
24
|
aws_access_key = "ACCESS"
|
data/fog_to_terraform.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = FogToTerraform::VERSION
|
9
9
|
spec.authors = ["Dr Nic Williams"]
|
10
10
|
spec.email = ["drnicwilliams@gmail.com"]
|
11
|
-
spec.summary = %q{Creates a `terraform.
|
12
|
-
spec.description = %q{Creates a `terraform.
|
11
|
+
spec.summary = %q{Creates a `terraform.tfvars` input variable file for terraform plans using credentials from a fog-formatted YAML file.}
|
12
|
+
spec.description = %q{Creates a `terraform.tfvars` input variable file for terraform plans using credentials from a fog-formatted YAML file.}
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
data/lib/fog_to_terraform/app.rb
CHANGED
@@ -57,7 +57,7 @@ class FogToTerraform::App
|
|
57
57
|
aws_key_path = "ssh/#{credentials_key.to_s}.pem"
|
58
58
|
aws_key_name = credentials_key.to_s
|
59
59
|
|
60
|
-
File.open("terraform.
|
60
|
+
File.open("terraform.tfvars", "w") do |f|
|
61
61
|
f << <<-EOS
|
62
62
|
aws_access_key = "#{aws_access_key_id}"
|
63
63
|
aws_secret_key = "#{aws_secret_access_key}"
|
@@ -67,7 +67,7 @@ aws_region = "#{aws_region}"
|
|
67
67
|
network = "10.10"
|
68
68
|
EOS
|
69
69
|
end
|
70
|
-
puts "created terraform.
|
70
|
+
puts "created terraform.tfvars"
|
71
71
|
|
72
72
|
|
73
73
|
settings.set "provider.name", "aws"
|
@@ -79,6 +79,7 @@ network = "10.10"
|
|
79
79
|
|
80
80
|
keypair = Cyoi::Cli::KeyPair.new([aws_key_name, settings_dir])
|
81
81
|
keypair.execute!
|
82
|
+
reload_settings!
|
82
83
|
|
83
84
|
mkdir_p(File.dirname(aws_key_path))
|
84
85
|
chmod(0700, File.dirname(aws_key_path))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog_to_terraform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr Nic Williams
|
@@ -52,8 +52,8 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
|
-
description: Creates a `terraform.
|
56
|
-
credentials from a fog-formatted YAML file.
|
55
|
+
description: Creates a `terraform.tfvars` input variable file for terraform plans
|
56
|
+
using credentials from a fog-formatted YAML file.
|
57
57
|
email:
|
58
58
|
- drnicwilliams@gmail.com
|
59
59
|
executables:
|
@@ -94,6 +94,6 @@ rubyforge_project:
|
|
94
94
|
rubygems_version: 2.4.3
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
|
-
summary: Creates a `terraform.
|
98
|
-
from a fog-formatted YAML file.
|
97
|
+
summary: Creates a `terraform.tfvars` input variable file for terraform plans using
|
98
|
+
credentials from a fog-formatted YAML file.
|
99
99
|
test_files: []
|