Hey all,
I'm struggling to come up with a good way of doing ECS blue /green deployments via pulumi
I see there a few open issues on this
https://github.com/pulumi/pulumi-aws/issues/1096
Up until now I had been using standard ECS deployment with the folowing fargate service
const service = new awsx.ecs.FargateService('templi-api', {
cluster: baseInfra.requireOutput('clusterArn'),
enableExecuteCommand: true,
networkConfiguration: {
securityGroups: [apiSecurityGroup.id],
assignPublicIp: true,
subnets: baseInfra.requireOutput('vpcPublicSubnetIds'),
},
taskDefinitionArgs: {
taskRole: {
roleArn: taskRole.arn,
},
container: {
name: 'templi-api',
image: apiImage.imageUri,
cpu: 128,
memory: 512,
essential: true,
portMappings: [
{
containerPort: 80,
targetGroup: blueTargetGroup,
},
],
},
},
});
Everytime I ran
pulumi up
pulumi would build a new docker image, and update my service task definition accordingly
This worked great
But I have been a little bit disappointed when trying to use the same worfklow but with CodeDeploy as my deployment contrller
deploymentController: {
type: 'CODE_DEPLOY',
},
With accompanying code deploy infra provisioned, when running
pulumi up
i get the following error
InvalidParameterException: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment.
Which seems to be a limitation from AWS
https://github.com/aws/aws-cdk/issues/1559 (which has since been resolved by a new L2 Construct in the CDK)
my question is, are the any plans/workarounds to support this in Pulumi? Or if anyone has any guidance on how I can proceed- do I provision just my task definition etc. via pulumi, and then use
@pulumi/command
to run a
aws deploy
?