aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

AWS::RDS::DBInstance StorageType ChangeSet falsely displaying Conditional Replacement

Open
#1,788 0 comments 8 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::RDS::DBInstance

### Resource name

_No response_

### Description

When attempting to update an AWS::RDS::DBInstance Resource with a different StorageType Property, within the ChangeSet information of the Update, it states that the StorageType property is conditional, however per AWS's documentation located here [1] we can see that the Property is seen as a "Some Interruptions" type update, which is separate from the Replacement type update.

Below is an example Template:

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
MyDB:
Type: 'AWS::RDS::DBInstance'
Properties:
DBInstanceIdentifier: NewDB
DBName: TestDB
DBInstanceClass: db.m5.large
AllocatedStorage: 20
Engine: MySQL
EngineVersion: "8.0.33"
MasterUsername: user
MasterUserPassword: something
StorageType: gp2
#StorageType: gp3
```

When I shift the Template to the following:

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
MyDB:
Type: 'AWS::RDS::DBInstance'
Properties:
DBInstanceIdentifier: NewDB
DBName: TestDB
DBInstanceClass: db.m5.large
AllocatedStorage: 20
Engine: MySQL
EngineVersion: "8.0.33"
MasterUsername: user
MasterUserPassword: something
#StorageType: gp2
StorageType: gp3
```

I observe the following ChangeSet results:

```
[
{
"type": "Resource",
"resourceChange": {
"action": "Modify",
"logicalResourceId": "MyDB",
"physicalResourceId": "newdb",
"resourceType": "AWS::RDS::DBInstance",
"replacement": "Conditional",
"scope": [
"Properties"
],
"details": [
{
"target": {
"attribute": "Properties",
"name": "StorageType",
"requiresRecreation": "Conditionally"
},
"evaluation": "Static",
"changeSource": "DirectModification"
}
]
}
}
]

```
When attempting to do the same actions within the RDS Web console, I found I was able to switch the Storage Types for the DB Instance to whichever type I saw fit without any warnings of the Resource being replaced and when executing the Changes, I did observe a Replacement Update.

As AWS's documentation states that this property does not trigger a replacement update, I am requesting that the ChangeSet information accurately reflects the documentation where the StorageType property wont trigger a Replacement Update.

### Other Details

--------------------References--------------------

[1] AWS::RDS::DBInstance (Storage Type)
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html#cfn-rds-dbinstance-storagetype

Contributor guide

Open the contributing guide

Research direction

Start by comparing the AWS::RDS::DBInstance StorageType documentation with the ChangeSet output in this report, including the provided gp2-to-gp3 template change. Verify the actual update behavior and determine whether the replacement classification should reflect the documented “Some Interruptions” update; done means the ChangeSet no longer falsely reports conditional replacement.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.