Skip to content

Instantly share code, notes, and snippets.

@jumpeiMano
jumpeiMano / codepipeline-stack.ts
Created December 1, 2019 09:27
CodePipeline project written by CDK
import cdk = require("@aws-cdk/core");
import s3 = require("@aws-cdk/aws-s3");
import iam = require("@aws-cdk/aws-iam");
import build = require("@aws-cdk/aws-codebuild");
import pipeline = require("@aws-cdk/aws-codepipeline");
import pipeline_actions = require("@aws-cdk/aws-codepipeline-actions");
import deploy = require("@aws-cdk/aws-codedeploy");
export class PipelineStack extends cdk.Stack {
constructor(app: cdk.App, id: string, props?: cdk.StackProps) {
@jumpeiMano
jumpeiMano / bastion-stack.ts
Last active June 23, 2020 20:12
Create a bastion instance via CDK
import cdk = require("@aws-cdk/core");
import ec2 = require("@aws-cdk/aws-ec2");
import iam = require("@aws-cdk/aws-iam");
export class BastionStack extends cdk.Stack {
constructor(app: cdk.App, id: string, props?: cdk.StackProps) {
super(app, id, props);
const vpc = new ec2.Vpc(this, "vpc", {
cidr: "10.0.0.0/16",
@jumpeiMano
jumpeiMano / cloudformation.template.json
Created November 16, 2019 08:00
convert cloudformation template yaml file to json file
{
"Description": "This template deploys a VPC, with a pair of public and private subnets spread\nacross two Availability Zones. It deploys an Internet Gateway, with a default\nroute on the public subnets. It deploys a pair of NAT Gateways (one in each AZ),\nand default routes for them in the private subnets.",
"Parameters": {
"EnvironmentName": {
"Description": "An environment name that will be prefixed to resource names",
"Type": "String"
},
"VpcCIDR": {
"Description": "Please enter the IP range (CIDR notation) for this VPC",
"Type": "String",