我deployng Fargate服务账户CDK提供方便。
现在我需要更新服务,例如任务的图像。
I'm试图做到这一点通过使用@aws cdk/aws codepipeline和行动EcsDeployAction
我试图进和更新现有的(先前部署的)fargate服务,像这样:
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: ...
})
]
})
但它似乎不会正确因为我得到一稿错误:
Property 'cluster' is missing in type 'IFargateService' but required in type 'IBaseService'
任何想法?