|
47 | 47 | register: _rds_instance_info
|
48 | 48 | when: "'aurora' in aws_rds.engine"
|
49 | 49 |
|
| 50 | +- name: Create Aurora RDS read replica instance. |
| 51 | + community.aws.rds_instance: |
| 52 | + db_instance_identifier: "{{ aws_rds.name }}-replica" |
| 53 | + db_cluster_identifier: "{{ aws_rds.db_cluster_identifier }}" |
| 54 | + db_instance_class: "{{ aws_rds.db_instance_class }}" |
| 55 | + state: "{{ aws_rds.state }}" |
| 56 | + engine: "{{ aws_rds.engine }}" |
| 57 | + copy_tags_to_snapshot: true |
| 58 | + publicly_accessible: "{{ aws_rds.publicly_accessible }}" |
| 59 | + profile: "{{ aws_rds.aws_profile }}" |
| 60 | + tags: "{{ aws_rds.tags | combine({ 'Name': aws_rds.name + '-replica' }) }}" |
| 61 | + allow_major_version_upgrade: false |
| 62 | + apply_immediately: true |
| 63 | + wait: true |
| 64 | + region: "{{ aws_rds.region }}" |
| 65 | + engine_version: "{{ aws_rds.engine_version | default(omit) }}" |
| 66 | + when: |
| 67 | + - "'aurora' in aws_rds.engine" |
| 68 | + - aws_rds.replica |
| 69 | + |
50 | 70 | - name: Create RDS instance
|
51 | 71 | community.aws.rds_instance:
|
52 | 72 | db_instance_identifier: "{{ aws_rds.name }}"
|
|
82 | 102 | register: _rds_instance_info
|
83 | 103 | when: "'aurora' not in aws_rds.engine"
|
84 | 104 |
|
85 |
| -- name: Create RDS read replica instance. |
86 |
| - community.aws.rds_instance: |
87 |
| - db_instance_identifier: "{{ aws_rds.name }}-replica" |
88 |
| - db_cluster_identifier: "{{ aws_rds.db_cluster_identifier | default(omit) }}" |
89 |
| - db_instance_class: "{{ aws_rds.db_instance_class }}" |
90 |
| - read_replica: true |
91 |
| - creation_source: "instance" |
92 |
| - source_db_instance_identifier: "{{ aws_rds.name }}" |
93 |
| - profile: "{{ aws_rds.aws_profile }}" |
94 |
| - region: "{{ aws_rds.region }}" |
95 |
| - when: aws_rds.replica |
96 |
| - |
97 | 105 | - name: Create SNS topic.
|
98 | 106 | ansible.builtin.include_role:
|
99 | 107 | name: aws/aws_sns
|
|
0 commit comments