-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
51 lines (41 loc) · 1.08 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
$:.unshift File.join(File.dirname(__FILE__), 'lib')
require 'rake_terraform'
require 'confidante'
RakeTerraform.define_installation_tasks(
path: File.join(Dir.pwd, 'vendor', 'terraform'),
version: '0.11.1')
configuration = Confidante.configuration
task :default => [
:'bootstrap:plan',
:'common:plan'
]
namespace :bootstrap do
RakeTerraform.define_command_tasks do |t|
t.configuration_name = 'bootstrap'
t.source_directory = 'infra/bootstrap'
t.work_directory = 'build'
t.state_file = File.join(Dir.pwd, 'state/bootstrap.tfstate')
t.vars = lambda do
configuration
.for_scope(role: 'bootstrap')
.vars
end
end
end
namespace :common do
RakeTerraform.define_command_tasks do |t|
t.configuration_name = 'common'
t.source_directory = 'infra/common'
t.work_directory = 'build'
t.backend_config = lambda do
configuration
.for_scope(role: 'common')
.backend_config
end
t.vars = lambda do
configuration
.for_scope(role: 'common')
.vars
end
end
end