sparse-intern-71089
05/15/2023, 5:10 PMbillowy-army-68599
rough-jewelry-40643
05/15/2023, 5:46 PMconst service = new aws.ecs.Service("fake-backend-build", {
cluster: ecsCluster.id,
// taskDefinition: taskDefinition.arn,
enableExecuteCommand: true,
desiredCount: autoscaling_parsed.desired,
launchType: "FARGATE",
deploymentController: {
type: "CODE_DEPLOY",
},
networkConfiguration: {
subnets:[ subnetA, subnetB ],
assignPublicIp: false,
securityGroups: [ sg ],
},
// waitForSteadyState: true,
loadBalancers: [{
targetGroupArn: targetGroupA.arn,
containerName: "backend-build-container", // Replace with your container name
containerPort: 80 // Replace with the port your container is listening on
}],
tags: {
"application" : "fake-backend-build",
"service" : "backend"
},
});
// Create the CodeDeploy Deployment Group with the Load Balancer.
const deploymentGroup = new aws.codedeploy.DeploymentGroup("fake-backend-build", {
appName: codedeployApplication.name,
deploymentConfigName: "CodeDeployDefault.ECSAllAtOnce",
deploymentGroupName: "fake-backend-build",
serviceRoleArn: codedeployIamRole.arn, // replace with your actual service role ARN
////
autoRollbackConfiguration: {
enabled: true,
events: ["DEPLOYMENT_FAILURE"],
},
blueGreenDeploymentConfig: {
deploymentReadyOption: {
actionOnTimeout: "CONTINUE_DEPLOYMENT",
},
terminateBlueInstancesOnDeploymentSuccess: {
action: "TERMINATE",
terminationWaitTimeInMinutes: 5,
},
},
deploymentStyle: {
deploymentOption: "WITH_TRAFFIC_CONTROL",
deploymentType: "BLUE_GREEN",
},
ecsService: {
serviceName: service.name,
clusterName: ecsCluster.name,
},
loadBalancerInfo: {
targetGroupPairInfo: {
prodTrafficRoute: {
listenerArns: [listener.arn],
},
targetGroups: [
{
name: targetGroupA.name,
},
{
name: targetGroupB.name,
},
],
},
},
tags: {
"application" : "fake-backend-build",
"service" : "backend"
},
});
Happy to share the full file if neededbillowy-army-68599
rough-jewelry-40643
05/15/2023, 5:53 PMbillowy-army-68599
rough-jewelry-40643
05/15/2023, 5:56 PMrough-jewelry-40643
05/15/2023, 5:56 PMbreezy-lion-46435
05/15/2023, 6:02 PMrough-jewelry-40643
05/15/2023, 6:07 PMbreezy-lion-46435
05/15/2023, 6:17 PMbillowy-army-68599
rough-jewelry-40643
05/17/2023, 9:21 AMNo 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