Skip to content

Commit

Permalink
fix: make schemas guard rail compliant
Browse files Browse the repository at this point in the history
This change updates the RDS resource schemas to be compliant with the
CFN guard rail rules.

Specific changes are:
- Added tagging element to all schemas.
- Removed non-existent property from DBCluster readOnlyProperties.
- Updated aws-cloudformation-resource-schema to 2.0.10, required for
  tagging permissions in the schema.
  • Loading branch information
zrfr committed Jul 23, 2024
1 parent 440766b commit e327b23
Show file tree
Hide file tree
Showing 12 changed files with 109 additions and 4 deletions.
5 changes: 5 additions & 0 deletions aws-rds-cfn-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
<artifactId>rds</artifactId>
<version>2.25.56</version>
</dependency>
<dependency>
<groupId>software.amazon.cloudformation</groupId>
<artifactId>aws-cloudformation-resource-schema</artifactId>
<version>[2.0.10,3.0.0)</version>
</dependency>
<dependency>
<groupId>software.amazon.cloudformation</groupId>
<artifactId>aws-cloudformation-rpdk-java-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"description": "The AWS::RDS::CustomDBEngineVersion resource creates an Amazon RDS custom DB engine version.",
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
"tagging": {
"taggable": true
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
},
"definitions": {
"Tag": {
Expand Down
12 changes: 11 additions & 1 deletion aws-rds-dbcluster/aws-rds-dbcluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@
"/properties/Endpoint",
"/properties/Endpoint/Address",
"/properties/Endpoint/Port",
"/properties/ReadEndpoint/Port",
"/properties/ReadEndpoint/Address",
"/properties/MasterUserSecret/SecretArn",
"/properties/StorageThroughput"
Expand Down Expand Up @@ -534,5 +533,16 @@
"rds:DescribeDBClusters"
]
}
},
"tagging": {
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
}
}
10 changes: 9 additions & 1 deletion aws-rds-dbclusterendpoint/aws-rds-dbclusterendpoint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"description": "The AWS::RDS::DBClusterEndpoint resource allows you to create custom Aurora Cluster endpoint. For more information, see Using custom endpoints in the Amazon RDS Aurora Guide.",
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-rds",
"tagging": {
"taggable": true
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
},
"definitions": {
"Tag": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,16 @@
"rds:DescribeDBClusterParameterGroups"
]
}
},
"tagging": {
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
}
}
11 changes: 11 additions & 0 deletions aws-rds-dbinstance/aws-rds-dbinstance.json
Original file line number Diff line number Diff line change
Expand Up @@ -660,5 +660,16 @@
"rds:DescribeDBInstances"
]
}
},
"tagging": {
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
}
}
11 changes: 11 additions & 0 deletions aws-rds-dbparametergroup/aws-rds-dbparametergroup.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,16 @@
"rds:DescribeDBParameterGroups"
]
}
},
"tagging": {
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
}
}
11 changes: 11 additions & 0 deletions aws-rds-dbsubnetgroup/aws-rds-dbsubnetgroup.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,16 @@
"rds:DescribeDBSubnetGroups"
]
}
},
"tagging": {
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
}
}
11 changes: 11 additions & 0 deletions aws-rds-eventsubscription/aws-rds-eventsubscription.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,16 @@
"rds:DescribeEventSubscriptions"
]
}
},
"tagging": {
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
}
}
3 changes: 3 additions & 0 deletions aws-rds-globalcluster/aws-rds-globalcluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,8 @@
"rds:DescribeGlobalClusters"
]
}
},
"tagging": {
"taggable": false
}
}
7 changes: 6 additions & 1 deletion aws-rds-integration/aws-rds-integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"tagProperty": "/properties/Tags"
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
},
"additionalProperties": false
}
11 changes: 11 additions & 0 deletions aws-rds-optiongroup/aws-rds-optiongroup.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,16 @@
"rds:DescribeOptionGroups"
]
}
},
"tagging": {
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags",
"permissions": [
"rds:AddTagsToResource",
"rds:RemoveTagsFromResource"
]
}
}

0 comments on commit e327b23

Please sign in to comment.