New in version 2014.7.0.
Create, destroy and update Elasticache clusters. Be aware that this interacts with Amazon's services, and so may incur charges.
Note: This module currently only supports creation and deletion of elasticache resources and will not modify clusters when their configuration changes in your state files.
This module uses boto
, which can be installed via package, or pip.
This module accepts explicit elasticache 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:
elasticache.keyid: GKTADJGHEIQSXMKKRBJ08H
elasticache.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 myelasticache exists:
boto_elasticache.present:
- name: myelasticache
- engine: redis
- cache_node_type: cache.t1.micro
- num_cache_nodes: 1
- notification_topic_arn: arn:aws:sns:us-east-1:879879:my-sns-topic
- region: us-east-1
- keyid: GKTADJGHEIQSXMKKRBJ08H
- key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
# Using a profile from pillars
Ensure myelasticache exists:
boto_elasticache.present:
- name: myelasticache
- engine: redis
- cache_node_type: cache.t1.micro
- num_cache_nodes: 1
- notification_topic_arn: arn:aws:sns:us-east-1:879879:my-sns-topic
- region: us-east-1
- profile: myprofile
# Passing in a profile
Ensure myelasticache exists:
boto_elasticache.present:
- name: myelasticache
- engine: redis
- cache_node_type: cache.t1.micro
- num_cache_nodes: 1
- notification_topic_arn: arn:aws:sns:us-east-1:879879:my-sns-topic
- region: us-east-1
- profile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
salt.states.boto_elasticache.
absent
(name, wait=True, region=None, key=None, keyid=None, profile=None)¶Ensure the named elasticache cluster is deleted.
salt.states.boto_elasticache.
cache_cluster_absent
(*args, **kwargs)¶salt.states.boto_elasticache.
cache_cluster_present
(*args, **kwargs)¶salt.states.boto_elasticache.
creategroup
(name, primary_cluster_id, replication_group_description, wait=None, region=None, key=None, keyid=None, profile=None)¶Ensure the a replication group is create.
salt.states.boto_elasticache.
present
(name, engine=None, cache_node_type=None, num_cache_nodes=None, preferred_availability_zone=None, port=None, cache_parameter_group_name=None, cache_security_group_names=None, replication_group_id=None, auto_minor_version_upgrade=True, security_group_ids=None, cache_subnet_group_name=None, engine_version=None, notification_topic_arn=None, preferred_maintenance_window=None, wait=None, region=None, key=None, keyid=None, profile=None)¶Ensure the cache cluster exists.
salt.states.boto_elasticache.
replication_group_absent
(name, tags=None, region=None, key=None, keyid=None, profile=None)¶salt.states.boto_elasticache.
replication_group_present
(*args, **kwargs)¶salt.states.boto_elasticache.
subnet_group_absent
(name, tags=None, region=None, key=None, keyid=None, profile=None)¶salt.states.boto_elasticache.
subnet_group_present
(name, subnet_ids=None, subnet_names=None, description=None, tags=None, region=None, key=None, keyid=None, profile=None)¶Ensure ElastiCache subnet group exists.
New in version 2015.8.0.