Created
July 23, 2019 07:01
-
-
Save cagdas1/509cf0892f6fe187cde0f1e3e7b45883 to your computer and use it in GitHub Desktop.
ECS Demo ECR Repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cdk = require("@aws-cdk/core"); | |
import ecr = require("@aws-cdk/aws-ecr"); | |
import ecs = require("@aws-cdk/aws-ec2"); | |
import ecs_patterns = require('@aws-cdk/aws-ecs-patterns'); | |
export default class EcsGoAPIStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps){ | |
super(scope, id, props); | |
const ecrRepo = new ecr.Repository(this, "GoAPI", { | |
repositoryName: "go-api" | |
}); | |
new cdk.CfnOutput(this, "ecrRepoURI", { | |
value: ecrRepo.repositoryUri | |
}); | |
} | |
} | |
const app = new cdk.App(); | |
new EcsGoAPIStack(app, "EcsGoAPIStack", { | |
env: { | |
account: process.env.ACCOUNT_ID, | |
region: process.env.AWS_REGION, | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment