aws_rds – rds instance source¶
Synopsis¶
- Get instances and clusters from Amazon Web Services RDS.
- Uses a YAML configuration file that ends with aws_rds.(yml|yaml).
Requirements¶
The below requirements are needed on the local master node that executes this inventory.
- boto3
- botocore
Parameters¶
Parameter | Choices/Defaults | Configuration | Comments |
---|---|---|---|
aws_access_key_id
-
|
env:AWS_ACCESS_KEY_ID
env:AWS_ACCESS_KEY
env:EC2_ACCESS_KEY
|
The AWS access key to use. If you have specified a profile, you don't need to provide an access key/secret key/session token.
|
|
aws_secret_access_key
-
|
env:AWS_SECRET_ACCESS_KEY
env:AWS_SECRET_KEY
env:EC2_SECRET_KEY
|
The AWS secret key that corresponds to the access key. If you have specified a profile, you don't need to provide an access key/secret key/session token.
|
|
aws_security_token
-
|
env:AWS_SECURITY_TOKEN
env:AWS_SESSION_TOKEN
env:EC2_SECURITY_TOKEN
|
The AWS security token if using temporary access and secret keys.
|
|
boto_profile
-
|
env:AWS_PROFILE
env:AWS_DEFAULT_PROFILE
|
The boto profile to use. The plugin will look for an instance role if no credentials are provided.
|
|
cache
boolean
|
Default: "no"
|
ini entries:
[inventory] env:ANSIBLE_INVENTORY_CACHE
|
Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.
|
cache_connection
-
|
ini entries:
[inventory] env:ANSIBLE_INVENTORY_CACHE_CONNECTION
|
Cache connection data or path, read cache plugin documentation for specifics.
|
|
cache_plugin
-
|
ini entries:
[inventory] env:ANSIBLE_INVENTORY_CACHE_PLUGIN
|
Cache plugin to use for the inventory's source data.
|
|
cache_timeout
integer
|
Default: 3600
|
ini entries:
[inventory] env:ANSIBLE_INVENTORY_CACHE_TIMEOUT
|
Cache duration in seconds
|
compose
dictionary
|
Default: {}
|
create vars from jinja2 expressions
|
|
filters
-
|
Default: {}
|
A dictionary of filter value pairs. Available filters are listed here https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-instances.html#options. If you filter by db-cluster-id and include_clusters is True it will apply to clusters as well.
|
|
groups
dictionary
|
Default: {}
|
add hosts to group based on Jinja2 conditionals
|
|
include_clusters
boolean
|
|
Whether or not to query for Aurora clusters as well as instances
|
|
keyed_groups
list
|
Default: []
|
add hosts to group based on the values of a variable
|
|
regions
-
|
Default: []
|
A list of regions in which to describe RDS instances and clusters. Available regions are listed here https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html
|
|
statuses
list
|
Default: ["creating", "available"]
|
A list of desired states for instances/clusters to be added to inventory. Set to ['all'] as a shorthand to find everything.
|
|
strict
boolean
|
Default: "no"
|
If true make invalid entries a fatal error, otherwise skip and continue
Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
|
|
strict_permissions
boolean
|
|
By default if an AccessDenied exception is encountered this plugin will fail. You can set strict_permissions to False in the inventory config file which will allow the restrictions to be gracefully skipped.
|
Examples¶
plugin: aws_rds
regions:
- us-east-1
- ca-central-1
keyed_groups:
- key: 'db_parameter_groups|json_query("[].db_parameter_group_name")'
prefix: rds_parameter_group
- key: engine
prefix: rds
- key: tags
- key: region
Status¶
Authors¶
- Sloane Hertel (@s-hertel)
Hint
If you notice any issues in this documentation you can edit this document to improve it.