Skip to content

Commit

Permalink
Add Postgres RDS to cloud.gov environment
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnaab committed Aug 17, 2024
1 parent 886c911 commit 4bce97c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions infra/cdktf/src/lib/cloud.gov/node-astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ export class AstroService extends Construct {
}
);

const dbInstance = new cloudfoundry.serviceInstance.ServiceInstance(
this,
`${id}-db`,
{
name: `${id}-db`,
servicePlan: 'micro-psql',
space: spaceId,
lifecycle: {
preventDestroy: true,
},
}
);

new cloudfoundry.app.App(this, `${id}-app`, {
name: `${id}-app`,
space: spaceId,
Expand All @@ -55,6 +68,9 @@ export class AstroService extends Construct {
},
],
serviceBinding: [
{
serviceInstance: dbInstance.id,
},
{
serviceInstance: loginGovService.id,
},
Expand Down

0 comments on commit 4bce97c

Please sign in to comment.