Skip to content

Commit

Permalink
Revert "feat: add ecs tag permission to pipe"
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOrangePuff authored May 27, 2024
1 parent 4d4e503 commit f8894e7
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions packages/graphql-mesh-server/lib/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ import * as path from "path";
import * as YAML from "yaml";
import { NodejsFunction } from "aws-cdk-lib/aws-lambda-nodejs";
import { Runtime } from "aws-cdk-lib/aws-lambda";
import {
Effect,
PolicyStatement,
Role,
ServicePrincipal,
} from "aws-cdk-lib/aws-iam";
import { Effect, PolicyStatement } from "aws-cdk-lib/aws-iam";
import { Topic } from "aws-cdk-lib/aws-sns";
import { LambdaSubscription } from "aws-cdk-lib/aws-sns-subscriptions";
import {
Expand Down Expand Up @@ -118,22 +113,6 @@ export class CodePipelineService extends Construct {
}),
],
});

const tagECSPermission = new PolicyStatement({
sid: "AllowTaggingEcsResource",
actions: ["ecs:TagResource"],
resources: [
`arn:aws:ecs:${Stack.of(this).region}:*:task/${
props.service.cluster.clusterName
}/*`,
],
});

const tagECSRole = new Role(this, "tagEcsRole", {
assumedBy: new ServicePrincipal("ecs-tasks.amazonaws.com"),
});
tagECSRole.addToPolicy(tagECSPermission);

this.pipeline.addStage({
stageName: "Deploy",
actions: [
Expand All @@ -142,7 +121,6 @@ export class CodePipelineService extends Construct {
service: props.service,
input: buildOutput,
deploymentTimeout: Duration.minutes(10),
role: tagECSRole,
}),
],
});
Expand Down

0 comments on commit f8894e7

Please sign in to comment.