incalculable-plastic-17510
11/24/2023, 3:11 AMpulumi/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 }}
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by