Skip to content

Commit 502447c

Browse files
authored
Update template.yml (#101)
* Update template.yml VpcCidrPrefix. You want to ensure that each subnet is within the range of the VPC CIDR block and that subnets do not overlap with each other. Signed-off-by: James Pether Sörling <[email protected]> * Update template.yml Signed-off-by: James Pether Sörling <[email protected]> * Update main.yml Signed-off-by: James Pether Sörling <[email protected]> * Update app.yml Signed-off-by: James Pether Sörling <[email protected]> --------- Signed-off-by: James Pether Sörling <[email protected]>
1 parent 680f285 commit 502447c

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
template: cloudformation/template.yml
102102
capabilities: CAPABILITY_NAMED_IAM
103103
no-fail-on-empty-changeset: "1"
104-
parameter-overrides: "DomainNamePrefix=api,GlobalTableArn=${{ env.GlobalTableZoneFrankfurt }}"
104+
parameter-overrides: "VpcCidrPrefix=10.5,DomainNamePrefix=api,GlobalTableArn=${{ env.GlobalTableZoneFrankfurt }}"
105105
- name: Get Output Frankfurt
106106
run: |
107107
HealthCheckId=`aws cloudformation describe-stacks --stack-name lambda-vpc --query "Stacks[0].Outputs[?OutputKey == 'HealthCheckId'].OutputValue" | grep -v '\[' | grep -v '\]' | xargs`

cloudformation/app.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Resources:
1515
Policy:
1616
Software:
1717
RpoInSecs: 300
18-
RtoInSecs: 1800
18+
RtoInSecs: 5400
1919
Hardware:
2020
RpoInSecs: 0
2121
RtoInSecs: 0
@@ -24,7 +24,7 @@ Resources:
2424
RtoInSecs: 0
2525
Region:
2626
RpoInSecs: 300
27-
RtoInSecs: 900
27+
RtoInSecs: 3600
2828
PolicyDescription: "Global Mission Critical"
2929
PolicyName: GlobalMissionCritical
3030
Tier: MissionCritical

cloudformation/template.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Parameters:
1313
Description: Domain name (optional), used to setup route53 dns
1414
Type: String
1515
Default: hack23.com
16+
VpcCidrPrefix:
17+
Description: The first part of the CIDR block for the VPC and subnets
18+
Type: String
19+
Default: "10.1"
1620
Conditions:
1721
deployGlobalTable: !Equals
1822
- ''
@@ -21,7 +25,7 @@ Resources:
2125
VPC:
2226
Type: "AWS::EC2::VPC"
2327
Properties:
24-
CidrBlock: "10.1.0.0/16"
28+
CidrBlock: !Sub "${VpcCidrPrefix}.0.0/16"
2529
EnableDnsHostnames: true
2630
EnableDnsSupport: true
2731
Tags:
@@ -48,7 +52,7 @@ Resources:
4852
PrivateSubnet1:
4953
Type: "AWS::EC2::Subnet"
5054
Properties:
51-
CidrBlock: "10.1.0.0/24"
55+
CidrBlock: !Sub "${VpcCidrPrefix}.0.0/24"
5256
MapPublicIpOnLaunch: false
5357
VpcId:
5458
Ref: "VPC"
@@ -63,7 +67,7 @@ Resources:
6367
PrivateSubnet2:
6468
Type: "AWS::EC2::Subnet"
6569
Properties:
66-
CidrBlock: "10.1.1.0/24"
70+
CidrBlock: !Sub "${VpcCidrPrefix}.1.0/24"
6771
MapPublicIpOnLaunch: false
6872
VpcId:
6973
Ref: "VPC"
@@ -78,7 +82,7 @@ Resources:
7882
PrivateSubnet3:
7983
Type: "AWS::EC2::Subnet"
8084
Properties:
81-
CidrBlock: "10.1.2.0/24"
85+
CidrBlock: !Sub "${VpcCidrPrefix}.2.0/24"
8286
MapPublicIpOnLaunch: false
8387
VpcId:
8488
Ref: "VPC"

0 commit comments

Comments
 (0)