New in version 2015.8.0.
Create and destroy RDS instances. Be aware that this interacts with Amazon's services, and so may incur charges.
This module uses boto
, which can be installed via package, or pip.
This module accepts explicit rds credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More information available here.
If IAM roles are not used you need to specify them either in a pillar file or in the minion's config file:
rds.keyid: GKTADJGHEIQSXMKKRBJ08H
rds.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
It's also possible to specify key
, keyid
and region
via a profile,
either passed in as a dict, or as a string to pull from pillars or minion
config:
myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
region: us-east-1
Ensure myrds RDS exists:
boto_rds.present:
- name: myrds
- allocated_storage: 5
- db_instance_class: db.t2.micro
- engine: MySQL
- master_username: myuser
- master_user_password: mypass
- region: us-east-1
- keyid: GKTADJGHEIQSXMKKRBJ08H
- key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
- tags:
-
- key1
- value1
-
- key2
- value2
Note
This state module uses boto.rds2
, which requires a different tagging syntax than
some of the other boto states. The tags
key and value set noted in the example
above is the required yaml notation that rds2
depends upon to function properly.
For more information, please see Issue #28715.
salt.states.boto_rds.
absent
(name, skip_final_snapshot=None, final_db_snapshot_identifier=None, tags=None, region=None, key=None, keyid=None, profile=None)¶salt.states.boto_rds.
present
(name, allocated_storage, db_instance_class, engine, master_username, master_user_password, db_name=None, db_security_groups=None, vpc_security_group_ids=None, availability_zone=None, db_subnet_group_name=None, preferred_maintenance_window=None, db_parameter_group_name=None, backup_retention_period=None, preferred_backup_window=None, port=None, multi_az=None, engine_version=None, auto_minor_version_upgrade=None, license_model=None, iops=None, option_group_name=None, character_set_name=None, publicly_accessible=None, wait_status=None, tags=None, region=None, key=None, keyid=None, profile=None)¶Ensure RDS instance exists.
engine
argument in the boto_rds
create_dbinstance documentation.salt.states.boto_rds.
replica_present
(name, source, db_instance_class=None, availability_zone=None, port=None, auto_minor_version_upgrade=None, iops=None, option_group_name=None, publicly_accessible=None, tags=None, region=None, key=None, keyid=None, profile=None)¶Ensure RDS replica exists.
Ensure myrds replica RDS exists:
boto_rds.create_replica:
- name: myreplica
- source: mydb
salt.states.boto_rds.
subnet_group_absent
(name, tags=None, region=None, key=None, keyid=None, profile=None)¶salt.states.boto_rds.
subnet_group_present
(name, subnet_ids, description, tags=None, region=None, key=None, keyid=None, profile=None)¶Ensure DB subnet group exists.