incalculable-thailand-44404
04/12/2022, 5:56 PMconst repository = new aws.ecr.Repository(".......");
const serviceImage = pulumi.output(aws.ecr.getImage({
imageTag: "latest",
repositoryName: ... NEED TO SPECIFY THE ACTUAL STRING REPO NAME...,
}));
repository.name
is of the form : pulumi.Output<String>
which is why I cannot use it as is.bland-continent-32037
04/12/2022, 6:06 PMbillowy-army-68599
04/12/2022, 6:08 PMgetImage
call inside the apply()
However in your case, why are you running getImage
? have you pushed an image to the repo?incalculable-thailand-44404
04/12/2022, 6:13 PMrepository.name.apply(repoName => {
const serviceImage = pulumi.output(aws.ecr.getImage({
imageTag: "...",
repositoryName: repoName,
}));
serviceImage.id.apply(id => console.log(`image ID : ${id}`))
})
billowy-army-68599
04/12/2022, 6:37 PMgetImage
is designed to retrieve images that might be created outside pulumi. you should really define your image in your code and let Pulumi handle itincalculable-thailand-44404
04/12/2022, 6:42 PMbillowy-army-68599
04/12/2022, 6:44 PMincalculable-thailand-44404
04/12/2022, 6:46 PMbillowy-army-68599
04/12/2022, 6:51 PMincalculable-thailand-44404
04/12/2022, 6:56 PMbillowy-army-68599
04/12/2022, 7:01 PMincalculable-thailand-44404
04/12/2022, 7:05 PMbland-continent-32037
04/14/2022, 7:16 PMincalculable-thailand-44404
04/25/2022, 12:50 AMbland-continent-32037
04/25/2022, 12:51 AM