Sha256: f47e31effd23613f3d6a3051dde1c8d9bf357cbb9554f7873ef61e38e9b20375

Contents?: true

Size: 933 Bytes

Versions: 4

Compression:

Stored size: 933 Bytes

Contents

module Outliers
  module Resources
    module Aws
      module Rds
        class DbInstance < Resource
          def self.key
            'db_instance_identifier'
          end

          def self.verifications
            [ 
              { name: 'backup_retention_period',
                description: 'Validate the backup retention period equals given days for the db_instance.',
                args: 'days: DAYS' },
              { name: 'multi_az',
                description: 'RDS Multi AZ set to yes.' }
            ]
          end

          def backup_retention_period?(args)
            days = args[:days]

            current = source.backup_retention_period
            logger.debug "Verifying '#{id}' retention period of '#{current}' equals '#{days}' days."
            current.to_i == days.to_i
          end

          def multi_az?
            source.multi_az?
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
outliers-0.2.0 lib/outliers/resources/aws/rds/db_instance.rb
outliers-0.1.1 lib/outliers/resources/aws/rds/db_instance.rb
outliers-0.1.0 lib/outliers/resources/aws/rds/db_instance.rb
outliers-0.0.1 lib/outliers/resources/aws/rds/db_instance.rb