Skip to content

Commit

Permalink
Add db_paramater_group method
Browse files Browse the repository at this point in the history
  • Loading branch information
marcy-terui committed Jul 7, 2014
1 parent d2d7968 commit 31ae694
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/awspec/type/rds/instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Awspec
module Type
module RDS
class Instance < Base

def initialize(name)
super

Expand Down Expand Up @@ -54,7 +54,16 @@ def vpc_security_group(name)
raise NameError, "VPC Security Group [#{name}] is not exists or not attached."
end

def db_paramater_group(name)
@instance[:db_parameter_groups].each do |pg|
if pg[:db_parameter_group_name] == name then
return pg
end
end
raise NameError, "DB Parameter Group [#{name}] is not exists or not attached."
end

end
end
end
end
end

0 comments on commit 31ae694

Please sign in to comment.