on init, connect to AWS and check for the AS group
This commit is contained in:
@@ -1,2 +1,12 @@
|
||||
class AwsHaRelease
|
||||
def initialize(opts)
|
||||
AWS.config(access_key_id: opts[:aws_access_key], secret_access_key: opts[:aws_secret_key], region: opts[:region])
|
||||
|
||||
@as = AWS::AutoScaling.new
|
||||
@group = @as.groups[opts[:as_group_name]]
|
||||
|
||||
if @group.nil?
|
||||
raise ArgumentError, "The Auto Scaling Group named #{opts[:as_group_name]} does not exist in #{opts[:region]}."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user