|
3 | 3 | Description "#{component_name} - #{component_version}" |
4 | 4 |
|
5 | 5 | Condition("EnableReader", FnEquals(Ref("EnableReader"), 'true')) |
| 6 | + Condition("UseUsernameAndPassword", FnEquals(Ref(:SnapshotID), '')) |
| 7 | + Condition("UseSnapshotID", FnNot(FnEquals(Ref(:SnapshotID), ''))) |
| 8 | + |
6 | 9 | az_conditions_resources('SubnetPersistence', maximum_availability_zones) |
7 | 10 |
|
8 | 11 | tags = [] |
|
26 | 29 |
|
27 | 30 | RDS_DBClusterParameterGroup(:DBClusterParameterGroup) { |
28 | 31 | Description FnJoin(' ', [ Ref(:EnvironmentName), component_name, 'cluster parameter group' ]) |
29 | | - Family 'aurora-postgresql' |
| 32 | + Family 'aurora-postgresql9.6' |
30 | 33 | Parameters cluster_parameters if defined? cluster_parameters |
31 | 34 | Tags tags + [{ Key: 'Name', Value: FnJoin('-', [ Ref(:EnvironmentName), component_name, 'cluster-parameter-group' ])}] |
32 | 35 | } |
|
35 | 38 | Engine 'aurora-postgresql' |
36 | 39 | DBClusterParameterGroupName Ref(:DBClusterParameterGroup) |
37 | 40 | SnapshotIdentifier Ref(:SnapshotID) |
| 41 | + SnapshotIdentifier FnIf('UseSnapshotID',Ref(:SnapshotID), Ref('AWS::NoValue')) |
| 42 | + MasterUsername FnIf('UseUsernameAndPassword', FnJoin('', [ '{{resolve:ssm:', FnSub(master_login['username_ssm_param']), ':1}}' ]), Ref('AWS::NoValue')) |
| 43 | + MasterUserPassword FnIf('UseUsernameAndPassword', FnJoin('', [ '{{resolve:ssm-secure:', FnSub(master_login['password_ssm_param']), ':1}}' ]), Ref('AWS::NoValue')) |
38 | 44 | DBSubnetGroupName Ref(:DBClusterSubnetGroup) |
39 | 45 | VpcSecurityGroupIds [ Ref(:SecurityGroup) ] |
| 46 | + Port cluster_port |
40 | 47 | Tags tags + [{ Key: 'Name', Value: FnJoin('-', [ Ref(:EnvironmentName), component_name, 'cluster' ])}] |
41 | 48 | } |
42 | 49 |
|
|
0 commit comments