Skip to content

Instantly share code, notes, and snippets.

@varqasim
Created January 26, 2021 17:33
Show Gist options
  • Save varqasim/9013432d868ebf2ab2e9f8dc4ccbebdf to your computer and use it in GitHub Desktop.
Save varqasim/9013432d868ebf2ab2e9f8dc4ccbebdf to your computer and use it in GitHub Desktop.
Pulumi + ECR + Docker
var pulumi = require("@pulumi/pulumi");
var aws = require("@pulumi/aws");
var awsx = require("@pulumi/awsx");
var stackName =
pulumi.getStack().charAt(0).toUpperCase() + pulumi.getStack().slice(1);
var ecrRepo = new aws.ecr.Repository("haproxy", {
mageScanningConfiguration: {
scanOnPush: true,
},
imageTagMutability: "MUTABLE",
tags: {
Project: "haproxy",
Environment: stackName,
},
});
var ecrRepoUrl = ecrRepo.repositoryUrl;
var dockerImage = awsx.ecs.Image.fromPath(ecrRepo, "../haproxy");
module.exports = { ecrRepoUrl, dockerImage };
var pulumi = require("@pulumi/pulumi");
var aws = require("@pulumi/aws");
var awsx = require("@pulumi/awsx");
var stackName =
pulumi.getStack().charAt(0).toUpperCase() + pulumi.getStack().slice(1);
var ecrRepo = new aws.ecr.Repository("hello-world", {
mageScanningConfiguration: {
scanOnPush: true,
},
imageTagMutability: "MUTABLE",
tags: {
Project: "core",
Environment: stackName,
},
});
var ecrRepoUrl = ecrRepo.repositoryUrl;
var dockerImage = awsx.ecs.Image.fromPath(ecrRepo, "../hello-world");
module.exports = { ecrRepoUrl, dockerImage };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment