https://pulumi.com logo
#pulumi-deployments
Title
# pulumi-deployments
i

incalculable-plastic-17510

11/24/2023, 3:11 AM
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
Copy code
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
Copy code
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:
Copy code
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
Copy code
- 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 }}
2 Views