Skip to content

Commit

Permalink
Upgrade ECS clusters to use V2 URLs (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsilva-okta authored Sep 9, 2023
1 parent dc63da9 commit 87e8696
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions link2aws.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,10 @@ class ARN {
"repository": null,
},
"ecs": { // Amazon Elastic Container Service
"cluster": () => `https://${this.region}.${this.console}/ecs/home?region=${this.region}#/clusters/${this.resource}`,
"cluster": () => `https://${this.region}.${this.console}/ecs/v2/clusters/${this.resource}?region=${this.region}`,
"container-instance": null,
"service": () => `https://${this.region}.${this.console}/ecs/home?region=${this.region}#/clusters/${this.pathAllButLast}/services/${this.pathLast}/details`,
"task": () => `https://${this.region}.${this.console}/ecs/home?region=${this.region}#/clusters/${this.pathAllButLast}/tasks/${this.pathLast}`,
"service": () => `https://${this.region}.${this.console}/ecs/v2/clusters/${this.pathAllButLast}/services/${this.pathLast}?region=${this.region}`,
"task": () => `https://${this.region}.${this.console}/ecs/v2/clusters/${this.pathAllButLast}/tasks/${this.pathLast}?region=${this.region}`,
"task-definition": () => `https://${this.region}.${this.console}/ecs/v2/task-definitions/${this.resource}/${this.resource_revision}?region=${this.region}`,
"task-set": null,
},
Expand Down
8 changes: 4 additions & 4 deletions testcases/aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"arn:aws:ec2:us-east-1:123456789012:security-group/sg-12345123123123123": "https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#SecurityGroup:groupId=sg-12345123123123123",
"arn:aws:ec2:us-east-1:123456789012:vpc/vpc-5432109876" : "https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#VpcDetails:VpcId=vpc-5432109876",

"arn:aws:ecs:us-east-1:123456789012:cluster/mycluster": "https://us-east-1.console.aws.amazon.com/ecs/home?region=us-east-1#/clusters/mycluster",
"arn:aws:ecs:us-east-1:123456789012:task/mycluster/581a40b2431e6c9c23834b0760666c36": "https://us-east-1.console.aws.amazon.com/ecs/home?region=us-east-1#/clusters/mycluster/tasks/581a40b2431e6c9c23834b0760666c36",
"arn:aws:ecs:us-east-1:123456789012:service/mycluster/myservice": "https://us-east-1.console.aws.amazon.com/ecs/home?region=us-east-1#/clusters/mycluster/services/myservice/details",
"arn:aws:ecs:us-east-1:123456789012:cluster/mycluster": "https://us-east-1.console.aws.amazon.com/ecs/v2/clusters/mycluster?region=us-east-1",
"arn:aws:ecs:us-east-1:123456789012:task/mycluster/581a40b2431e6c9c23834b0760666c36": "https://us-east-1.console.aws.amazon.com/ecs/v2/clusters/mycluster/tasks/581a40b2431e6c9c23834b0760666c36?region=us-east-1",
"arn:aws:ecs:us-east-1:123456789012:service/mycluster/myservice": "https://us-east-1.console.aws.amazon.com/ecs/v2/clusters/mycluster/services/myservice?region=us-east-1",
"arn:aws:ecs:us-east-1:123456789012:task-definition/mytask:1": "https://us-east-1.console.aws.amazon.com/ecs/v2/task-definitions/mytask/1?region=us-east-1",
"arn:aws:ecs:us-east-1:123456789012:task-definition/mytask": "https://us-east-1.console.aws.amazon.com/ecs/v2/task-definitions/mytask/?region=us-east-1",

Expand Down Expand Up @@ -49,4 +49,4 @@
"arn:aws:amplify:sa-east-1:384862141196:apps/test-null-path": null,

"arn:aws:codepipeline:us-east-1:115131055398:my-pipeline": "https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/my-pipeline/view?region=us-east-1"
}
}

0 comments on commit 87e8696

Please sign in to comment.