mammoth-car-10458
07/04/2024, 10:53 AMconst cacheFrom = aws.ssm
.getParameter({
name: `/tempo-image/${slug}`,
})
.then(result => [result.value])
.catch(reason => {
const empty: Array<pulumi.Output<string>> = []
pulumi.log.warn(
`An error occurred whilst fetching SSM param, not setting an image to use as a cache. ${reason}`
)
return empty
})
const image = new awsx.ecr.Image(
'tempo',
{
cacheFrom,
repositoryUrl,
context: './image',
platform: 'linux/arm64',
},
{ replaceOnChanges: ['repoDigest'] }
)
new aws.ssm.Parameter('tempo-image', {
type: 'String',
value: image.imageUri,
name: `/tempo-image/${slug}`,
})