diff --git a/lib/puppet/provider/rds_db_parameter_group/v2.rb b/lib/puppet/provider/rds_db_parameter_group/v2.rb index 6bab0405..f46cfc38 100644 --- a/lib/puppet/provider/rds_db_parameter_group/v2.rb +++ b/lib/puppet/provider/rds_db_parameter_group/v2.rb @@ -1,4 +1,4 @@ -require_relative '../../../puppet_z/puppetlabs/aws.rb' +require_relative '../../../puppet_x/puppetlabs/aws.rb' Puppet::Type.type(:rds_db_parameter_group).provide(:v2, :parent => PuppetX::Puppetlabs::Aws) do confine feature: :aws @@ -24,7 +24,7 @@ def self.db_parameter_group_to_hash(region, db_parameter_group) :ensure => :present, :name => db_parameter_group.db_parameter_group_name, :description => db_parameter_group.description, - :db_parameter_group_family => db_parameter_group.db_parameter_group_family, + :family => db_parameter_group.db_parameter_group_family, :region => region, } end diff --git a/lib/puppet/provider/rds_db_securitygroup/v2.rb b/lib/puppet/provider/rds_db_securitygroup/v2.rb index f9d01163..2cf2d06d 100644 --- a/lib/puppet/provider/rds_db_securitygroup/v2.rb +++ b/lib/puppet/provider/rds_db_securitygroup/v2.rb @@ -36,9 +36,9 @@ def self.db_security_group_to_hash(region, db_security_group) :ensure => :present, :region => region, :name => db_security_group.db_security_group_name, - :db_security_group_description => db_security_group.db_security_group_description, + :description => db_security_group.db_security_group_description, :owner_id => db_security_group.owner_id, - :ec2_security_groups => ec2_security_group_to_array_of_hashes(db_security_group.ec2_security_groups), + :ec2_securitygroup => ec2_security_group_to_array_of_hashes(db_security_group.ec2_security_groups), :ip_ranges => ip_ranges_to_array_of_hashes(db_security_group.ip_ranges), } end @@ -52,7 +52,7 @@ def create Puppet.info("Creating DB Security Group #{name}") config = { :db_security_group_name => resource[:name], - :db_security_group_description => resource[:db_security_group_description], + :db_security_group_description => resource[:description], } rds_client(resource[:region]).create_db_security_group(config) diff --git a/lib/puppet/type/rds_db_parameter_group.rb b/lib/puppet/type/rds_db_parameter_group.rb index 7c2d56fb..017bbdf7 100644 --- a/lib/puppet/type/rds_db_parameter_group.rb +++ b/lib/puppet/type/rds_db_parameter_group.rb @@ -11,12 +11,12 @@ desc 'the description of a DB parameter group' end - newproperty(:db_parameter_group_family) do - desc 'the name of the DB parameter group family that this DB parameter group is compatible with.' + newproperty(:family) do + desc 'the name of the DB family that this DB parameter group is compatible with (eg. mysql5.1)' end newproperty(:region) do - desc 'the region in which to create the db_parametergroup' + desc 'the region in which to create the db_parameter_group' validate do |value| fail 'region should not contain spaces' if value =~ /\s/ end diff --git a/lib/puppet/type/rds_db_securitygroup.rb b/lib/puppet/type/rds_db_securitygroup.rb index b9c5f822..2d0aaf4d 100644 --- a/lib/puppet/type/rds_db_securitygroup.rb +++ b/lib/puppet/type/rds_db_securitygroup.rb @@ -7,10 +7,10 @@ desc 'the name of the DB Security Group (also known as the db_security_group_name)' end - newparam(:db_security_group_description) do + newparam(:description) do desc 'the description of a DB Security group' validate do |value| - fail 'db_security_group_description should not be blank' if value == '' + fail 'description should not be blank' if value == '' end end @@ -18,8 +18,9 @@ desc 'the ID of the owner of this DB Security Group' end - newproperty(:ec2_security_groups, :array_matching => :all) do - desc 'the EC2 Security Groups assigned to this RDS DB security group' + autorequire(:ec2_securitygroup) do + groups = self[:security_groups] + groups.is_a?(Array) ? groups : [groups] end newproperty(:region) do