Documentation

redshift - create, delete, or modify an Amazon Redshift instance

New in version 2.2.

Synopsis

  • Creates, deletes, or modifies amazon Redshift cluster instances.

Options

parameter required default choices comments
allow_version_upgrade
no True
flag to determinate if upgrade of version is possible

aliases: version_upgrade
automated_snapshot_retention_period
no
period when the snapshot take place

aliases: retention_period
availability_zone
no
availability zone in which to launch cluster

aliases: zone, aws_zone
aws_access_key
no
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.

aliases: ec2_access_key, access_key
aws_secret_key
no
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.

aliases: ec2_secret_key, secret_key
cluster_parameter_group_name
no
name of the cluster parameter group

aliases: param_group_name
cluster_security_groups
no
in which security group the cluster belongs

aliases: security_groups
cluster_subnet_group_name
no
which subnet to place the cluster

aliases: subnet
cluster_type
no single-node
  • multi-node
  • single-node
The type of cluster.
cluster_version
no
  • 1.0
which version the cluster should have

aliases: version
command
yes
  • create
  • facts
  • delete
  • modify
Specifies the action to take.
db_name
no
Name of the database.
ec2_url
no
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
elastic_ip
no
if the cluster has an elastic IP or not
encrypted
no
if the cluster is encrypted or not
identifier
yes
Redshift cluster identifier.
new_cluster_identifier
no
Only used when command=modify.

aliases: new_identifier
node_type
no
  • ds1.xlarge
  • ds1.8xlarge
  • ds2.xlarge
  • ds2.8xlarge
  • dc1.large
  • dc1.8xlarge
  • dw1.xlarge
  • dw1.8xlarge
  • dw2.large
  • dw2.8xlarge
The node type of the cluster. Must be specified when command=create.
number_of_nodes
no
Number of nodes. Only used when cluster_type=multi-node.
password
no
Master database password. Used only when command=create.
port
no
which port the cluster is listining
preferred_maintenance_window
no
maintenance window

aliases: maintance_window, maint_window
profile
(added in 1.6)
no
Uses a boto profile. Only works with boto >= 2.24.0.
publicly_accessible
no
if the cluster is accessible publicly or not
security_token
(added in 1.6)
no
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.

aliases: access_token
username
no
Master database username. Used only when command=create.
validate_certs
(added in 1.5)
no yes
  • yes
  • no
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
vpc_security_group_ids
no
VPC security group

aliases: vpc_security_groups
wait
no no
  • yes
  • no
When command=create, modify or restore then wait for the database to enter the 'available' state. When command=delete wait for the database to be terminated.
wait_timeout
no 300
how long before wait gives up, in seconds

Examples

# Basic cluster provisioning example
- redshift: >
    command=create
    node_type=ds1.xlarge
    identifier=new_cluster
    username=cluster_admin
    password=1nsecure

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
cluster dictionary containing all the cluster information success dictionary
contains:
name description returned type sample
status Stutus of the cluster. success string available
public_ip_address Public IP address of the main node. success string 0.0.0.0
availability_zone Amazon availability zone where the cluster is located. success string us-east-1b
url FQDN of the main cluster node. success string new-redshift_cluster.jfkdjfdkj.us-east-1.redshift.amazonaws.com
db_name Name of the database. success string new_db_name
create_time Time of the cluster creation as timestamp. success float 1430158536.31
private_ip_address Private IP address of the main node. success string 10.10.10.10
identifier Id of the cluster. success string new_redshift_cluster
port Port of the cluster. success int 5439
maintenance_window Time frame when maintenance/upgrade are done. success string sun:09:30-sun:10:00


Notes

Note

  • If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence AWS_URL or EC2_URL, AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY or EC2_ACCESS_KEY, AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY or EC2_SECRET_KEY, AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN, AWS_REGION or EC2_REGION
  • Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See http://boto.readthedocs.org/en/latest/boto_config_tut.html
  • AWS_REGION or EC2_REGION can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Support

This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.