Skip to content

Commit

Permalink
Merge 9da607d into c855069
Browse files Browse the repository at this point in the history
  • Loading branch information
T.J. Corrigan committed Oct 19, 2015
2 parents c855069 + 9da607d commit 6dc4c94
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ object SecurityGroupRoutableMaker {
def withSG(r: `AWS::AutoScaling::LaunchConfiguration`, sgr: ResourceRef[`AWS::EC2::SecurityGroup`]) =
r.copy(SecurityGroups = r.SecurityGroups :+ Token.fromAny(sgr))
}

implicit object RDSMaker extends SecurityGroupRoutableMaker[`AWS::RDS::DBInstance`] {
def withSG(r: `AWS::RDS::DBInstance`, sgr: ResourceRef[`AWS::EC2::SecurityGroup`]) =
r.copy(VPCSecurityGroups = Some(r.VPCSecurityGroups.getOrElse(Seq()) :+ sgr))
}
}

case class SecurityGroupRoutable[R <: Resource[R]](resource: R, sg: `AWS::EC2::SecurityGroup`, extras: Option[Seq[Resource[_]]] = None) {
Expand Down

0 comments on commit 6dc4c94

Please sign in to comment.