rake_terraform 1.11.0 → 1.16.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +120 -32
- data/Rakefile +110 -37
- data/bin/console +4 -3
- data/lib/rake_terraform.rb +33 -114
- data/lib/rake_terraform/task_sets.rb +4 -0
- data/lib/rake_terraform/task_sets/all.rb +48 -40
- data/lib/rake_terraform/task_sets/provider.rb +168 -0
- data/lib/rake_terraform/task_sets/terraform.rb +179 -0
- data/lib/rake_terraform/tasks.rb +2 -0
- data/lib/rake_terraform/tasks/destroy.rb +30 -25
- data/lib/rake_terraform/tasks/output.rb +26 -21
- data/lib/rake_terraform/tasks/plan.rb +29 -24
- data/lib/rake_terraform/tasks/provision.rb +30 -26
- data/lib/rake_terraform/tasks/validate.rb +26 -21
- data/lib/rake_terraform/version.rb +3 -1
- data/rake_terraform.gemspec +36 -14
- metadata +145 -77
- data/.circleci/config.yml +0 -56
- data/.circleci/gpg.private.enc +0 -0
- data/.envrc +0 -5
- data/.git-crypt/.gitattributes +0 -4
- data/.git-crypt/keys/default/0/41D2606F66C3FF28874362B61A16916844CE9D82.gpg +0 -0
- data/.git-crypt/keys/default/0/AAE932B730C2BA697FFDFAE05DA390873E38358B.gpg +0 -0
- data/.gitattributes +0 -1
- data/.gitignore +0 -32
- data/.rspec +0 -2
- data/.ruby-version +0 -1
- data/CHANGELOG.md +0 -35
- data/config/secrets/.unlocked +0 -1
- data/config/secrets/ci/encryption.passphrase +0 -1
- data/config/secrets/ci/gpg.private +0 -58
- data/config/secrets/ci/gpg.public +0 -31
- data/config/secrets/ci/ssh.private +0 -51
- data/config/secrets/ci/ssh.public +0 -1
- data/config/secrets/circle_ci/config.yaml +0 -2
- data/config/secrets/github/config.yaml +0 -2
- data/config/secrets/rubygems/credentials +0 -2
- data/go +0 -56
- data/scripts/ci/common/configure-git.sh +0 -8
- data/scripts/ci/common/configure-rubygems.sh +0 -16
- data/scripts/ci/common/install-git-crypt.sh +0 -8
- data/scripts/ci/common/install-gpg-key.sh +0 -19
- data/scripts/ci/steps/prerelease.sh +0 -16
- data/scripts/ci/steps/release.sh +0 -18
- data/scripts/ci/steps/test.sh +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47f55aa9a595370ed1f405492791f178e0f2e532ac4ae132ab4a9686978ec6be
|
4
|
+
data.tar.gz: 31709ec776abc2f745c9361693bd0d9b3c657f8b18b7a978e95c14cbefe5d605
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6bad9acb193c43b44422f995974010af3296d3f59759a54279eb1436c558c9199c0806480d3e120d914f3538363fa171b74832d3a2f83f943343be0b67b1949
|
7
|
+
data.tar.gz: f93d1ffa1051d13bb2ae28d91410577bc999d1d485593525ba663cbe583bdef3051e8ceedf20f4d2a412e91efed3f0bc325e34daddca0b7d1f75b21b2a11b58f
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,93 +1,173 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rake_terraform (1.
|
4
|
+
rake_terraform (1.16.0.pre.1)
|
5
5
|
colored2 (~> 3.1)
|
6
|
-
rake_dependencies (~> 2
|
7
|
-
rake_factory (
|
8
|
-
ruby-terraform (
|
6
|
+
rake_dependencies (~> 2.9)
|
7
|
+
rake_factory (~> 0.23)
|
8
|
+
ruby-terraform (~> 1.1)
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (5.2.
|
13
|
+
activesupport (5.2.6)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
15
|
i18n (>= 0.7, < 2)
|
16
16
|
minitest (~> 5.1)
|
17
17
|
tzinfo (~> 1.1)
|
18
18
|
addressable (2.7.0)
|
19
19
|
public_suffix (>= 2.0.2, < 5.0)
|
20
|
+
ast (2.4.2)
|
21
|
+
coderay (1.1.3)
|
20
22
|
colored2 (3.1.2)
|
21
|
-
concurrent-ruby (1.1.
|
23
|
+
concurrent-ruby (1.1.8)
|
22
24
|
diff-lcs (1.4.4)
|
23
|
-
|
25
|
+
docile (1.3.5)
|
26
|
+
excon (0.81.0)
|
24
27
|
fakefs (0.20.1)
|
25
|
-
faraday (1.1
|
28
|
+
faraday (1.4.1)
|
29
|
+
faraday-excon (~> 1.1)
|
30
|
+
faraday-net_http (~> 1.0)
|
31
|
+
faraday-net_http_persistent (~> 1.1)
|
26
32
|
multipart-post (>= 1.2, < 3)
|
27
|
-
ruby2_keywords
|
28
|
-
|
33
|
+
ruby2_keywords (>= 0.0.4)
|
34
|
+
faraday-excon (1.1.0)
|
35
|
+
faraday-net_http (1.0.1)
|
36
|
+
faraday-net_http_persistent (1.1.0)
|
37
|
+
ffi (1.15.0)
|
38
|
+
formatador (0.2.5)
|
39
|
+
gem-release (2.2.1)
|
40
|
+
guard (2.16.2)
|
41
|
+
formatador (>= 0.2.4)
|
42
|
+
listen (>= 2.7, < 4.0)
|
43
|
+
lumberjack (>= 1.0.12, < 2.0)
|
44
|
+
nenv (~> 0.1)
|
45
|
+
notiffany (~> 0.0)
|
46
|
+
pry (>= 0.9.12)
|
47
|
+
shellany (~> 0.0)
|
48
|
+
thor (>= 0.18.1)
|
49
|
+
guard-compat (1.2.1)
|
50
|
+
guard-rspec (4.7.3)
|
51
|
+
guard (~> 2.1)
|
52
|
+
guard-compat (~> 1.1)
|
53
|
+
rspec (>= 2.99.0, < 4.0)
|
29
54
|
hamster (3.0.0)
|
30
55
|
concurrent-ruby (~> 1.0)
|
31
|
-
i18n (1.8.
|
56
|
+
i18n (1.8.10)
|
32
57
|
concurrent-ruby (~> 1.0)
|
33
|
-
|
58
|
+
immutable-struct (2.4.1)
|
59
|
+
lino (2.7.0)
|
34
60
|
hamster (~> 3.0)
|
35
61
|
open4 (~> 1.3)
|
62
|
+
listen (3.5.1)
|
63
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
64
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
65
|
+
lumberjack (1.2.8)
|
66
|
+
method_source (1.0.0)
|
36
67
|
minitar (0.9)
|
37
|
-
minitest (5.14.
|
68
|
+
minitest (5.14.4)
|
38
69
|
multipart-post (2.1.1)
|
39
|
-
|
70
|
+
nenv (0.3.0)
|
71
|
+
notiffany (0.1.3)
|
72
|
+
nenv (~> 0.1)
|
73
|
+
shellany (~> 0.0)
|
74
|
+
octokit (4.21.0)
|
40
75
|
faraday (>= 0.9)
|
41
76
|
sawyer (~> 0.8.0, >= 0.5.3)
|
42
77
|
open4 (1.3.4)
|
78
|
+
parallel (1.20.1)
|
79
|
+
parser (3.0.1.1)
|
80
|
+
ast (~> 2.4.1)
|
81
|
+
pry (0.14.1)
|
82
|
+
coderay (~> 1.1)
|
83
|
+
method_source (~> 1.0)
|
43
84
|
public_suffix (4.0.6)
|
44
|
-
|
45
|
-
|
85
|
+
rainbow (3.0.0)
|
86
|
+
rake (13.0.3)
|
87
|
+
rake_circle_ci (0.9.0)
|
46
88
|
colored2 (~> 3.1)
|
47
89
|
excon (~> 0.72)
|
48
90
|
rake_factory (~> 0.23)
|
49
91
|
sshkey (~> 2.0)
|
50
|
-
rake_dependencies (2.
|
92
|
+
rake_dependencies (2.9.0)
|
51
93
|
hamster (~> 3.0)
|
52
94
|
minitar (~> 0.9)
|
53
95
|
rake_factory (~> 0.23)
|
54
96
|
rubyzip (>= 1.3)
|
55
|
-
rake_factory (0.
|
97
|
+
rake_factory (0.29.0)
|
56
98
|
activesupport (>= 4)
|
57
99
|
rake (~> 13.0)
|
58
|
-
rake_github (0.
|
100
|
+
rake_github (0.7.0)
|
59
101
|
colored2 (~> 3.1)
|
60
102
|
octokit (~> 4.16)
|
61
103
|
rake_factory (~> 0.23)
|
62
104
|
sshkey (~> 2.0)
|
63
|
-
|
105
|
+
rake_gpg (0.14.0)
|
106
|
+
rake_factory (>= 0.23, < 1)
|
107
|
+
ruby_gpg2 (>= 0.6, < 1)
|
108
|
+
rake_ssh (0.6.0)
|
64
109
|
colored2 (~> 3.1)
|
65
110
|
rake_factory (~> 0.23)
|
66
111
|
sshkey (~> 2.0)
|
112
|
+
rb-fsevent (0.11.0)
|
113
|
+
rb-inotify (0.10.1)
|
114
|
+
ffi (~> 1.0)
|
115
|
+
regexp_parser (2.1.1)
|
116
|
+
rexml (3.2.5)
|
67
117
|
rspec (3.10.0)
|
68
118
|
rspec-core (~> 3.10.0)
|
69
119
|
rspec-expectations (~> 3.10.0)
|
70
120
|
rspec-mocks (~> 3.10.0)
|
71
|
-
rspec-core (3.10.
|
121
|
+
rspec-core (3.10.1)
|
72
122
|
rspec-support (~> 3.10.0)
|
73
|
-
rspec-expectations (3.10.
|
123
|
+
rspec-expectations (3.10.1)
|
74
124
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
125
|
rspec-support (~> 3.10.0)
|
76
|
-
rspec-mocks (3.10.
|
126
|
+
rspec-mocks (3.10.2)
|
77
127
|
diff-lcs (>= 1.2.0, < 2.0)
|
78
128
|
rspec-support (~> 3.10.0)
|
79
|
-
rspec-support (3.10.
|
80
|
-
|
129
|
+
rspec-support (3.10.2)
|
130
|
+
rubocop (1.14.0)
|
131
|
+
parallel (~> 1.10)
|
132
|
+
parser (>= 3.0.0.0)
|
133
|
+
rainbow (>= 2.2.2, < 4.0)
|
134
|
+
regexp_parser (>= 1.8, < 3.0)
|
135
|
+
rexml
|
136
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
137
|
+
ruby-progressbar (~> 1.7)
|
138
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
139
|
+
rubocop-ast (1.5.0)
|
140
|
+
parser (>= 3.0.1.1)
|
141
|
+
rubocop-rake (0.5.1)
|
142
|
+
rubocop
|
143
|
+
rubocop-rspec (2.3.0)
|
144
|
+
rubocop (~> 1.0)
|
145
|
+
rubocop-ast (>= 1.1.0)
|
146
|
+
ruby-progressbar (1.11.0)
|
147
|
+
ruby-terraform (1.1.0)
|
148
|
+
immutable-struct (~> 2.4)
|
149
|
+
lino (~> 2.7)
|
150
|
+
ruby2_keywords (0.0.4)
|
151
|
+
ruby_gpg2 (0.8.0)
|
81
152
|
lino (>= 1.5)
|
82
|
-
ruby2_keywords (0.0.2)
|
83
153
|
rubyzip (2.3.0)
|
84
154
|
sawyer (0.8.2)
|
85
155
|
addressable (>= 2.3.5)
|
86
156
|
faraday (> 0.8, < 2.0)
|
157
|
+
shellany (0.0.1)
|
158
|
+
simplecov (0.21.2)
|
159
|
+
docile (~> 1.1)
|
160
|
+
simplecov-html (~> 0.11)
|
161
|
+
simplecov_json_formatter (~> 0.1)
|
162
|
+
simplecov-html (0.12.3)
|
163
|
+
simplecov_json_formatter (0.1.3)
|
87
164
|
sshkey (2.0.0)
|
165
|
+
thor (1.1.0)
|
88
166
|
thread_safe (0.3.6)
|
89
|
-
tzinfo (1.2.
|
167
|
+
tzinfo (1.2.9)
|
90
168
|
thread_safe (~> 0.1)
|
169
|
+
unicode-display_width (2.0.0)
|
170
|
+
yard (0.9.26)
|
91
171
|
|
92
172
|
PLATFORMS
|
93
173
|
ruby
|
@@ -96,13 +176,21 @@ DEPENDENCIES
|
|
96
176
|
activesupport (~> 5.2)
|
97
177
|
bundler (~> 2.0)
|
98
178
|
fakefs (~> 0.18)
|
99
|
-
gem-release (~> 2.
|
179
|
+
gem-release (~> 2.1)
|
180
|
+
guard (~> 2.16)
|
181
|
+
guard-rspec (~> 4.7)
|
100
182
|
rake (~> 13.0)
|
101
|
-
rake_circle_ci (~> 0.
|
102
|
-
rake_github (~> 0.
|
103
|
-
|
183
|
+
rake_circle_ci (~> 0.9)
|
184
|
+
rake_github (~> 0.5)
|
185
|
+
rake_gpg (~> 0.12)
|
186
|
+
rake_ssh (~> 0.4)
|
104
187
|
rake_terraform!
|
105
188
|
rspec (~> 3.9)
|
189
|
+
rubocop (~> 1.12)
|
190
|
+
rubocop-rake (~> 0.5)
|
191
|
+
rubocop-rspec (~> 2.2)
|
192
|
+
simplecov (~> 0.21)
|
193
|
+
yard (~> 0.9)
|
106
194
|
|
107
195
|
BUNDLED WITH
|
108
|
-
2.
|
196
|
+
2.2.17
|
data/Rakefile
CHANGED
@@ -1,79 +1,152 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'yaml'
|
4
|
+
require 'yard'
|
2
5
|
require 'rake_circle_ci'
|
3
6
|
require 'rake_github'
|
4
7
|
require 'rake_ssh'
|
8
|
+
require 'rake_gpg'
|
9
|
+
require 'securerandom'
|
5
10
|
require 'rspec/core/rake_task'
|
11
|
+
require 'rubocop/rake_task'
|
12
|
+
|
13
|
+
task default: %i[
|
14
|
+
library:fix
|
15
|
+
test:unit
|
16
|
+
]
|
17
|
+
|
18
|
+
namespace :encryption do
|
19
|
+
namespace :passphrase do
|
20
|
+
desc 'Generate encryption passphrase for CI GPG key'
|
21
|
+
task :generate do
|
22
|
+
File.open('config/secrets/ci/encryption.passphrase', 'w') do |f|
|
23
|
+
f.write(SecureRandom.base64(36))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
namespace :keys do
|
30
|
+
namespace :deploy do
|
31
|
+
RakeSSH.define_key_tasks(
|
32
|
+
path: 'config/secrets/ci/',
|
33
|
+
comment: 'maintainers@infrablocks.io'
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
namespace :gpg do
|
38
|
+
RakeGPG.define_generate_key_task(
|
39
|
+
output_directory: 'config/secrets/ci',
|
40
|
+
name_prefix: 'gpg',
|
41
|
+
owner_name: 'InfraBlocks Maintainers',
|
42
|
+
owner_email: 'maintainers@infrablocks.io',
|
43
|
+
owner_comment: 'rake_terraform CI Key'
|
44
|
+
)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
RuboCop::RakeTask.new
|
6
49
|
|
7
|
-
|
50
|
+
YARD::Rake::YardocTask.new do |t|
|
51
|
+
t.files = ['lib/**/*.rb']
|
52
|
+
t.options = %w[--embed-mixins --output-dir docs]
|
53
|
+
end
|
54
|
+
|
55
|
+
namespace :library do
|
56
|
+
desc 'Run all checks of the library'
|
57
|
+
task check: [:rubocop]
|
58
|
+
|
59
|
+
desc 'Attempt to automatically fix issues with the library'
|
60
|
+
task fix: [:'rubocop:auto_correct']
|
61
|
+
end
|
62
|
+
|
63
|
+
namespace :documentation do
|
64
|
+
desc 'Generate documentation'
|
65
|
+
task generate: [:yard]
|
66
|
+
|
67
|
+
desc 'Commit documentation'
|
68
|
+
task :commit, [:skip] do |_, args|
|
69
|
+
args.with_defaults(skip: 'true')
|
8
70
|
|
9
|
-
|
71
|
+
skip_ci = args.skip == 'true'
|
10
72
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
73
|
+
sh('git', 'commit',
|
74
|
+
'-a',
|
75
|
+
'-m', "Generate latest documentation#{skip_ci ? ' [ci skip]' : ''}")
|
76
|
+
end
|
77
|
+
|
78
|
+
desc 'Update documentation'
|
79
|
+
task update: %i[generate commit]
|
80
|
+
end
|
81
|
+
|
82
|
+
namespace :test do
|
83
|
+
RSpec::Core::RakeTask.new(:unit)
|
84
|
+
end
|
16
85
|
|
17
86
|
RakeCircleCI.define_project_tasks(
|
18
|
-
|
19
|
-
|
87
|
+
namespace: :circle_ci,
|
88
|
+
project_slug: 'github/infrablocks/rake_terraform'
|
20
89
|
) do |t|
|
21
90
|
circle_ci_config =
|
22
|
-
|
91
|
+
YAML.load_file('config/secrets/circle_ci/config.yaml')
|
23
92
|
|
24
|
-
t.api_token = circle_ci_config[
|
93
|
+
t.api_token = circle_ci_config['circle_ci_api_token']
|
25
94
|
t.environment_variables = {
|
26
|
-
|
27
|
-
|
28
|
-
|
95
|
+
ENCRYPTION_PASSPHRASE:
|
96
|
+
File.read('config/secrets/ci/encryption.passphrase')
|
97
|
+
.chomp
|
29
98
|
}
|
99
|
+
t.checkout_keys = []
|
30
100
|
t.ssh_keys = [
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
101
|
+
{
|
102
|
+
hostname: 'github.com',
|
103
|
+
private_key: File.read('config/secrets/ci/ssh.private')
|
104
|
+
}
|
35
105
|
]
|
36
106
|
end
|
37
107
|
|
38
108
|
RakeGithub.define_repository_tasks(
|
39
|
-
|
40
|
-
|
109
|
+
namespace: :github,
|
110
|
+
repository: 'infrablocks/rake_terraform'
|
41
111
|
) do |t|
|
42
112
|
github_config =
|
43
|
-
|
113
|
+
YAML.load_file('config/secrets/github/config.yaml')
|
44
114
|
|
45
|
-
t.access_token = github_config[
|
115
|
+
t.access_token = github_config['github_personal_access_token']
|
46
116
|
t.deploy_keys = [
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
117
|
+
{
|
118
|
+
title: 'CircleCI',
|
119
|
+
public_key: File.read('config/secrets/ci/ssh.public')
|
120
|
+
}
|
51
121
|
]
|
52
122
|
end
|
53
123
|
|
54
124
|
namespace :pipeline do
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
125
|
+
desc 'Prepare CircleCI Pipeline'
|
126
|
+
task prepare: %i[
|
127
|
+
circle_ci:project:follow
|
128
|
+
circle_ci:env_vars:ensure
|
129
|
+
circle_ci:checkout_keys:ensure
|
130
|
+
circle_ci:ssh_keys:ensure
|
131
|
+
github:deploy_keys:ensure
|
59
132
|
]
|
60
133
|
end
|
61
134
|
|
62
135
|
namespace :version do
|
63
|
-
desc
|
136
|
+
desc 'Bump version for specified type (pre, major, minor, patch)'
|
64
137
|
task :bump, [:type] do |_, args|
|
65
138
|
bump_version_for(args.type)
|
66
139
|
end
|
67
140
|
end
|
68
141
|
|
69
|
-
desc
|
142
|
+
desc 'Release gem'
|
70
143
|
task :release do
|
71
|
-
sh
|
144
|
+
sh 'gem release --tag --push'
|
72
145
|
end
|
73
146
|
|
74
147
|
def bump_version_for(version_type)
|
75
|
-
sh "gem bump --version #{version_type} "
|
76
|
-
|
77
|
-
|
78
|
-
|
148
|
+
sh "gem bump --version #{version_type} " \
|
149
|
+
'&& bundle install ' \
|
150
|
+
'&& export LAST_MESSAGE="$(git log -1 --pretty=%B)" ' \
|
151
|
+
'&& git commit -a --amend -m "${LAST_MESSAGE} [ci skip]"'
|
79
152
|
end
|
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'rake_terraform'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "rake/terraform"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start(__FILE__)
|