Skip to content

Commit

Permalink
[#3462] db: minor version control, fix for snapshot identifier, new AMIs
Browse files Browse the repository at this point in the history
null
  • Loading branch information
beastawakens committed Aug 22, 2021
1 parent 0a6cb1d commit e962bfa
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 24 deletions.
6 changes: 6 additions & 0 deletions provider/aws/formation/app.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
"Parameters" : {
{{ template "service-params" .Manifest }}

"AutoMinorVersionUpgrade": {
"Type" : "String",
"Default": "true",
"AllowedValues" : [ "true", "false" ]
},
"CircuitBreaker": {
"Type": "String",
"Default": "No",
Expand Down Expand Up @@ -224,6 +229,7 @@
{{ range $k, $v := (index $ (printf "ResourceParams%s" (upper .Name) ) ) }}
"{{$k}}": "{{$v}}",
{{ end }}
"AutoMinorVersionUpgrade": { "Ref": "AutoMinorVersionUpgrade" },
"Password": { "Fn::If": [ "BlankResourcePassword",
{ "Fn::Select": [ 2, { "Fn::Split": [ "/", { "Ref": "AWS::StackId" } ] } ] },
{ "Ref": "ResourcePassword" }
Expand Down
42 changes: 21 additions & 21 deletions provider/aws/formation/rack.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,27 @@
},
"Mappings": {
"RegionConfig": {
"af-south-1": { "Ami": "ami-02d67c60a9a72a4c9", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "098369216593", "Fargate": "Yes" },
"ap-east-1": { "Ami": "ami-0903490e028d75f33", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "754344448648", "Fargate": "Yes" },
"ap-northeast-1": { "Ami": "ami-0ffb5f4e03c892bc5", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "582318560864", "Fargate": "No" },
"ap-northeast-2": { "Ami": "ami-0a09f75d88cac17d3", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "600734575887", "Fargate": "Yes" },
"ap-northeast-3": { "Ami": "ami-0e47631e1b1fb884c", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "383597477331", "Fargate": "Yes" },
"ap-south-1": { "Ami": "ami-02704edb2becb49b9", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "718504428378", "Fargate": "Yes" },
"ap-southeast-1": { "Ami": "ami-0c5ab0d956378c44d", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "114774131450", "Fargate": "Yes" },
"ap-southeast-2": { "Ami": "ami-0ba6df717ed766b7c", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "783225319266", "Fargate": "Yes" },
"ca-central-1": { "Ami": "ami-09dab0e05012ef93d", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "985666609251", "Fargate": "No" },
"eu-central-1": { "Ami": "ami-0ebfeb0108c46be41", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "054676820928", "Fargate": "Yes" },
"eu-north-1": { "Ami": "ami-0035a9fe772fd6d60", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "897822967062", "Fargate": "Yes" },
"eu-south-1": { "Ami": "ami-0d78d1b861cca58f3", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "635631232127", "Fargate": "Yes" },
"eu-west-1": { "Ami": "ami-0fc76c7f5cfa96e89", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "156460612806", "Fargate": "Yes" },
"eu-west-2": { "Ami": "ami-077f98d933531f865", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "652711504416", "Fargate": "Yes" },
"eu-west-3": { "Ami": "ami-0c8823759848d625a", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "009996457667", "Fargate": "Yes" },
"me-south-1": { "Ami": "ami-006655367b29fb81c", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "076674570225", "Fargate": "Yes" },
"sa-east-1": { "Ami": "ami-0f9e2322459fd12e0", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "507241528517", "Fargate": "Yes" },
"us-east-1": { "Ami": "ami-0dbd8c88f9060cf71", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "127311923021", "Fargate": "Yes" },
"us-east-2": { "Ami": "ami-062be0c2f0e7fb6d2", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "033677994240", "Fargate": "Yes" },
"us-west-1": { "Ami": "ami-09bc3667a66efbf89", "EFS": "Yes", "ThirdAvailabilityZone": "No", "ELBAccountId": "027434742980", "Fargate": "No" },
"us-west-2": { "Ami": "ami-0a51409a409fbc030", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "797873946194", "Fargate": "Yes" },
"af-south-1": { "Ami": "ami-04595fb57b8c3064d", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "098369216593", "Fargate": "Yes" },
"ap-east-1": { "Ami": "ami-04ab87564f47361db", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "754344448648", "Fargate": "Yes" },
"ap-northeast-1": { "Ami": "ami-07932765b08ae3232", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "582318560864", "Fargate": "No" },
"ap-northeast-2": { "Ami": "ami-040ef5b25ed8bf593", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "600734575887", "Fargate": "Yes" },
"ap-northeast-3": { "Ami": "ami-0fd48c913e53119a1", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "383597477331", "Fargate": "Yes" },
"ap-south-1": { "Ami": "ami-017cab36e4ddda18b", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "718504428378", "Fargate": "Yes" },
"ap-southeast-1": { "Ami": "ami-0cf02969983d4304c", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "114774131450", "Fargate": "Yes" },
"ap-southeast-2": { "Ami": "ami-0e3a9308d8f475421", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "783225319266", "Fargate": "Yes" },
"ca-central-1": { "Ami": "ami-0ebb9f30538a674fd", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "985666609251", "Fargate": "No" },
"eu-central-1": { "Ami": "ami-0102ef3da1a6c47ca", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "054676820928", "Fargate": "Yes" },
"eu-north-1": { "Ami": "ami-0e74361b71c3bbc04", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "897822967062", "Fargate": "Yes" },
"eu-south-1": { "Ami": "ami-0d6fd8fdf5e5747a7", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "635631232127", "Fargate": "Yes" },
"eu-west-1": { "Ami": "ami-0f81029f3b18d0712", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "156460612806", "Fargate": "Yes" },
"eu-west-2": { "Ami": "ami-02fee912d20d2f3cd", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "652711504416", "Fargate": "Yes" },
"eu-west-3": { "Ami": "ami-042e88199f7d67576", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "009996457667", "Fargate": "Yes" },
"me-south-1": { "Ami": "ami-04109006cb2ed0b66", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "076674570225", "Fargate": "Yes" },
"sa-east-1": { "Ami": "ami-095d3a8a82e8fadf6", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "507241528517", "Fargate": "Yes" },
"us-east-1": { "Ami": "ami-0e5fb9632ceee168f", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "127311923021", "Fargate": "Yes" },
"us-east-2": { "Ami": "ami-0dfa0bf531cde9048", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "033677994240", "Fargate": "Yes" },
"us-west-1": { "Ami": "ami-08327d538edec6c14", "EFS": "Yes", "ThirdAvailabilityZone": "No", "ELBAccountId": "027434742980", "Fargate": "No" },
"us-west-2": { "Ami": "ami-02b70ab564d80f9e9", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "797873946194", "Fargate": "Yes" },
"us-gov-east-1": { "Ami": "ami-04f633b669ee7b61c", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "190560391635", "Fargate": "Yes" },
"us-gov-west-1": { "Ami": "ami-90704ef1", "EFS": "Yes", "ThirdAvailabilityZone": "Yes", "ELBAccountId": "048591011584", "Fargate": "Yes" }
}
Expand Down
6 changes: 6 additions & 0 deletions provider/aws/formation/resource/mariadb.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"BlankIops": { "Fn::Equals": [ { "Ref": "Iops" }, "0" ] }
},
"Parameters": {
"AutoMinorVersionUpgrade": {
"Type" : "String",
"Default": "true",
"AllowedValues" : [ "true", "false" ]
},
"Class": {
"Type": "String",
"Default": "db.t2.micro"
Expand Down Expand Up @@ -71,6 +76,7 @@
"Properties": {
"AllocatedStorage": { "Ref": "Storage" },
"AllowMajorVersionUpgrade": "true",
"AutoMinorVersionUpgrade": { "Ref": "AutoMinorVersionUpgrade" },
"DBInstanceClass": { "Ref": "Class" },
"DBInstanceIdentifier": { "Ref": "AWS::StackName" },
"DBName": "app",
Expand Down
7 changes: 6 additions & 1 deletion provider/aws/formation/resource/memcached.json.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Parameters": {
"AutoMinorVersionUpgrade": {
"Type" : "String",
"Default": "true",
"AllowedValues" : [ "true", "false" ]
},
"Class": {
"Type": "String",
"Default": "cache.t2.micro"
Expand Down Expand Up @@ -50,7 +55,7 @@
"CacheCluster": {
"Type": "AWS::ElastiCache::CacheCluster",
"Properties": {
"AutoMinorVersionUpgrade": true,
"AutoMinorVersionUpgrade": { "Ref": "AutoMinorVersionUpgrade" },
"CacheNodeType": { "Ref": "Class" },
"CacheSubnetGroupName": { "Ref": "SubnetGroup" },
"Engine": "memcached",
Expand Down
6 changes: 6 additions & 0 deletions provider/aws/formation/resource/mysql.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"BlankIops": { "Fn::Equals": [ { "Ref": "Iops" }, "0" ] }
},
"Parameters": {
"AutoMinorVersionUpgrade": {
"Type" : "String",
"Default": "true",
"AllowedValues" : [ "true", "false" ]
},
"Class": {
"Type": "String",
"Default": "db.t2.micro"
Expand Down Expand Up @@ -71,6 +76,7 @@
"Properties": {
"AllocatedStorage": { "Ref": "Storage" },
"AllowMajorVersionUpgrade": "true",
"AutoMinorVersionUpgrade": { "Ref": "AutoMinorVersionUpgrade" },
"DBInstanceClass": { "Ref": "Class" },
"DBInstanceIdentifier": { "Ref": "AWS::StackName" },
"DBName": "app",
Expand Down
6 changes: 6 additions & 0 deletions provider/aws/formation/resource/postgres.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"Version9": { "Fn::Equals": [ { "Fn::Select": [ 0, { "Fn::Split": [ ".", { "Ref": "Version" } ] } ] }, "9" ] }
},
"Parameters": {
"AutoMinorVersionUpgrade": {
"Type" : "String",
"Default": "true",
"AllowedValues" : [ "true", "false" ]
},
"Class": {
"Type": "String",
"Default": "db.t2.micro"
Expand Down Expand Up @@ -72,6 +77,7 @@
"Properties": {
"AllocatedStorage": { "Ref": "Storage" },
"AllowMajorVersionUpgrade": "true",
"AutoMinorVersionUpgrade": { "Ref": "AutoMinorVersionUpgrade" },
"DBInstanceClass": { "Ref": "Class" },
"DBInstanceIdentifier": { "Ref": "AWS::StackName" },
"DBName": "app",
Expand Down
7 changes: 6 additions & 1 deletion provider/aws/formation/resource/redis.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"Encrypted": { "Fn::Equals": [{ "Ref": "Encrypted" }, "true"] }
},
"Parameters": {
"AutoMinorVersionUpgrade": {
"Type" : "String",
"Default": "true",
"AllowedValues" : [ "true", "false" ]
},
"Class": {
"Type": "String",
"Default": "cache.t2.micro"
Expand Down Expand Up @@ -86,7 +91,7 @@
]
},
"AutomaticFailoverEnabled": { "Ref": "Durable" },
"AutoMinorVersionUpgrade": "true",
"AutoMinorVersionUpgrade": { "Ref": "AutoMinorVersionUpgrade" },
"CacheNodeType": { "Ref": "Class" },
"CacheSubnetGroupName": { "Ref": "SubnetGroup" },
"Engine": "redis",
Expand Down
8 changes: 7 additions & 1 deletion provider/aws/templates/resource/mysql.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
"Default" : "10",
"Description" : "Allocated storage size (GB)"
},
"AutoMinorVersionUpgrade": {
"Type" : "String",
"Default": "true",
"AllowedValues" : [ "true", "false" ]
},
"Database": {
"Type" : "String",
"Default" : "app",
Expand Down Expand Up @@ -110,9 +115,10 @@
"KmsKeyId": { "Fn::If": [ "Encrypted", { "Ref": "EncryptionKey" }, { "Ref": "AWS::NoValue" } ] },
"StorageEncrypted": { "Ref": "Encrypted" },
"AllocatedStorage": { "Ref": "AllocatedStorage" },
"AutoMinorVersionUpgrade": { "Ref": "AutoMinorVersionUpgrade" },
"DBInstanceClass": { "Ref": "InstanceType" },
"DBInstanceIdentifier": { "Ref": "AWS::StackName" },
"DBName": { "Ref": "Database" },
"DBName": { "Fn::If": [ "BlankDatabaseSnapshotIdentifier", { "Ref": "Database" }, { "Ref": "AWS::NoValue" } ] },
"DBSnapshotIdentifier": { "Fn::If": [ "BlankDatabaseSnapshotIdentifier", { "Ref": "AWS::NoValue" }, { "Ref": "DatabaseSnapshotIdentifier" } ] },
"DBSubnetGroupName": { "Ref": "SubnetGroup" },
"Engine": "mysql",
Expand Down
6 changes: 6 additions & 0 deletions provider/aws/templates/resource/postgres.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"Default": "10",
"Description": "Allocated storage size (GB)"
},
"AutoMinorVersionUpgrade": {
"Type" : "String",
"Default": "true",
"AllowedValues" : [ "true", "false" ]
},
"Database": {
"Type": "String",
"Default": "app",
Expand Down Expand Up @@ -124,6 +129,7 @@
"Type": "AWS::RDS::DBInstance",
"Properties": {
"AllocatedStorage": { "Ref": "AllocatedStorage" },
"AutoMinorVersionUpgrade": { "Ref": "AutoMinorVersionUpgrade" },
"DBInstanceClass": { "Ref": "InstanceType" },
"DBInstanceIdentifier": { "Ref": "AWS::StackName" },
"DBName": { "Fn::If": [ "BlankDatabaseSnapshotIdentifier", { "Ref": "Database" }, { "Ref": "AWS::NoValue" } ] },
Expand Down

0 comments on commit e962bfa

Please sign in to comment.