Hi guys, someone knows how to deploy an existent e...
# general
a
Hi guys, someone knows how to deploy an existent ecr image to a new fargate instance using pulumi typescript
j
Something along the lines of:
Copy code
const cloud = require("@pulumi/cloud");

let service = new cloud.Service("pulumi-nginx", {
    containers: {
        nginx: {
            image: "ecr_image_address_stuff",
            memory: 128,
            ports: [{ port: 80 }],
        },
    },
    replicas: 2,
});

// export just the hostname property of the container frontend
exports.url = service.defaultEndpoint.apply(e => `http://${e.hostname}`);
idk what else you need to do to give it permissions to access the ecr image I’d have to look into it further
p
the big thing I discovered is that
image:
must be the full url (for ecr) -
<http://ecr.host.name/imagename:version|ecr.host.name/imagename:version>
so like
<http://111251075479.dkr.ecr.us-east-1.amazonaws.com/test-service2-ecr-015ef0d:latest|111251075479.dkr.ecr.us-east-1.amazonaws.com/test-service2-ecr-015ef0d:latest>
(if you don't make it latest, it'll stick to a single version...so you'd have to recreate the TD each time you deploy...)
(sorry for the delay, got sucked into another meeting)
a
thanks a lot guys i will give it a try