Fargate hizmetlerini AWS CDK aracılığıyla kolaylıkla dağıtıyorum.
Şimdi bir hizmeti, örneğin bir görev görüntüsünü güncellemem gerekiyor.
Bunu @aws-cdk/aws-codepipeline ve EcsDeployAction eylemini kullanarak gerçekleştirmeye çalışıyorum
Bunun gibi mevcut (önceden dağıtılmış) bir fargate hizmetini içe aktarmaya ve güncellemeye çalışıyorum:
const pipeline = new codepipeline.Pipeline(this, 'MyPipeline')
// import an existing fargate service
const fargateService = ecs.FargateService.fromFargateServiceArn(
this,
"FargateService",
"MyFargateServiceARN"
);
// Deploy a new version according to what
const sourceStage = this.pipeline.addStage({
stageName: 'Deploy',
actions: [
new codepipeline_actions.EcsDeployAction({
actionName: "ECS-Service",
service: fargateService, <--- here the typescript error
input: ...
})
]
})
Ancak bu doğru görünmüyor çünkü bir typescript hatası alıyorum:
Property 'cluster' is missing in type 'IFargateService' but required in type 'IBaseService'
Herhangi bir fikir?