Skip to content

Commit

Permalink
[Improvement] state/* - Update engine versions (widdix#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwittig authored Sep 30, 2022
1 parent cb6292e commit 7f168d8
Show file tree
Hide file tree
Showing 18 changed files with 236 additions and 257 deletions.
4 changes: 1 addition & 3 deletions state/documentdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ Parameters:
EngineVersion:
Description: 'The version number of the database engine to use.'
Type: String
AllowedValues:
- '3.6.0'
- '4.0.0'
AllowedValues: ['4.0.0', '3.6.0'] # aws docdb describe-db-engine-versions --engine docdb --query "DBEngineVersions[].EngineVersion"
MasterUsername:
Description: 'The name of the master user for the cluster.'
Type: String
Expand Down
25 changes: 11 additions & 14 deletions state/elasticache-memcached.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ Parameters:
EngineVersion:
Description: 'memcached version'
Type: String
AllowedValues: # aws elasticache describe-cache-engine-versions --engine memcached --query "CacheEngineVersions[].EngineVersion"
- '1.6.6'
- '1.5.16'
- '1.5.10'
- '1.4.5'
- '1.4.34'
AllowedValues: ['1.6.6', '1.6.12', '1.5.16', '1.5.10', '1.4.5', '1.4.34'] # aws elasticache describe-cache-engine-versions --engine memcached --query "CacheEngineVersions[].EngineVersion"
CacheNodeType:
Description: 'The compute and memory capacity of the nodes in the node group (shard).'
Type: 'String'
Expand All @@ -91,16 +86,18 @@ Parameters:
AllowedValues: [1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653]
Mappings:
EngineVersionMap:
'1.4.34':
CacheParameterGroupFamily: 'memcached1.4'
'1.4.5':
CacheParameterGroupFamily: 'memcached1.4'
'1.5.10':
CacheParameterGroupFamily: 'memcached1.5'
'1.5.16':
CacheParameterGroupFamily: 'memcached1.5'
'1.6.6':
CacheParameterGroupFamily: 'memcached1.6'
'1.6.12':
CacheParameterGroupFamily: 'memcached1.6'
'1.5.16':
CacheParameterGroupFamily: 'memcached1.5'
'1.5.10':
CacheParameterGroupFamily: 'memcached1.5'
'1.4.5':
CacheParameterGroupFamily: 'memcached1.4'
'1.4.34':
CacheParameterGroupFamily: 'memcached1.4'
Conditions:
HasPermissionsBoundary: !Not [!Equals [!Ref PermissionsBoundary, '']]
HasZone: !Not [!Equals [!Ref ParentZoneStack, '']]
Expand Down
32 changes: 12 additions & 20 deletions state/elasticache-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,7 @@ Parameters:
EngineVersion:
Description: 'Redis version'
Type: String
AllowedValues: # aws elasticache describe-cache-engine-versions --engine redis --query "CacheEngineVersions[].EngineVersion"
- '3.2.6' # 3.2.4 and 3.2.10 do not support encryption
- '4.0.10'
- '5.0.0'
- '5.0.3'
- '5.0.4'
- '5.0.5'
- '5.0.6'
- '6.x'
AllowedValues: ['6.2', '6.0', '5.0.6', '5.0.5', '5.0.4', '5.0.3', '5.0.0', '4.0.10', '3.2.6'] # aws elasticache describe-cache-engine-versions --engine redis --query "CacheEngineVersions[].EngineVersion"
CacheNodeType:
Description: 'The compute and memory capacity of the nodes in the node group (shard).'
Type: 'String'
Expand Down Expand Up @@ -152,22 +144,22 @@ Parameters:
MinValue: -1
Mappings:
EngineVersionMap:
'3.2.6':
CacheParameterGroupFamily: 'redis3.2'
'4.0.10':
CacheParameterGroupFamily: 'redis4.0'
'5.0.0':
CacheParameterGroupFamily: 'redis5.0'
'5.0.3':
'6.2':
CacheParameterGroupFamily: 'redis6.x'
'6.0':
CacheParameterGroupFamily: 'redis6.x'
'5.0.6':
CacheParameterGroupFamily: 'redis5.0'
'5.0.4':
CacheParameterGroupFamily: 'redis5.0'
'5.0.5':
'5.0.3':
CacheParameterGroupFamily: 'redis5.0'
'5.0.6':
'5.0.0':
CacheParameterGroupFamily: 'redis5.0'
'6.x':
CacheParameterGroupFamily: 'redis6.x'
'4.0.10':
CacheParameterGroupFamily: 'redis4.0'
'3.2.6':
CacheParameterGroupFamily: 'redis3.2'
Conditions:
HasKmsKey: !Not [!Equals [!Ref ParentKmsKeyStack, '']]
HasZone: !Not [!Equals [!Ref ParentZoneStack, '']]
Expand Down
2 changes: 1 addition & 1 deletion state/elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Parameters:
ElasticsearchVersion:
Description: 'Elasticsearch version'
Type: String
AllowedValues: ['7.9', '7.8', '7.7', '7.4', '7.1', '6.8', '6.7', '6.5', '6.4', '6.3', '6.2', '6.0', '5.6', '5.5'] # aws es list-elasticsearch-versions --query "ElasticsearchVersions[]"
AllowedValues: ['7.10', '7.9', '7.8', '7.7', '7.4', '7.1', '6.8', '6.7', '6.5', '6.4', '6.3', '6.2', '6.0', '5.6', '5.5', '5.3', '5.1', '2.3', '1.5'] # aws es list-elasticsearch-versions --query "ElasticsearchVersions[]"
ClusterInstanceCount:
Description: 'The number of data nodes (instances) to use in the Amazon ES domain.'
Type: Number
Expand Down
8 changes: 4 additions & 4 deletions state/rds-aurora-serverless-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ Parameters:
EngineVersion:
Description: 'Aurora Serverless PostgreSQL version.'
Type: String
AllowedValues: ['10.7', '10.12'] # aws rds describe-db-engine-versions --engine aurora-postgresql --query 'DBEngineVersions[?contains(SupportedEngineModes,`serverless`)]'
AllowedValues: ['11.13', '10.18'] # aws rds describe-db-engine-versions --engine aurora-postgresql --query 'DBEngineVersions[?contains(SupportedEngineModes,`serverless`)].EngineVersion'
Mappings:
EngineVersionMap:
'10.7':
ClusterParameterGroupFamily: 'aurora-postgresql10'
'10.12':
'11.13':
ClusterParameterGroupFamily: 'aurora-postgresql11'
'10.18':
ClusterParameterGroupFamily: 'aurora-postgresql10'
Conditions:
HasZone: !Not [!Equals [!Ref ParentZoneStack, '']]
Expand Down
14 changes: 7 additions & 7 deletions state/rds-aurora-serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,17 @@ Parameters:
EngineVersion:
Description: 'Aurora Serverless MySQL version.'
Type: String
AllowedValues: ['5.6.10a', '5.7.mysql-aurora.2.07.1'] # aws rds describe-db-engine-versions --engine aurora --query 'DBEngineVersions[?contains(SupportedEngineModes,`serverless`)]'; aws rds describe-db-engine-versions --engine aurora-mysql --query 'DBEngineVersions[?contains(SupportedEngineModes,`serverless`)]'
AllowedValues: ['5.7.mysql-aurora.2.08.3', '5.6.mysql-aurora.1.22.3'] # aws rds describe-db-engine-versions --engine aurora --query 'DBEngineVersions[?contains(SupportedEngineModes,`serverless`)].EngineVersion'; aws rds describe-db-engine-versions --engine aurora-mysql --query 'DBEngineVersions[?contains(SupportedEngineModes,`serverless`)].EngineVersion'
Mappings:
EngineVersionMap:
'5.6.10a':
ClusterParameterGroupFamily: 'aurora5.6'
EngineVersion: '5.6.10a'
Engine: aurora
'5.7.mysql-aurora.2.07.1':
'5.7.mysql-aurora.2.08.3':
ClusterParameterGroupFamily: 'aurora-mysql5.7'
EngineVersion: '5.7.mysql_aurora.2.07.1'
EngineVersion: '5.7.mysql_aurora.2.08.3'
Engine: 'aurora-mysql'
'5.6.mysql-aurora.1.22.3':
ClusterParameterGroupFamily: 'aurora5.6'
EngineVersion: '5.6.mysql_aurora.1.22.3'
Engine: aurora
Conditions:
HasSecret: !Not [!Equals [!Ref ParentSecretStack, '']]
HasZone: !Not [!Equals [!Ref ParentZoneStack, '']]
Expand Down
128 changes: 52 additions & 76 deletions state/rds-aurora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@ Parameters:
Description: 'Aurora engine and version'
Type: String
AllowedValues:
- '5.6.mysql-aurora.1.19.1' # aws rds describe-db-engine-versions --engine aurora --query 'DBEngineVersions[?contains(SupportedEngineModes,`provisioned`)].EngineVersion'
- '5.6.mysql-aurora.1.23.4' # aws rds describe-db-engine-versions --engine aurora --query 'DBEngineVersions[?contains(SupportedEngineModes,`provisioned`)].EngineVersion'
- '5.6.mysql-aurora.1.23.2'
- '5.6.mysql-aurora.1.23.4'
- '5.6.mysql-aurora.1.19.1'
- aurora
- '5.7.mysql-aurora.2.04.3' # aws rds describe-db-engine-versions --engine aurora-mysql --query 'DBEngineVersions[?contains(SupportedEngineModes,`provisioned`)].EngineVersion'
- '5.7.mysql-aurora.2.09.2'
- '5.7.mysql-aurora.2.09.3'
- '5.7.mysql-aurora.2.10.1'
- '8.0.mysql-aurora.3.02.1' # aws rds describe-db-engine-versions --engine aurora-mysql --query 'DBEngineVersions[?contains(SupportedEngineModes,`provisioned`)].EngineVersion'
- '8.0.mysql-aurora.3.02.0'
- 'aurora-postgresql-10.14' # aws rds describe-db-engine-versions --engine aurora-postgresql --query 'DBEngineVersions[?contains(SupportedEngineModes,`provisioned`)].EngineVersion'
- 'aurora-postgresql-11.9'
- 'aurora-postgresql-12.4'
- 'aurora-postgresql-12.8'
- '5.7.mysql-aurora.2.10.1'
- '5.7.mysql-aurora.2.09.3'
- '5.7.mysql-aurora.2.09.2'
- '5.7.mysql-aurora.2.04.3'
- 'aurora-postgresql-14.3' # aws rds describe-db-engine-versions --engine aurora-postgresql --query 'DBEngineVersions[?contains(SupportedEngineModes,`provisioned`)].EngineVersion'
- 'aurora-postgresql-13.4'
- 'aurora-postgresql-14.3'
- 'aurora-postgresql-12.8'
- 'aurora-postgresql-11.9'
- 'aurora-postgresql-10.21'
DBSnapshotIdentifier:
Description: 'Optional identifier for the DB cluster snapshot from which you want to restore (leave blank to create an empty cluster).'
Type: String
Expand Down Expand Up @@ -127,38 +127,50 @@ Parameters:
Type: String
Default: '09:54-10:24'
PreferredMaintenanceWindow:
Description: The weekly time range (in UTC) during which system maintenance can occur.
Description: 'The weekly time range (in UTC) during which system maintenance can occur.'
Type: String
Default: 'sat:07:00-sat:07:30'
Mappings:
EngineMap:
aurora:
'5.6.mysql-aurora.1.23.4':
Engine: aurora
EngineVersion: '5.6.10a'
EngineVersion: '5.6.mysql_aurora.1.23.4'
Port: 3306
ClusterParameterGroupFamily: 'aurora5.6'
ParameterGroupFamily: 'aurora5.6'
'5.6.mysql-aurora.1.19.1':
'5.6.mysql-aurora.1.23.2':
Engine: aurora
EngineVersion: '5.6.mysql_aurora.1.19.1'
EngineVersion: '5.6.mysql_aurora.1.23.2'
Port: 3306
ClusterParameterGroupFamily: 'aurora5.6'
ParameterGroupFamily: 'aurora5.6'
'5.6.mysql-aurora.1.23.2':
'5.6.mysql-aurora.1.19.1':
Engine: aurora
EngineVersion: '5.6.mysql_aurora.1.23.2'
EngineVersion: '5.6.mysql_aurora.1.19.1'
Port: 3306
ClusterParameterGroupFamily: 'aurora5.6'
ParameterGroupFamily: 'aurora5.6'
'5.6.mysql-aurora.1.23.4':
aurora:
Engine: aurora
EngineVersion: '5.6.mysql_aurora.1.23.4'
EngineVersion: '5.6.10a'
Port: 3306
ClusterParameterGroupFamily: 'aurora5.6'
ParameterGroupFamily: 'aurora5.6'
'5.7.mysql-aurora.2.09.2':
'8.0.mysql-aurora.3.02.1':
Engine: 'aurora-mysql'
EngineVersion: '5.7.mysql_aurora.2.09.2'
EngineVersion: '8.0.mysql_aurora.3.02.1'
Port: 3306
ClusterParameterGroupFamily: 'aurora-mysql8.0'
ParameterGroupFamily: 'aurora-mysql8.0'
'8.0.mysql-aurora.3.02.0':
Engine: 'aurora-mysql'
EngineVersion: '8.0.mysql_aurora.3.02.0'
Port: 3306
ClusterParameterGroupFamily: 'aurora-mysql8.0'
ParameterGroupFamily: 'aurora-mysql8.0'
'5.7.mysql-aurora.2.10.1':
Engine: 'aurora-mysql'
EngineVersion: '5.7.mysql_aurora.2.10.1'
Port: 3306
ClusterParameterGroupFamily: 'aurora-mysql5.7'
ParameterGroupFamily: 'aurora-mysql5.7'
Expand All @@ -168,84 +180,48 @@ Mappings:
Port: 3306
ClusterParameterGroupFamily: 'aurora-mysql5.7'
ParameterGroupFamily: 'aurora-mysql5.7'
'5.7.mysql-aurora.2.10.1':
'5.7.mysql-aurora.2.09.2':
Engine: 'aurora-mysql'
EngineVersion: '5.7.mysql_aurora.2.10.1'
EngineVersion: '5.7.mysql_aurora.2.09.2'
Port: 3306
ClusterParameterGroupFamily: 'aurora-mysql5.7'
ParameterGroupFamily: 'aurora-mysql5.7'
'8.0.mysql-aurora.3.02.0':
Engine: 'aurora-mysql'
EngineVersion: '8.0.mysql_aurora.3.02.0'
Port: 3306
ClusterParameterGroupFamily: 'aurora-mysql8.0'
ParameterGroupFamily: 'aurora-mysql8.0'
'5.7.mysql-aurora.2.04.3':
Engine: 'aurora-mysql'
EngineVersion: '5.7.mysql_aurora.2.04.3'
Port: 3306
ClusterParameterGroupFamily: 'aurora-mysql5.7'
ParameterGroupFamily: 'aurora-mysql5.7'
'aurora-postgresql-10.4':
Engine: 'aurora-postgresql'
EngineVersion: '10.4'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql10'
ParameterGroupFamily: 'aurora-postgresql10'
'aurora-postgresql-10.5':
Engine: 'aurora-postgresql'
EngineVersion: '10.5'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql10'
ParameterGroupFamily: 'aurora-postgresql10'
'aurora-postgresql-10.6':
Engine: 'aurora-postgresql'
EngineVersion: '10.6'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql10'
ParameterGroupFamily: 'aurora-postgresql10'
'aurora-postgresql-10.7':
Engine: 'aurora-postgresql'
EngineVersion: '10.7'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql10'
ParameterGroupFamily: 'aurora-postgresql10'
'aurora-postgresql-10.14':
Engine: 'aurora-postgresql'
EngineVersion: '10.14'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql10'
ParameterGroupFamily: 'aurora-postgresql10'
'aurora-postgresql-11.9':
'aurora-postgresql-14.3':
Engine: 'aurora-postgresql'
EngineVersion: '11.9'
EngineVersion: '14.3'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql11'
ParameterGroupFamily: 'aurora-postgresql11'
'aurora-postgresql-12.4':
ClusterParameterGroupFamily: 'aurora-postgresql14'
ParameterGroupFamily: 'aurora-postgresql14'
'aurora-postgresql-13.4':
Engine: 'aurora-postgresql'
EngineVersion: '12.4'
EngineVersion: '13.4'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql12'
ParameterGroupFamily: 'aurora-postgresql12'
ClusterParameterGroupFamily: 'aurora-postgresql13'
ParameterGroupFamily: 'aurora-postgresql13'
'aurora-postgresql-12.8':
Engine: 'aurora-postgresql'
EngineVersion: '12.8'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql12'
ParameterGroupFamily: 'aurora-postgresql12'
'aurora-postgresql-13.4':
'aurora-postgresql-11.9':
Engine: 'aurora-postgresql'
EngineVersion: '13.4'
EngineVersion: '11.9'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql13'
ParameterGroupFamily: 'aurora-postgresql13'
'aurora-postgresql-14.3':
ClusterParameterGroupFamily: 'aurora-postgresql11'
ParameterGroupFamily: 'aurora-postgresql11'
'aurora-postgresql-10.21':
Engine: 'aurora-postgresql'
EngineVersion: '14.3'
EngineVersion: '10.21'
Port: 5432
ClusterParameterGroupFamily: 'aurora-postgresql14'
ParameterGroupFamily: 'aurora-postgresql14'
ClusterParameterGroupFamily: 'aurora-postgresql10'
ParameterGroupFamily: 'aurora-postgresql10'
Conditions:
HasSecret: !Not [!Equals [!Ref ParentSecretStack, '']]
HasKmsKey: !Not [!Equals [!Ref ParentKmsKeyStack, '']]
Expand Down
2 changes: 1 addition & 1 deletion state/rds-mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Parameters:
EngineVersion:
Description: 'MySQL version.'
Type: String
AllowedValues: ['8.0.23', '8.0.15', '5.7.25', '5.7.21', '5.6.41', '5.5.61'] # aws rds describe-db-engine-versions --engine mysql --query "DBEngineVersions[].EngineVersion"
AllowedValues: ['8.0.30', '8.0.28', '8.0.27', '8.0.26', '8.0.25', '8.0.23', '5.7.38', '5.7.37', '5.7.34', '5.7.33'] # aws rds describe-db-engine-versions --engine mysql --query "DBEngineVersions[].EngineVersion"
EnableIAMDatabaseAuthentication:
Description: 'Enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html).'
Type: String
Expand Down
2 changes: 1 addition & 1 deletion state/rds-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Parameters:
EngineVersion:
Description: 'PostgreSQL version.'
Type: String
AllowedValues: ['10.17', '10.18', '10.19', '11.1', '11.4', '11.5', '11.6', '11.8', '11.10', '11.12', '11.13', '11.14', '12.6', '12.7', '12.8', '12.9', '13.3', '13.4', '13.5', '14.1'] # aws rds describe-db-engine-versions --engine postgres --query "DBEngineVersions[].EngineVersion"
AllowedValues: ['14.4', '14.3', '14.2', '14.1', '13.7', '13.6', '13.5', '13.4', '13.3', '12.11', '12.10', '12.9', '12.8', '12.7', '11.16', '11.15', '11.14', '11.13', '11.12', '10.21', '10.20', '10.19', '10.18', '10.17'] # aws rds describe-db-engine-versions --engine postgres --query "DBEngineVersions[].EngineVersion"
EnableIAMDatabaseAuthentication:
Description: 'Enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html).'
Type: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
public class TestDocumentDB extends ACloudFormationTest {

@Test
public void test() {
public void testVersion3() {
this.testVersion("3.6.0");
}

@Test
public void testVersion4() {
this.testVersion("4.0.0");
}

private void testVersion(final String version) {
final Context context = new Context();
final String vpcStackName = "vpc-2azs-" + this.random8String();
final String clientStackName = "client-" + this.random8String();
Expand All @@ -26,7 +35,7 @@ public void test() {
new Parameter().withParameterKey("ParentVPCStack").withParameterValue(vpcStackName),
new Parameter().withParameterKey("ParentClientStack").withParameterValue(clientStackName),
new Parameter().withParameterKey("MasterUserPassword").withParameterValue("Test!1234"),
new Parameter().withParameterKey("EngineVersion").withParameterValue("3.6.0")
new Parameter().withParameterKey("EngineVersion").withParameterValue(version)
);
// TODO how can we check if this stack works? start a bastion host and try to connect?
} finally {
Expand Down
Loading

0 comments on commit 7f168d8

Please sign in to comment.