Skip to content

Commit 6729f05

Browse files
author
Patrick Brandt
committed
refactoring VPN config
1 parent 22c95ae commit 6729f05

File tree

5 files changed

+10
-19
lines changed

5 files changed

+10
-19
lines changed

config/dev.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ module.exports.config = function() {
1010
ApiIdSalt: '{apiId_salt}',
1111
PasswordSalt: '{password_salt}',
1212
VPC: {
13-
SG1: 'sg-b2200bcb',
14-
SN1: 'subnet-3ec1c248',
15-
SN2: 'subnet-3103ea56'
13+
securityGroupIds: ['sg-b2200bcb'],
14+
subnetIds: ['subnet-3ec1c248', 'subnet-3103ea56']
1615
}
1716
};
1817
};

config/patrick.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ module.exports.config = function() {
1010
ApiIdSalt: '{apiId_salt}',
1111
PasswordSalt: '{password_salt}',
1212
VPC: {
13-
SG1: 'sg-b2200bcb',
14-
SN1: 'subnet-3ec1c248',
15-
SN2: 'subnet-3103ea56'
13+
securityGroupIds: ['sg-b2200bcb'],
14+
subnetIds: ['subnet-3ec1c248', 'subnet-3103ea56']
1615
}
1716
};
1817
};

config/prod.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ module.exports.config = function() {
1010
ApiIdSalt: '{apiId_salt}',
1111
PasswordSalt: '{password_salt}',
1212
VPC: {
13-
SG1: 'sg-b2200bcb',
14-
SN1: 'subnet-3ec1c248',
15-
SN2: 'subnet-3103ea56'
13+
securityGroupIds: ['sg-b2200bcb'],
14+
subnetIds: ['subnet-3ec1c248', 'subnet-3103ea56']
1615
}
1716
};
1817
};

config/test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ module.exports.config = function() {
1010
ApiIdSalt: '{apiId_salt}',
1111
PasswordSalt: '{password_salt}',
1212
VPC: {
13-
SG1: 'sg-b2200bcb',
14-
SN1: 'subnet-3ec1c248',
15-
SN2: 'subnet-3103ea56'
13+
securityGroupIds: ['sg-b2200bcb'],
14+
subnetIds: ['subnet-3ec1c248', 'subnet-3103ea56']
1615
}
1716
};
1817
};

serverless.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@ provider:
4040
# 1. sls deploy with iamRoleStatements including the proper ec2 actions
4141
# 2. then sls deploy with vpc configs
4242
# if you don't want to run your function from a VPC, comment-out or remove this section:
43-
vpc: # use a different VPC per environment
44-
securityGroupIds:
45-
- ${self:custom.config.VPC.SG1}
46-
subnetIds:
47-
- ${self:custom.config.VPC.SN1}
48-
- ${self:custom.config.VPC.SN2}
49-
#profile: ko-playground-admin
43+
vpc: ${self:custom.config.VPC} # use a different VPC per environment
44+
profile: ko-playground-admin
5045

5146
package:
5247
exclude:

0 commit comments

Comments
 (0)