Skip to content

Instantly share code, notes, and snippets.

@cagdas1
Created July 23, 2019 07:01
Show Gist options
  • Save cagdas1/509cf0892f6fe187cde0f1e3e7b45883 to your computer and use it in GitHub Desktop.
Save cagdas1/509cf0892f6fe187cde0f1e3e7b45883 to your computer and use it in GitHub Desktop.
ECS Demo ECR Repo
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