diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 035ca10..86bfe2f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -101,7 +101,7 @@ jobs: template: cloudformation/template.yml capabilities: CAPABILITY_NAMED_IAM no-fail-on-empty-changeset: "1" - parameter-overrides: "DomainNamePrefix=api,GlobalTableArn=${{ env.GlobalTableZoneFrankfurt }}" + parameter-overrides: "VpcCidrPrefix=10.5,DomainNamePrefix=api,GlobalTableArn=${{ env.GlobalTableZoneFrankfurt }}" - name: Get Output Frankfurt run: | HealthCheckId=`aws cloudformation describe-stacks --stack-name lambda-vpc --query "Stacks[0].Outputs[?OutputKey == 'HealthCheckId'].OutputValue" | grep -v '\[' | grep -v '\]' | xargs` diff --git a/cloudformation/app.yml b/cloudformation/app.yml index fcebc1f..aba3253 100644 --- a/cloudformation/app.yml +++ b/cloudformation/app.yml @@ -15,7 +15,7 @@ Resources: Policy: Software: RpoInSecs: 300 - RtoInSecs: 1800 + RtoInSecs: 5400 Hardware: RpoInSecs: 0 RtoInSecs: 0 @@ -24,7 +24,7 @@ Resources: RtoInSecs: 0 Region: RpoInSecs: 300 - RtoInSecs: 900 + RtoInSecs: 3600 PolicyDescription: "Global Mission Critical" PolicyName: GlobalMissionCritical Tier: MissionCritical diff --git a/cloudformation/template.yml b/cloudformation/template.yml index a5334c5..71b888b 100644 --- a/cloudformation/template.yml +++ b/cloudformation/template.yml @@ -13,6 +13,10 @@ Parameters: Description: Domain name (optional), used to setup route53 dns Type: String Default: hack23.com + VpcCidrPrefix: + Description: The first part of the CIDR block for the VPC and subnets + Type: String + Default: "10.1" Conditions: deployGlobalTable: !Equals - '' @@ -21,7 +25,7 @@ Resources: VPC: Type: "AWS::EC2::VPC" Properties: - CidrBlock: "10.1.0.0/16" + CidrBlock: !Sub "${VpcCidrPrefix}.0.0/16" EnableDnsHostnames: true EnableDnsSupport: true Tags: @@ -48,7 +52,7 @@ Resources: PrivateSubnet1: Type: "AWS::EC2::Subnet" Properties: - CidrBlock: "10.1.0.0/24" + CidrBlock: !Sub "${VpcCidrPrefix}.0.0/24" MapPublicIpOnLaunch: false VpcId: Ref: "VPC" @@ -63,7 +67,7 @@ Resources: PrivateSubnet2: Type: "AWS::EC2::Subnet" Properties: - CidrBlock: "10.1.1.0/24" + CidrBlock: !Sub "${VpcCidrPrefix}.1.0/24" MapPublicIpOnLaunch: false VpcId: Ref: "VPC" @@ -78,7 +82,7 @@ Resources: PrivateSubnet3: Type: "AWS::EC2::Subnet" Properties: - CidrBlock: "10.1.2.0/24" + CidrBlock: !Sub "${VpcCidrPrefix}.2.0/24" MapPublicIpOnLaunch: false VpcId: Ref: "VPC"