incalculable-plastic-17510
11/28/2023, 12:58 AMpulumi-deployments
but no response and still stuck on this. Any help would be really appreciated!
Hello, has anyone else encountered this issue when trying to deploy from the github action pulumi/actions@v3
I create an ECR image like this
const imageWebDev = new awsx.ecr.Image(
`web-${env}-image`,
{
repositoryUrl: ecrRepo.repositoryUrl,
dockerfile: `Dockerfile`,
path: "../../"
},
{ protect: true }
);
And then pass it to my ec2 task definiton like this
const taskDefinition = new awsx.ecs.EC2TaskDefinition(
`web-${env}`,
{
containers: {
app: {
name: "app",
image: imageWebDev.imageUri,
cpu: 0,
portMappings: [
{
containerPort: 3000,
hostPort: 0,
protocol: "tcp",
},
],
.
.
.
This runs fine locally but when running in the Github action I get the following error:
error: 1 error occurred:
* failed creating ECS Task Definition (web-production): ClientException: Container.image should not be null or empty.
I have tried the following
• creating a whole new stack
• using promises to ensure the task does not begin it's update before the image is finished
• added in waiting to give things time to update
• assigned the uri to a new variable and passed that to the task definition
• hard coded in the latest
image uri
This is my pulumi action
- name: Pulumi Update
uses: pulumi/actions@v3
with:
command: up
stack-name: prod
comment-on-pr: true
work-dir: ${{ env.WORKDIR }}
upsert: true
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
miniature-musician-31262
11/28/2023, 1:56 AM@pulumi/awsx
version 1 -- is that right?miniature-musician-31262
11/28/2023, 1:58 AMimmage: imggWebDev.imageUri
should take care of that. 🤔incalculable-plastic-17510
11/28/2023, 2:20 AMminiature-arm-21874
02/07/2024, 1:28 AMContainer.image repository should be 255 characters or lesswhich i believe is because it's passing in the whole
OutputImpl { __pulumiOutput: true, ...
object as a string instead of waiting for it to resolve to a value. so i've tried the various things you've tried. hard coding the full imageUri works for me though so it has to be not resolving the string as expectedincalculable-plastic-17510
02/07/2024, 2:11 AMincalculable-plastic-17510
02/07/2024, 2:12 AMminiature-arm-21874
02/07/2024, 2:13 AMminiature-arm-21874
02/07/2024, 2:13 AMminiature-arm-21874
02/07/2024, 2:23 AMincalculable-plastic-17510
02/07/2024, 4:26 AMminiature-arm-21874
02/07/2024, 4:29 AMminiature-arm-21874
02/07/2024, 5:26 AMminiature-arm-21874
02/07/2024, 5:28 AMcontainerDefinitions: pulumi
.all([image])
.apply(([image]) => { ...
instead of
containerDefinitions: pulumi
.all([image.imageUri])
.apply(([image]) => { ...
which immediately resolved obviously because image existed and it didn't wait for the imageUri property to exist
🤦♂️miniature-arm-21874
02/07/2024, 5:28 AMincalculable-plastic-17510
02/07/2024, 3:21 PMminiature-musician-31262
02/07/2024, 4:07 PM