tfmod-generator 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d9e146dcd05f8b3a38b8bfd7ecc7b6760d69009
4
- data.tar.gz: bf588f812aa924bcd33781b2a52a4ea66d8b3770
3
+ metadata.gz: 30e5c6cfa3eb6fc7ddf9e9294bf207072dc48819
4
+ data.tar.gz: 9ca187e5d06b65b7d68430b44f4d7429b71a2c3c
5
5
  SHA512:
6
- metadata.gz: f24b1afe4dd106830277100f7402e34097308b559784fb2ed8e4de4e78e4344bb0988f7da6750aa842f2c7a22672f0918401b834fb950c8d8fc26e39722e3f2f
7
- data.tar.gz: 85b66da15e9fa9c100da82d0a86bc67435180917a2c854aa0a17dede6fe61446d4fad7a7c0a8eb9f11bb2cd0a69f032c4e20e4f4a7155700ee7dbea1531e5392
6
+ metadata.gz: b798a98c66b7d4ef763f39bb832d4077d7ee35ac5bad41b2b7d794b32051cd3b20de565995e51c0b18466965a300e84b280286663fbb05854ef47fa949904067
7
+ data.tar.gz: c15f008f5ab533fc31e42cefad5bdefe35863f878d251782364f4092242fc4a4ba7f6e109b516b65d2e327a3aa1667ec47407d7ec6b61a03b5a28fa3bdd61569
data/README.md CHANGED
@@ -19,9 +19,13 @@ $ tfmod zookeeper
19
19
  create zookeeper/main.tf
20
20
  create zookeeper/outputs.tf
21
21
  create zookeeper/variables.tf
22
+ create zookeeper/remote_scripts
23
+ create zookeeper/remote_scripts/user-data.sh.tpl
22
24
  create zookeeper/test
25
+ create zookeeper/test/test.tf
23
26
  run git init zookeeper from "."
24
27
  Initialized empty Git repository in /Users/zane/src/tfmod-generator/zookeeper/.git/
28
+ /Users/zane/src/tfmod-generator/zookeeper created!
25
29
  ```
26
30
 
27
31
  ## Development
data/bin/tfmod CHANGED
@@ -6,7 +6,7 @@ require 'tfmod/generator'
6
6
  # Main class
7
7
  class TfModuleGenerator < Thor::Group
8
8
  include Thor::Actions
9
- # Override namespace which defaults to classname
9
+ # Override namespace which defaults to classname
10
10
  # http://www.rubydoc.info/github/erikhuda/thor/Thor%2FBase%2FClassMethods:namespace
11
11
  namespace :''
12
12
  argument :name
@@ -51,12 +51,16 @@ class TfModuleGenerator < Thor::Group
51
51
  empty_directory("#{name}/test")
52
52
  end
53
53
 
54
+ def create_test_file
55
+ template('../templates/test.tf.erb', "#{name}/test/test.tf")
56
+ end
57
+
54
58
  def git_init
55
59
  run("git init #{name}")
56
60
  end
57
-
58
- def create_module_done
59
- puts "#{name} created!"
61
+
62
+ def create_module_done
63
+ puts "#{Dir.pwd}/#{name} created!"
60
64
  end
61
65
  end
62
66
 
@@ -1,5 +1,5 @@
1
1
  module Tfmod
2
2
  module Generator
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
@@ -0,0 +1,28 @@
1
+ provider "aws" {
2
+ region = "us-west-2"
3
+ }
4
+
5
+ // test module useage
6
+ module '<%= name %>' {
7
+ source = "../"
8
+ name = "terraform-test-<%= name %>"
9
+ tags = {
10
+ team = "${var.tags["team"]}"
11
+ product = "${var.tags["product"]}"
12
+ service = "${var.tags["service"]}"
13
+ environment = "${var.tags["environment"]}"
14
+ owner = "${var.tags["owner"]}"
15
+ }
16
+
17
+ // The variables file for <%= name.capitalize %> test
18
+ variables "tags" {
19
+ type = "map"
20
+
21
+ default = {
22
+ team = "dataplatform"
23
+ product = "silverbullet"
24
+ service = "microservice1"
25
+ environment = "dev"
26
+ owner = "zane"
27
+ }
28
+ }
@@ -7,7 +7,7 @@ variables "tags" {
7
7
  team = "unknown"
8
8
  product = "unknown"
9
9
  service = "unknown"
10
- environment = "uknown"
11
- owner = "uknown"
10
+ environment = "unknown"
11
+ owner = "unknown"
12
12
  }
13
13
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tfmod-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - zane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-07 00:00:00.000000000 Z
11
+ date: 2017-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -105,6 +105,7 @@ files:
105
105
  - templates/gitignore.erb
106
106
  - templates/main.tf.erb
107
107
  - templates/outputs.tf.erb
108
+ - templates/test.tf.erb
108
109
  - templates/user-data.sh.erb
109
110
  - templates/variables.tf.erb
110
111
  - tfmod-generator.gemspec