Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save domingoladron/755041036aabbcaac258dfe9fdfd30d4 to your computer and use it in GitHub Desktop.

Select an option

Save domingoladron/755041036aabbcaac258dfe9fdfd30d4 to your computer and use it in GitHub Desktop.
pulumi-ecs-fargate-example-task-definition.ts
//create our ecs task (with docker build of our container)
const taskDefinition = new awsx.ecs.FargateTaskDefinition("pulumi-ecs-primary", {
containers: {
sampleapp: {
image: awsx.ecs.Image.fromDockerBuild(repo, {
context: "../src/",
dockerfile: "../src/MyApi/MyApi.Service/AWS.Dockerfile",
}),
portMappings: [listener],
//we can even add environment variables to our task's container
environment: [
{
name: "SOME_ENV_VARIABLE",
value: "SOME_VALUE"
}
],
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment