ansible-collections / community.aws

Ansible Collection for Community AWS
GNU General Public License v3.0
187 stars 396 forks source link

Add Associated IAM role to Redshift cluster #1880

Open RonneGisun opened 1 year ago

RonneGisun commented 1 year ago

Summary

I am creating new redhsift clusters, but adding associated IAM polices is not supported, it would be really helpful if this feature was included, as currently it has to be associated manually after the playbook runs.

Issue Type

Feature Idea

Component Name

community.aws.redshift

Additional Information

- name: "Create {{ redshift_cluster_identifier }} Redshift Cluster"
  vars:
    ansible_python_interpreter: /usr/bin/python3
  community.aws.redshift:
    command: create
    node_type: "{{ redshift_node_type }}"
    identifier: "{{ redshift_cluster_identifier }}"
    username: "{{ redshift_cluster_admin_username }}"
    password: "{{ redshift_cluster_admin_password }}"
    cluster_type: "{{ redshift_cluster_type }}"
    number_of_nodes: "{{ redshift_number_of_nodes }}"
    cluster_subnet_group_name: "{{ redshift_sg.cluster_subnet_group.name }}"
    vpc_security_groups:
      - "{{ aws_sg.group_id }}"
    availability_zone: "{{ redshift_availability_zone|default(omit) }}"
    associated_iam_roles: "{{ LIST_OF_IAM_ROLES }}"
    db_name: "{{ redshift_db_name }}"
    port: "{{ redshift_cluster_port }}"
    cluster_parameter_group_name: "{{ redshift_cluster_parameter_group_name }}"
    encrypted: true
    preferred_maintenance_window: "{{ redhsift_preferred_maintenance_window|default(omit) }}"
    automated_snapshot_retention_period: "{{ redshift_automated_snapshot_retention_period }}"
    region: "{{ application_region }}"
    tags:
      Environment: "{{ application_environment }}"
      Application: "{{ application_name }}"
    wait: "{{ redshift_cluster_wait|default('false') }}"
    wait_timeout: "{{ redshift_cluster_wait_timeout|default('300') }}"
  register: redshift

Code of Conduct

KamilBlaz commented 1 year ago

Hello, I will take this issue and create new PR