Skip to content

Commit

Permalink
Add bare minimal VPC for the application
Browse files Browse the repository at this point in the history
  • Loading branch information
rce committed Feb 11, 2023
1 parent 7c15392 commit 17a0840
Show file tree
Hide file tree
Showing 7 changed files with 843 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
role-to-assume: arn:aws:iam::407456120779:role/GithubActionsAccessRole
aws-region: eu-west-1

- run: aws sts get-caller-identity
- run: ./scripts/deploy-prod.sh
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ __pycache__/

# Node.js
node_modules/
package-lock.json
35 changes: 35 additions & 0 deletions infra/Application.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import {App, Stack} from 'aws-cdk-lib'
import {IpAddresses, SubnetType, Vpc} from "aws-cdk-lib/aws-ec2";

async function main() {
const app = new App()
new Application(app)
app.synth()
}

class Application extends Stack {
constructor(scope: App) {
super(scope, "Application", {
env: {
account: process.env.CDK_DEFAULT_ACCOUNT,
region: process.env.CDK_DEFAULT_REGION,
}
})

const vpc = new Vpc(this, "Vpc", {
ipAddresses: IpAddresses.cidr('10.0.0.0/16'),
maxAzs: 1,
subnetConfiguration: [{
name: "public",
subnetType: SubnetType.PUBLIC,
cidrMask: 24,
}]
})

}
}

main().catch(err => {
console.error(err)
process.exit(1)
})
Loading

0 comments on commit 17a0840

Please sign in to comment.