Skip to content

Commit a737feb

Browse files
committed
Use new vpc component
1 parent 004c29f commit a737feb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/database/index.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('Database component deployment', () => {
6060

6161
it('should create subnet group in the correct VPC', async () => {
6262
const database = ctx.outputs.database.value;
63-
const project = ctx.outputs.project.value;
63+
const vpc = ctx.outputs.vpc.value;
6464
const dbSubnetGroupName = database.dbSubnetGroup.name;
6565

6666
const command = new DescribeDBSubnetGroupsCommand({
@@ -75,7 +75,7 @@ describe('Database component deployment', () => {
7575
const [subnetGroup] = DBSubnetGroups;
7676
assert.strictEqual(
7777
subnetGroup.VpcId,
78-
project.vpc.vpcId,
78+
vpc.vpc.vpcId,
7979
'Subnet group should be in the correct VPC',
8080
);
8181
assert.ok(
@@ -86,7 +86,7 @@ describe('Database component deployment', () => {
8686

8787
it('should create a security group with correct ingress rules', async () => {
8888
const database = ctx.outputs.database.value;
89-
const project = ctx.outputs.project.value;
89+
const vpc = ctx.outputs.vpc.value;
9090
const dbSecurityGroupId = database.dbSecurityGroup.id;
9191

9292
const command = new DescribeSecurityGroupsCommand({
@@ -100,7 +100,7 @@ describe('Database component deployment', () => {
100100
const [securityGroup] = SecurityGroups;
101101
assert.strictEqual(
102102
securityGroup.VpcId,
103-
project.vpc.vpcId,
103+
vpc.vpc.vpcId,
104104
'Security group should be in the correct VPC',
105105
);
106106

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Project, next as studion } from '@studion/infra-code-blocks';
1+
import { next as studion } from '@studion/infra-code-blocks';
22
import * as config from './config';
33

4-
export const project = new Project(config.projectName, { services: [] });
4+
export const vpc = new studion.Vpc(config.projectName, {});
55

66
export const database = new studion.DatabaseBuilder(config.instanceName)
77
.configure(
@@ -13,5 +13,5 @@ export const database = new studion.DatabaseBuilder(config.instanceName)
1313
skipFinalSnapshot: config.skipFinalSnapshot
1414
},
1515
)
16-
.withVpc(project.vpc)
17-
.build({ parent: project });
16+
.withVpc(vpc.vpc)
17+
.build();

0 commit comments

Comments
 (0)