Skip to content

Commit

Permalink
Merge pull request #898 from guardian/aa/rm-rds
Browse files Browse the repository at this point in the history
chore: Remove the RDS collector
  • Loading branch information
akash1810 authored Jun 19, 2024
2 parents 983287e + 253ab3e commit b84ac79
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 161 deletions.
104 changes: 0 additions & 104 deletions app/collectors/rds.scala

This file was deleted.

7 changes: 0 additions & 7 deletions app/controllers/Api.scala
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,6 @@ class Api(
Api.singleItem(prismDataStore.reservationAgent, arn)
}

def rdsList = Action.async { implicit request =>
Api.itemList(prismDataStore.rdsAgent, "rds-instances")
}
def rds(arn: String) = Action.async { implicit request =>
Api.singleItem(prismDataStore.rdsAgent, arn)
}

def vpcList = Action.async { implicit request =>
Api.itemList(prismDataStore.vpcAgent, "vpcs")
}
Expand Down
6 changes: 0 additions & 6 deletions app/controllers/Prism.scala
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ class Prism(prismConfiguration: PrismConfiguration)(actorSystem: ActorSystem) {
sourceStatusAgent,
lazyStartup
)(actorSystem)
val rdsAgent = new CollectorAgent[Rds](
new RdsCollectorSet(accounts),
sourceStatusAgent,
lazyStartup
)(actorSystem)
val vpcAgent = new CollectorAgent[Vpc](
new VpcCollectorSet(accounts),
sourceStatusAgent,
Expand All @@ -102,7 +97,6 @@ class Prism(prismConfiguration: PrismConfiguration)(actorSystem: ActorSystem) {
elbAgent,
bucketAgent,
reservationAgent,
rdsAgent,
vpcAgent
)
}
38 changes: 0 additions & 38 deletions app/jsonimplicits/implicits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,44 +71,6 @@ object model {
Json.writes[RecurringCharge]
Json.writes[Reservation]
}
// json-play does not support automatically generating a writer for case clases with 22+ fields.
// Manually write one to get around this limitation.
implicit val rdsWriter: Writes[Rds] = OWrites[Rds](obj =>
JsObject(
Seq(
"arn" -> Json.toJson(obj.arn),
"allocatedStorage" -> Json.toJson(obj.allocatedStorage),
"availabilityZone" -> Json.toJson(obj.availabilityZone),
"secondaryAvailabilityZone" -> Json.toJson(
obj.secondaryAvailabilityZone
),
"engineVersion" -> Json.toJson(obj.engineVersion),
"instanceCreateTime" -> Json.toJson(obj.instanceCreateTime),
"dbInstanceClass" -> Json.toJson(obj.dbInstanceClass),
"dbInstanceStatus" -> Json.toJson(obj.dbInstanceStatus),
"caCertificateIdentifier" -> Json.toJson(obj.caCertificateIdentifier),
"dbiResourceId" -> Json.toJson(obj.dbiResourceId),
"dbInstanceIdentifier" -> Json.toJson(obj.dbInstanceIdentifier),
"engine" -> Json.toJson(obj.engine),
"publiclyAccessible" -> Json.toJson(obj.publiclyAccessible),
"iamDatabaseAuthenticationEnabled" -> Json.toJson(
obj.iamDatabaseAuthenticationEnabled
),
"performanceInsightsEnabled" -> Json.toJson(
obj.performanceInsightsEnabled
),
"multiAZ" -> Json.toJson(obj.multiAZ),
"storageEncrypted" -> Json.toJson(obj.storageEncrypted),
"vpcId" -> Json.toJson(obj.vpcId),
"dbSubnetGroupName" -> Json.toJson(obj.dbSubnetGroupName),
"vpcSecurityGroupId" -> Json.toJson(obj.vpcSecurityGroupId),
"storageType" -> Json.toJson(obj.storageType),
"autoMinorVersionUpgrade" -> Json.toJson(obj.autoMinorVersionUpgrade),
"tags" -> Json.toJson(obj.tags)
)
)
)

implicit val domainResourceRecordWriter: Writes[DomainResourceRecord] =
Json.writes[DomainResourceRecord]
implicit val domainValidationWriter: Writes[DomainValidation] =
Expand Down
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ lazy val root = (project in file("."))
"software.amazon.awssdk" % "elasticloadbalancing" % awsVersion,
"software.amazon.awssdk" % "route53" % awsVersion,
"software.amazon.awssdk" % "iam" % awsVersion,
"software.amazon.awssdk" % "rds" % awsVersion,
"software.amazon.awssdk" % "cloudformation" % awsVersion,
"com.beust" % "jcommander" % "1.82", // TODO: remove once security vulnerability introduced by aws sdk v2 fixed: https://snyk.io/vuln/maven:com.beust%3Ajcommanderbu
"com.amazonaws" % "aws-java-sdk-dynamodb" % awsVersionOne,
Expand Down
1 change: 0 additions & 1 deletion cdk/lib/__snapshots__/prism-access.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ exports[`The PrismAccess stack matches the snapshot 1`] = `
"elasticloadbalancing:Describe*",
"lambda:ListFunctions",
"lambda:ListTags",
"rds:Describe*",
"cloudformation:Describe*",
"cloudformation:Get*",
],
Expand Down
1 change: 0 additions & 1 deletion cdk/lib/prism-access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export class PrismAccess extends GuStack {
"elasticloadbalancing:Describe*",
"lambda:ListFunctions",
"lambda:ListTags",
"rds:Describe*",
"cloudformation:Describe*",
"cloudformation:Get*",
],
Expand Down
3 changes: 0 additions & 3 deletions conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ GET /data/keys controllers.Api.dataKeysList
GET /data/lookup/:key controllers.Api.dataLookup(key)
GET /data/:arn controllers.Api.data(arn)

GET /rds-instances controllers.Api.rdsList
GET /rds-instances/:arn controllers.Api.rds(arn)

GET /vpcs controllers.Api.vpcList
GET /vpcs/:arn controllers.Api.vpcs(arn)

Expand Down

0 comments on commit b84ac79

Please sign in to comment.