nexoform 0.0.1 → 0.0.2
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/bin/nexoform +39 -22
- data/lib/nexoform/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 235d3949df2a548cbdeb011cb174b77319ac8823
|
4
|
+
data.tar.gz: 020a865bbe63ac73dc3b65a35f73dc663194cfc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 154cf0ca5348c61aa7b7a47cfb46fe91441ca5af59404cc6e94bc3d3061c2f1d1949d98dbbe9908936b093ec87826d2b96fa2f66101d6bf9ba8d574718096f28
|
7
|
+
data.tar.gz: 7ead5faf89db2b3113a52d25477b866abf6826c9f7ec780647348c1ddecb4709d2831159df4ec065c663a18068d7c342127364f04590a8654dc0bd75b5cb2738
|
data/bin/nexoform
CHANGED
@@ -17,29 +17,21 @@ def default_plan_filename
|
|
17
17
|
'nexoform.tfplan'
|
18
18
|
end
|
19
19
|
|
20
|
+
# Temporary fix for https://github.com/erikhuda/thor/issues/398
|
21
|
+
class Thor
|
22
|
+
module Shell
|
23
|
+
class Basic
|
24
|
+
def print_wrapped(message, options = {})
|
25
|
+
stdout.puts message
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
20
31
|
class NexoformBin < Thor
|
21
32
|
class_option :environment, type: :string, aliases: 'e', required: false
|
22
33
|
class_option :assume_yes, type: :boolean, aliases: 'y', default: false
|
23
34
|
|
24
|
-
desc 'apply', 'Apply changes (Runs a terraform apply)'
|
25
|
-
long_desc <<-LONGDESC
|
26
|
-
Applies any applicable changes. Under the hood, this
|
27
|
-
command runs a terraform apply.
|
28
|
-
|
29
|
-
If you pass --plan, the specified file will be used for the plan
|
30
|
-
If you pass --noplan, no plan file will be used
|
31
|
-
If you don't pass either, no plan file will be used unless the default
|
32
|
-
is present. If it is, you'll be prompted about using it
|
33
|
-
|
34
|
-
> $ nexoform apply --environment 'dev' [--plan=#{default_plan_filename}]
|
35
|
-
LONGDESC
|
36
|
-
option :plan, type: :string, aliases: 'p', required: false
|
37
|
-
option :noplan, type: :boolean, aliases: 'n', default: false
|
38
|
-
option :overwrite, type: :boolean, required: false
|
39
|
-
def apply
|
40
|
-
exec_apply(options)
|
41
|
-
end
|
42
|
-
|
43
35
|
desc 'plan', 'Print out changes that will be made on next apply (runs a terraform plan)'
|
44
36
|
long_desc <<-LONGDESC
|
45
37
|
Prints out any changes that will be made the next time
|
@@ -51,20 +43,45 @@ class NexoformBin < Thor
|
|
51
43
|
If you pass '--nosave' or '-n' the plan will not be saved
|
52
44
|
If you pass none of those, you'll be prompted about saving the plan
|
53
45
|
|
54
|
-
> $ nexoform plan
|
46
|
+
> $ nexoform plan
|
47
|
+
> $ nexoform plan --environment 'dev'
|
48
|
+
> $ nexoform plan --environment 'dev' --save --overwrite
|
49
|
+
> $ nexoform plan --environment 'dev' --out='#{default_plan_filename}'
|
55
50
|
LONGDESC
|
56
51
|
option :out, type: :string, aliases: 'o', required: false
|
57
52
|
option :save, type: :boolean, aliases: 's', required: false
|
58
53
|
option :nosave, type: :boolean, aliases: 'n', required: false
|
59
|
-
option :overwrite, type: :boolean, required: false
|
54
|
+
option :overwrite, type: :boolean, aliases: 'w', required: false
|
60
55
|
def plan
|
61
56
|
exec_plan(options)
|
62
57
|
end
|
63
58
|
|
59
|
+
desc 'apply', 'Apply changes (Runs a terraform apply)'
|
60
|
+
long_desc <<-LONGDESC
|
61
|
+
Applies any applicable changes. Under the hood, this command runs a
|
62
|
+
terraform apply.
|
63
|
+
|
64
|
+
If you pass --plan, the specified file will be used for the plan
|
65
|
+
If you pass --noplan, no plan file will be used
|
66
|
+
If you don't pass either, no plan file will be used unless the default
|
67
|
+
is present. If it is, you'll be prompted about using it
|
68
|
+
|
69
|
+
> $ nexoform apply
|
70
|
+
> $ nexoform apply --environment 'dev'
|
71
|
+
> $ nexoform apply --environment 'dev' --noplan
|
72
|
+
> $ nexoform apply --environment 'dev' --plan=#{default_plan_filename}
|
73
|
+
LONGDESC
|
74
|
+
option :plan, type: :string, aliases: 'p', required: false
|
75
|
+
option :noplan, type: :boolean, aliases: 'n', default: false
|
76
|
+
def apply
|
77
|
+
exec_apply(options)
|
78
|
+
end
|
79
|
+
|
64
80
|
desc 'destroy', 'Destroy all provisioned resources (runs a terraform destroy)'
|
65
81
|
long_desc <<-LONGDESC
|
66
82
|
Destroys any resources that have been provisioned
|
67
83
|
|
84
|
+
> $ nexoform destroy
|
68
85
|
> $ nexoform destroy --environment 'dev'
|
69
86
|
LONGDESC
|
70
87
|
def destroy
|
@@ -96,7 +113,7 @@ class NexoformBin < Thor
|
|
96
113
|
LONGDESC
|
97
114
|
option :force, type: :boolean, aliases: 'f', default: false
|
98
115
|
option :upgrade, type: :boolean, aliases: 'u', default: false
|
99
|
-
option :'project-name', type: :string, aliases: '
|
116
|
+
option :'project-name', type: :string, aliases: 'p', required: false
|
100
117
|
def config_file
|
101
118
|
exec_config_file(options)
|
102
119
|
end
|
data/lib/nexoform/version.rb
CHANGED