Eu estou deployng Fargate serviços por meio do AWS CDK com facilidade.
Agora eu preciso atualizar um serviço, por exemplo, uma tarefa de imagem.
Eu estou tentando fazer isso usando @aws-cdk/aws-codepipeline e a ação EcsDeployAction
Eu estou tentando importar e atualizar uma existente (já implantado) fargate serviço, como este:
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: ...
})
]
})
Mas não parece correto, porque eu recebo um transcrito de erro:
Property 'cluster' is missing in type 'IFargateService' but required in type 'IBaseService'
Alguma idéia?