forked from coinbase/odin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
odin.rb
39 lines (33 loc) · 1.13 KB
/
odin.rb
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
# GeoEngineer Resources For Step Function Deployer
# GEO_ENV=development bundle exec geo apply resources/odin.rb
########################################
### ENVIRONMENT ###
########################################
env = environment('development') {
region ENV.fetch('AWS_REGION')
account_id ENV.fetch('AWS_ACCOUNT_ID')
}
########################################
### PROJECT ###
########################################
project = project('coinbase', 'odin') {
environments 'development'
tags {
ProjectName "coinbase/odin"
ConfigName "development"
DeployWith "step-deployer"
self[:org] = "coinbase"
self[:project] = "odin"
}
}
context = {
assumed_role_name: "coinbase-odin-assumed",
assumable_from: [ ENV['AWS_ACCOUNT_ID'] ],
assumed_policy_file: "#{__dir__}/odin_assumed_policy.json.erb"
}
project.from_template('bifrost_deployer', 'odin', {
lambda_policy_file: "#{__dir__}/odin_lambda_policy.json.erb",
lambda_policy_context: context
})
# The assumed role exists in all environments
project.from_template('step_assumed', 'coinbase-odin-assumed', context)