awx 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws/aws_cloudformation.rb +23 -7
- data/lib/aws/aws_outputter.rb +15 -11
- data/lib/aws/aws_profile.rb +13 -9
- data/lib/aws/aws_reports.rb +18 -16
- data/lib/awx.rb +76 -30
- data/lib/core/deployments.rb +65 -0
- data/lib/core/replacer.rb +282 -0
- data/lib/routes/{aws_cloudformation_create.rb → cloudformation_create.rb} +221 -116
- data/lib/routes/{aws_cloudformation_delete.rb → cloudformation_delete.rb} +1 -1
- data/lib/routes/{aws_cloudformation_detect_drift.rb → cloudformation_detect_drift.rb} +1 -1
- data/lib/routes/{aws_deploy.rb → deploy_deprecated.rb} +11 -8
- data/lib/routes/{aws_dynamo_db.rb → dynamo_db.rb} +1 -1
- data/lib/routes/infrastructure.rb +45 -0
- data/lib/routes/{aws_list.rb → list.rb} +20 -5
- data/lib/routes/ssh.rb +70 -0
- data/lib/routes/{aws_switch.rb → switch.rb} +1 -1
- data/lib/routes/upload.rb +49 -0
- data/lib/version.rb +1 -1
- data/opt/awx/deployment-schema.yml +57 -0
- data/opt/awx/reports.yml +105 -37
- data/opt/config/schema.yml +22 -0
- data/opt/config/template.yml +9 -1
- metadata +17 -11
@@ -2,7 +2,7 @@ require 'digest'
|
|
2
2
|
|
3
3
|
module AppCommand
|
4
4
|
|
5
|
-
class
|
5
|
+
class DeployDeprecated < ::Convoy::ActionCommand::Base
|
6
6
|
|
7
7
|
VALID_STACK_STATUSES = %w(CREATE_COMPLETE UPDATE_COMPLETE UPDATE_COMPLETE_CLEANUP_IN_PROGRESS)
|
8
8
|
MATCHERS_KEY_MAP = {
|
@@ -23,7 +23,7 @@ module AppCommand
|
|
23
23
|
@project = nil
|
24
24
|
@profile = App::AWSProfile::get_profile
|
25
25
|
|
26
|
-
Blufin::Projects::init(@profile
|
26
|
+
Blufin::Projects::init(@profile['Projects'])
|
27
27
|
|
28
28
|
opts_validate
|
29
29
|
opts_routing
|
@@ -38,6 +38,9 @@ module AppCommand
|
|
38
38
|
|
39
39
|
def opts_validate
|
40
40
|
|
41
|
+
# TODO - Remove this route once new deploy script is working.
|
42
|
+
raise RuntimeError, 'This route is deprecated and broken!'
|
43
|
+
|
41
44
|
@projects = Blufin::Projects::get_projects
|
42
45
|
|
43
46
|
# Throw Exception if there are no deployments. The script should never get this far.
|
@@ -100,7 +103,7 @@ module AppCommand
|
|
100
103
|
# # @return void
|
101
104
|
def deploy_lambda(project_name, project, profile)
|
102
105
|
|
103
|
-
project_id = project[Blufin::Projects::
|
106
|
+
project_id = project[Blufin::Projects::PROJECT_ID]
|
104
107
|
|
105
108
|
deployment_options = []
|
106
109
|
project[Blufin::Projects::TARGETS].each do |environment, data|
|
@@ -126,14 +129,14 @@ module AppCommand
|
|
126
129
|
targets.each do |target|
|
127
130
|
converted_commands = convert_commands(deploy_commands, target, profile, target[:region], Blufin::Projects::TYPE_LAMBDA)
|
128
131
|
dcmd_final[Digest::SHA2.hexdigest(converted_commands.inspect.to_s)] = {
|
129
|
-
:description => project[Blufin::Projects::
|
132
|
+
:description => project[Blufin::Projects::PROJECT_ID],
|
130
133
|
:commands => converted_commands
|
131
134
|
}
|
132
135
|
end
|
133
136
|
|
134
137
|
# Build deploy-descriptions array (after targets are selected).
|
135
138
|
deploy_descriptions = []
|
136
|
-
targets.each { |x| deploy_descriptions << "#{project[Blufin::Projects::
|
139
|
+
targets.each { |x| deploy_descriptions << "#{project[Blufin::Projects::PROJECT_ID]} \xe2\x80\x94 #{Blufin::Terminal::format_highlight(x[:environment])}" }
|
137
140
|
|
138
141
|
# Show prompt and perform deployment.
|
139
142
|
perform_deployment({}, nil, dcmd_final, deploy_descriptions, deploy_script['Path'], project, project_id, project_name, verbose: true, async: false, pbl: false)
|
@@ -144,11 +147,11 @@ module AppCommand
|
|
144
147
|
# # @return void
|
145
148
|
def deploy_ui(project_name, project, profile)
|
146
149
|
|
147
|
-
project_id = project[Blufin::Projects::
|
150
|
+
project_id = project[Blufin::Projects::PROJECT_ID]
|
148
151
|
has_valid_option = false
|
149
152
|
|
150
153
|
# Make call to AWS to get available stacks.
|
151
|
-
deployments =
|
154
|
+
deployments = get_deployments(project, profile, silent: false)
|
152
155
|
|
153
156
|
# Build deployment option(s).
|
154
157
|
deployment_options = []
|
@@ -337,7 +340,7 @@ module AppCommand
|
|
337
340
|
def self.get_deployments(project, profile, silent: false)
|
338
341
|
calls = {}
|
339
342
|
deployments = {}
|
340
|
-
project_id = project[Blufin::Projects::
|
343
|
+
project_id = project[Blufin::Projects::PROJECT_ID]
|
341
344
|
project_name = project[Blufin::Projects::PROJECT]
|
342
345
|
project[Blufin::Projects::TARGETS].each do |environment, data|
|
343
346
|
region = data[:region]
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module AppCommand
|
2
|
+
|
3
|
+
class Infrastructure < ::Convoy::ActionCommand::Base
|
4
|
+
|
5
|
+
def execute
|
6
|
+
|
7
|
+
begin
|
8
|
+
|
9
|
+
@opts = command_options
|
10
|
+
@args = arguments
|
11
|
+
|
12
|
+
@profile = App::AWSProfile::get_profile
|
13
|
+
|
14
|
+
Blufin::Projects::init(@profile['Projects'])
|
15
|
+
App::Deployments::init(@profile['Deployments'])
|
16
|
+
|
17
|
+
opts_validate
|
18
|
+
opts_routing
|
19
|
+
|
20
|
+
rescue => e
|
21
|
+
|
22
|
+
Blufin::Terminal::print_exception(e)
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
def opts_validate
|
29
|
+
|
30
|
+
@projects = Blufin::Projects::get_projects
|
31
|
+
|
32
|
+
# TODO - REMOVE
|
33
|
+
puts @projects.to_yaml
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
def opts_routing
|
38
|
+
|
39
|
+
raise RuntimeError, 'Not yet implemented!'
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module AppCommand
|
2
2
|
|
3
|
-
class
|
3
|
+
class List < ::Convoy::ActionCommand::Base
|
4
4
|
|
5
5
|
def execute
|
6
6
|
|
@@ -44,10 +44,25 @@ module AppCommand
|
|
44
44
|
# Throw error if -m is set with any other flas.
|
45
45
|
Blufin::Terminal::error("When #{Blufin::Terminal::format_flag('m')} is set, no other flags can be set.", "Found: #{Blufin::Routes::flags_set(@opts).to_i - 1} other flag(s).", true) if @opts[:metadata] && Blufin::Routes::flags_set(@opts).to_i > 1
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
if @opts[:json_prompt]
|
48
|
+
# For resources with exports, this enables you to pass the -r flag as both AcmCertificates or AcmCertificateArn (and it will resolve to the same API call).
|
49
|
+
if @export_map.has_key?(@opts[:resource])
|
50
|
+
if @export_map[@opts[:resource]].is_a?(Array) && @export_map[@opts[:resource]].length > 1
|
51
|
+
@export_id = Blufin::Terminal::prompt_select('Which resource would you like to export?', @export_map[@opts[:resource]])
|
52
|
+
else
|
53
|
+
@export_id = @export_map[@opts[:resource]][0]
|
54
|
+
end
|
55
|
+
else
|
56
|
+
@export_id = @opts[:resource]
|
57
|
+
@export_map.each do |k, v|
|
58
|
+
v.each do |resource|
|
59
|
+
if resource == @opts[:resource]
|
60
|
+
@opts[:resource] = k
|
61
|
+
break
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
51
66
|
end
|
52
67
|
|
53
68
|
# Validate that resource exists (if passed from command-line).
|
data/lib/routes/ssh.rb
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
module AppCommand
|
4
|
+
|
5
|
+
class SSH < ::Convoy::ActionCommand::Base
|
6
|
+
|
7
|
+
def execute
|
8
|
+
|
9
|
+
begin
|
10
|
+
|
11
|
+
@opts = command_options
|
12
|
+
@args = arguments
|
13
|
+
|
14
|
+
opts_validate
|
15
|
+
opts_routing
|
16
|
+
|
17
|
+
rescue => e
|
18
|
+
|
19
|
+
Blufin::Terminal::print_exception(e)
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
def opts_validate
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
def opts_routing
|
30
|
+
|
31
|
+
puts
|
32
|
+
result = Blufin::Terminal::execute('awx l -r EC2Instances -j', capture: true, text: 'Getting EC2 instance data...')
|
33
|
+
puts
|
34
|
+
|
35
|
+
begin
|
36
|
+
instances = JSON.parse(result)
|
37
|
+
rescue => e
|
38
|
+
puts
|
39
|
+
puts result
|
40
|
+
Blufin::Terminal::error('Failed to parse AWS response JSON.', e.message)
|
41
|
+
end
|
42
|
+
|
43
|
+
accessible_instances = []
|
44
|
+
|
45
|
+
instances.each do |instance|
|
46
|
+
if instance.has_key?('State') && instance['State']['Name'] == 'running'
|
47
|
+
accessible_instances << {
|
48
|
+
:instance_id => instance['InstanceId'],
|
49
|
+
:public_ip => instance['PublicIpAddress'],
|
50
|
+
:public_dns => instance['PublicDnsName'],
|
51
|
+
:key => instance.has_key?('KeyName') ? instance['KeyName'] : "\xe2\x80\x94",
|
52
|
+
:tags => instance['Tags'],
|
53
|
+
:region => instance['region'],
|
54
|
+
:availability_zone => instance['Placement']['AvailabilityZone']
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# TODO - REMOVE
|
60
|
+
puts
|
61
|
+
puts "\x1B[38;5;198m#{accessible_instances.to_yaml}\x1B[0m"
|
62
|
+
|
63
|
+
# TODO - Need to take Hash and create a Select list to A) select instance and B) select SSH (public) Key.
|
64
|
+
# TODO - A pre-requisite for this is that EC2 available Keys need to be in the Tags somehow.
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module AppCommand
|
2
|
+
|
3
|
+
class Upload < ::Convoy::ActionCommand::Base
|
4
|
+
|
5
|
+
PROJECTS = 'Projects'
|
6
|
+
TEMPLATES = 'Templates'
|
7
|
+
|
8
|
+
def execute
|
9
|
+
|
10
|
+
begin
|
11
|
+
|
12
|
+
@opts = command_options
|
13
|
+
@args = arguments
|
14
|
+
@action = determine_action
|
15
|
+
|
16
|
+
opts_validate
|
17
|
+
opts_routing
|
18
|
+
|
19
|
+
rescue => e
|
20
|
+
|
21
|
+
Blufin::Terminal::print_exception(e)
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
def opts_validate
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
def opts_routing
|
32
|
+
|
33
|
+
raise RuntimeError, "Not yet implemented! -> #{@action}"
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
# PROJECTS, TEMPLATES will be hard-coded from the route file (my.rb) and user has not control over this value.
|
40
|
+
# @return void
|
41
|
+
def determine_action
|
42
|
+
action = @args.shift
|
43
|
+
raise RuntimeError, "Invalid action: #{action}. This is an error with your code not your input." unless [PROJECTS, TEMPLATES].include?(action)
|
44
|
+
action
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
AWX_VERSION = '0.
|
1
|
+
AWX_VERSION = '0.6.0'
|
@@ -0,0 +1,57 @@
|
|
1
|
+
type: map
|
2
|
+
mapping:
|
3
|
+
Scripts:
|
4
|
+
type: seq
|
5
|
+
required: yes
|
6
|
+
sequence:
|
7
|
+
- type: map
|
8
|
+
mapping:
|
9
|
+
Id:
|
10
|
+
required: yes
|
11
|
+
Commands:
|
12
|
+
type: seq
|
13
|
+
required: yes
|
14
|
+
sequence:
|
15
|
+
- type: str
|
16
|
+
Projects:
|
17
|
+
type: seq
|
18
|
+
required: yes
|
19
|
+
sequence:
|
20
|
+
- type: map
|
21
|
+
mapping:
|
22
|
+
Id:
|
23
|
+
required: yes
|
24
|
+
S3Bucket:
|
25
|
+
type: map
|
26
|
+
required: yes
|
27
|
+
mapping:
|
28
|
+
Name:
|
29
|
+
required: yes
|
30
|
+
Region:
|
31
|
+
required: yes
|
32
|
+
pattern: /^[a-z]{2}-[a-z]{2,20}-\d$/
|
33
|
+
Deployments:
|
34
|
+
type: seq
|
35
|
+
required: yes
|
36
|
+
sequence:
|
37
|
+
- type: map
|
38
|
+
mapping:
|
39
|
+
Environment:
|
40
|
+
required: yes
|
41
|
+
Region:
|
42
|
+
type: seq
|
43
|
+
required: yes
|
44
|
+
sequence:
|
45
|
+
- type: str
|
46
|
+
Script:
|
47
|
+
required: yes
|
48
|
+
Stack:
|
49
|
+
required: yes
|
50
|
+
StackParameters:
|
51
|
+
type: seq
|
52
|
+
required: yes
|
53
|
+
sequence:
|
54
|
+
- type: seq
|
55
|
+
required: yes
|
56
|
+
sequence:
|
57
|
+
- type: str
|
data/opt/awx/reports.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# TODO - Strategy when re-factoring this to look neat, have a few pre-defined column layouts (loose, detailed, etc.) and copy/paste them with the same width values.
|
2
2
|
AcmCertificates:
|
3
3
|
regions: [ us-east-1, us-east-2, us-west-1, us-west-2 ]
|
4
4
|
regionsPreferred: [ us-east-1 ]
|
@@ -10,8 +10,8 @@ AcmCertificates:
|
|
10
10
|
value: CertificateArn
|
11
11
|
description: DomainName
|
12
12
|
columns:
|
13
|
-
-
|
14
|
-
-
|
13
|
+
- { title: CertificateARN, key: CertificateArn, width: 90 }
|
14
|
+
- { title: DomainName, key: DomainName, width: "*" }
|
15
15
|
APIs:
|
16
16
|
regions: [ us-east-1, us-east-2, us-west-1, us-west-2 ]
|
17
17
|
regionsPreferred: [ us-west-2 ]
|
@@ -23,9 +23,9 @@ APIs:
|
|
23
23
|
value: id
|
24
24
|
description: name
|
25
25
|
columns:
|
26
|
-
-
|
27
|
-
-
|
28
|
-
-
|
26
|
+
- { title: Name, key: name, width: 90 }
|
27
|
+
- { title: Id, key: id, width: 29 }
|
28
|
+
- { title: Type(s), key: endpointConfiguration.types, width: "*" }
|
29
29
|
CloudFormationStacks:
|
30
30
|
regions: [ us-east-1, us-east-2, us-west-1, us-west-2 ]
|
31
31
|
regionsPreferred: [ us-west-2 ]
|
@@ -33,9 +33,9 @@ CloudFormationStacks:
|
|
33
33
|
command: cloudformation list-stacks --stack-status-filter CREATE_IN_PROGRESS CREATE_FAILED CREATE_COMPLETE ROLLBACK_IN_PROGRESS ROLLBACK_FAILED ROLLBACK_COMPLETE DELETE_IN_PROGRESS DELETE_FAILED UPDATE_IN_PROGRESS UPDATE_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_COMPLETE UPDATE_ROLLBACK_IN_PROGRESS UPDATE_ROLLBACK_FAILED UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_ROLLBACK_COMPLETE REVIEW_IN_PROGRESS
|
34
34
|
root: StackSummaries
|
35
35
|
columns:
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
36
|
+
- { title: StackId, key: StackId, width: 169, formatter: cloudformation-stack }
|
37
|
+
- { title: DriftStatus, key: DriftInformation.StackDriftStatus, width: 15 }
|
38
|
+
- { title: Status, key: StackStatus, width: "*" }
|
39
39
|
CloudFrontDistributions:
|
40
40
|
regions: [ Global ]
|
41
41
|
regionsPreferred: [ Global ]
|
@@ -43,11 +43,11 @@ CloudFrontDistributions:
|
|
43
43
|
command: cloudfront list-distributions
|
44
44
|
root: DistributionList.Items
|
45
45
|
columns:
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
49
|
-
-
|
50
|
-
-
|
46
|
+
- { title: Origin, key: DefaultCacheBehavior.TargetOriginId, width: 90 }
|
47
|
+
- { title: Id, key: Id, width: 29 }
|
48
|
+
- { title: Public DNS, key: DomainName, width: 40 }
|
49
|
+
- { title: ProtocolPolicy, key: DefaultCacheBehavior.ViewerProtocolPolicy, width: 30 }
|
50
|
+
- { title: Status, key: Status, width: "*", formatter: cloudfront-status }
|
51
51
|
CognitoUserPools:
|
52
52
|
regions: [ us-east-1, us-east-2, us-west-2 ]
|
53
53
|
regionsPreferred: [ us-west-2 ]
|
@@ -55,10 +55,10 @@ CognitoUserPools:
|
|
55
55
|
command: cognito-idp list-user-pools --max-results 60
|
56
56
|
root: UserPools
|
57
57
|
columns:
|
58
|
-
-
|
59
|
-
-
|
60
|
-
-
|
61
|
-
-
|
58
|
+
- { title: Id, key: Id, width: 90 }
|
59
|
+
- { title: Name, key: Name, width: 46 }
|
60
|
+
- { title: CreationDate, key: CreationDate, width: 31, formatter: epoch-date }
|
61
|
+
- { title: LastModifiedDate, key: LastModifiedDate, width: "*", formatter: epoch-date }
|
62
62
|
EC2Instances:
|
63
63
|
regions: [ us-east-1, us-east-2, us-west-1, us-west-2 ]
|
64
64
|
regionsPreferred: [ us-west-2 ]
|
@@ -66,16 +66,33 @@ EC2Instances:
|
|
66
66
|
command: ec2 describe-instances
|
67
67
|
root: Reservations[].Instances
|
68
68
|
columns:
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
74
|
-
-
|
75
|
-
-
|
76
|
-
-
|
77
|
-
-
|
78
|
-
-
|
69
|
+
- { title: InstanceID, key: InstanceId, width: 30 }
|
70
|
+
- { title: PrivateIP, key: PrivateIpAddress, width: 29, color: light-grey }
|
71
|
+
- { title: PublicIP, key: PublicIpAddress, width: 29, color: light-grey }
|
72
|
+
- { title: ImageId, key: ImageId, width: 30 }
|
73
|
+
- { title: Av/Zone, key: Placement.AvailabilityZone, width: 15 }
|
74
|
+
- { title: SecurityGroup, key: SecurityGroups, width: 15, formatter: ec2-security-groups }
|
75
|
+
- { title: VpcId, key: VpcId, width: 15 }
|
76
|
+
- { title: KeyName, key: KeyName, width: 15 }
|
77
|
+
- { title: Type, key: InstanceType, width: 15 }
|
78
|
+
- { title: Status, key: State.Name, width: "*", formatter: ec2-status }
|
79
|
+
EfsVolumes:
|
80
|
+
regions: [ us-east-1, us-east-2, us-west-1, us-west-2 ]
|
81
|
+
regionsPreferred: [ us-west-2 ]
|
82
|
+
cli:
|
83
|
+
command: efs describe-file-systems
|
84
|
+
root: FileSystems
|
85
|
+
export:
|
86
|
+
- id: EfsVolume
|
87
|
+
value: FileSystemId
|
88
|
+
description: Name
|
89
|
+
columns:
|
90
|
+
- { title: Name, key: Name, width: 90 }
|
91
|
+
- { title: FileSystemId, key: FileSystemId, width: 15 }
|
92
|
+
- { title: SizeInBytes, key: SizeInBytes.Value, width: 15 }
|
93
|
+
- { title: NumberOfMountTargets, key: NumberOfMountTargets, width: 20 }
|
94
|
+
- { title: CreationTime, key: CreationTime, width: 30, formatter: epoch-date }
|
95
|
+
- { title: PerformanceMode, key: PerformanceMode, width: "*" }
|
79
96
|
Lambdas:
|
80
97
|
regions: [ us-east-1, us-east-2, us-west-1, us-west-2 ]
|
81
98
|
regionsPreferred: [ us-west-2 ]
|
@@ -83,10 +100,10 @@ Lambdas:
|
|
83
100
|
command: lambda list-functions
|
84
101
|
root: Functions
|
85
102
|
columns:
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
103
|
+
- { title: FunctionArn, key: FunctionArn, width: 90 }
|
104
|
+
- { title: FunctionName, key: FunctionName, width: 46 }
|
105
|
+
- { title: Handler, key: Handler, width: 31 }
|
106
|
+
- { title: LastModified, key: LastModified, width: "*" }
|
90
107
|
Route53HostedZones:
|
91
108
|
regions: [ Global ]
|
92
109
|
regionsPreferred: [ Global ]
|
@@ -102,8 +119,59 @@ Route53HostedZones:
|
|
102
119
|
value: Name
|
103
120
|
valueFormatter: route-53-domain-name
|
104
121
|
columns:
|
105
|
-
-
|
106
|
-
-
|
122
|
+
- { title: HostedZoneId, key: Id, width: 90, formatter: route-53-hosted-zone-id }
|
123
|
+
- { title: DomainName, key: Name, width: "*", formatter: route-53-domain-name }
|
124
|
+
SecurityGroups:
|
125
|
+
regions: [ us-west-2 ]
|
126
|
+
regionsPreferred: [ us-west-2 ]
|
127
|
+
cli:
|
128
|
+
command: ec2 describe-security-groups
|
129
|
+
root: SecurityGroups
|
130
|
+
export:
|
131
|
+
- id: SecurityGroup
|
132
|
+
value: GroupId
|
133
|
+
description: Description
|
134
|
+
columns:
|
135
|
+
- { title: Description, key: Description, width: 90 }
|
136
|
+
- { title: GroupId, key: GroupId, width: 30 }
|
137
|
+
- { title: VpcId, key: VpcId, width: 30 }
|
138
|
+
- { title: GroupName, key: GroupName, width: "*" }
|
139
|
+
Subnets:
|
140
|
+
regions: [ us-west-2 ]
|
141
|
+
regionsPreferred: [ us-west-2 ]
|
142
|
+
cli:
|
143
|
+
command: ec2 describe-subnets
|
144
|
+
root: Subnets
|
145
|
+
export:
|
146
|
+
- id: Subnet
|
147
|
+
value: SubnetId
|
148
|
+
description: Tags.Name
|
149
|
+
columns:
|
150
|
+
- { title: Name, key: Tags.Name, width: 30 }
|
151
|
+
- { title: SubnetId, key: SubnetId, width: 30 }
|
152
|
+
- { title: VpcId, key: VpcId, width: 22 }
|
153
|
+
- { title: AvailabilityZoneId, key: AvailabilityZoneId, width: 22 }
|
154
|
+
- { title: AvailabilityZone, key: AvailabilityZone, width: 22 }
|
155
|
+
- { title: CidrBlock, key: CidrBlock, width: 30 }
|
156
|
+
- { title: MapPublicIpOnLaunch, key: MapPublicIpOnLaunch, width: 19 }
|
157
|
+
- { title: DefaultForAz, key: DefaultForAz, width: 15 }
|
158
|
+
- { title: State, key: State, width: "*" }
|
159
|
+
Vpcs:
|
160
|
+
regions: [ us-west-2 ]
|
161
|
+
regionsPreferred: [ us-west-2 ]
|
162
|
+
cli:
|
163
|
+
command: ec2 describe-vpcs
|
164
|
+
root: Vpcs
|
165
|
+
export:
|
166
|
+
- id: Vpc
|
167
|
+
value: VpcId
|
168
|
+
description: Tags.Name
|
169
|
+
columns:
|
170
|
+
- { title: VpcId, key: VpcId, width: 90 }
|
171
|
+
- { title: CidrBlock, key: CidrBlock, width: 29 }
|
172
|
+
- { title: InstanceTenancy, key: InstanceTenancy, width: 29 }
|
173
|
+
- { title: State, key: State, width: 29 }
|
174
|
+
- { title: IsDefault, key: IsDefault, width: "*" }
|
107
175
|
WorkMailOrganizations:
|
108
176
|
regions: [ us-east-1, us-west-2 ]
|
109
177
|
regionsPreferred: [ us-east-1 ]
|
@@ -111,6 +179,6 @@ WorkMailOrganizations:
|
|
111
179
|
command: workmail list-organizations
|
112
180
|
root: OrganizationSummaries
|
113
181
|
columns:
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
182
|
+
- { title: OrganizationId, key: OrganizationId, width: 90 }
|
183
|
+
- { title: Alias, key: Alias, width: 29 }
|
184
|
+
- { title: State, key: State, width: "*" }
|
data/opt/config/schema.yml
CHANGED
@@ -9,6 +9,8 @@ mapping:
|
|
9
9
|
required: true
|
10
10
|
DefaultProfile:
|
11
11
|
required: yes
|
12
|
+
DeveloperName:
|
13
|
+
required: yes
|
12
14
|
DynamoDBPath:
|
13
15
|
Profiles:
|
14
16
|
type: seq
|
@@ -33,6 +35,7 @@ mapping:
|
|
33
35
|
required: yes
|
34
36
|
S3Bucket:
|
35
37
|
type: map
|
38
|
+
required: yes
|
36
39
|
mapping:
|
37
40
|
Name:
|
38
41
|
required: yes
|
@@ -89,6 +92,25 @@ mapping:
|
|
89
92
|
required: yes
|
90
93
|
S3Bucket:
|
91
94
|
type: map
|
95
|
+
required: yes
|
96
|
+
mapping:
|
97
|
+
Name:
|
98
|
+
required: yes
|
99
|
+
File:
|
100
|
+
required: yes
|
101
|
+
Region:
|
102
|
+
required: yes
|
103
|
+
Deployments:
|
104
|
+
type: map
|
105
|
+
mapping:
|
106
|
+
Local:
|
107
|
+
type: map
|
108
|
+
mapping:
|
109
|
+
File:
|
110
|
+
required: yes
|
111
|
+
S3Bucket:
|
112
|
+
type: map
|
113
|
+
required: yes
|
92
114
|
mapping:
|
93
115
|
Name:
|
94
116
|
required: yes
|
data/opt/config/template.yml
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
DefaultProfile: default
|
2
|
+
DeveloperName: <<-john-doe->>
|
2
3
|
DynamoDBPath: <<-path/to/folder->>
|
3
4
|
Profiles:
|
4
5
|
- Profile: default
|
@@ -16,7 +17,7 @@ Profiles:
|
|
16
17
|
Path: <<-S3-bucket-path->>
|
17
18
|
Region: <<-S3-bucket-region->>
|
18
19
|
Defaults:
|
19
|
-
StackName: "{{
|
20
|
+
StackName: "${{Parameters:Category}}-${{Parameters:Template}}-${{Parameters:Project}}-${{Parameters:Environment}}-${{Parameters:Region}}-${{System:UUID-AWX}}"
|
20
21
|
Timeout: 60
|
21
22
|
Regions:
|
22
23
|
- us-west-2
|
@@ -26,6 +27,13 @@ Profiles:
|
|
26
27
|
Path: <<-S3-bucket-path->>
|
27
28
|
Region: <<-S3-bucket-region->>
|
28
29
|
Projects:
|
30
|
+
Local:
|
31
|
+
File: <<-path/to/file->>
|
32
|
+
S3Bucket:
|
33
|
+
Name: <<-S3-bucket-name->>
|
34
|
+
File: <<-S3-bucket-path/to/file->>
|
35
|
+
Region: <<-S3-bucket-region->>
|
36
|
+
Deployments:
|
29
37
|
Local:
|
30
38
|
File: <<-path/to/file->>
|
31
39
|
S3Bucket:
|