Skip to content

Commit

Permalink
fix: set the rds security group via env var (#3269)
Browse files Browse the repository at this point in the history
This is a temporary solution to allow DB connectivity until we have
module specific securty groups implemented
  • Loading branch information
jvmakine authored Oct 31, 2024
1 parent 276153e commit 2e03dc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/ftl-provisioner-cloudformation/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const (

type Config struct {
DatabaseSubnetGroupARN string `help:"ARN for the subnet group to be used to create Databases in" env:"FTL_PROVISIONER_CF_DB_SUBNET_GROUP"`
// TODO: remove this once we have module specific security groups
DatabaseSecurityGroup string `help:"SG for databases" env:"FTL_PROVISIONER_CF_DB_SECURITY_GROUP"`
}

type CloudformationProvisioner struct {
Expand Down Expand Up @@ -140,6 +142,7 @@ func (c *CloudformationProvisioner) resourceToCF(cluster, module string, templat
MasterUsername: ptr("root"),
ManageMasterUserPassword: ptr(true),
DBSubnetGroupName: ptr(c.confg.DatabaseSubnetGroupARN),
VpcSecurityGroupIds: []string{c.confg.DatabaseSecurityGroup},
EngineMode: ptr("provisioned"),
Port: ptr(5432),
ServerlessV2ScalingConfiguration: &rds.DBCluster_ServerlessV2ScalingConfiguration{
Expand Down

0 comments on commit 2e03dc5

Please sign in to comment.