acceptable-army-69872
11/14/2019, 7:23 PM// import { Repository, RepositoryImage } from "@pulumi/awsx/ecr";
export function createImage() : RepositoryImage {
const repository = new Repository("myrepo");
const repImage = repository.buildAndPushImage("./Application");
return repImage
}
and I get this error on the return line error TS2739: Type 'OutputInstance<string> & LiftedObject<String, number | "length">' is missing the following properties from type 'RepositoryImage': repository, imageValue, image, environment
. If I change createImage() : RepositoryImage
to any I get a string error...whats going on here?breezy-hamburger-69619
11/14/2019, 7:55 PMacceptable-army-69872
11/14/2019, 8:03 PMaws.ecs.TaskDefinition
which expects you to put a fully formed json blob in it (https://github.com/pulumi/pulumi-aws/blob/master/sdk/nodejs/ecs/taskDefinition.ts#L288) so understanding wtf is coming back from buildAndPushImage is required to construct that blob (i think).breezy-hamburger-69619
11/14/2019, 8:04 PMlemon-spoon-91807
11/14/2019, 8:06 PMconst repImage: Output<string> = repository.buildAndPushImage("./Application");
RepositoryImage
export function createImage() : Output<string> {
acceptable-army-69872
11/14/2019, 8:10 PMexport function buildAndPushImage(
name: string, pathOrBuild: pulumi.Input<string | docker.DockerBuild>, args?: RepositoryArgs, opts?: pulumi.ComponentResourceOptions) {
const repo = new Repository(name, args, opts);
const image = repo.buildAndPushImage(pathOrBuild);
return new RepositoryImage(repo, image);
}
and assumed RepositoryImage was coming back.lemon-spoon-91807
11/14/2019, 8:10 PMrepository.buildAndPushImage
acceptable-army-69872
11/14/2019, 8:11 PMlemon-spoon-91807
11/14/2019, 8:11 PMacceptable-army-69872
11/14/2019, 8:12 PMlemon-spoon-91807
11/14/2019, 8:12 PMacceptable-army-69872
11/14/2019, 8:12 PM