From 550a882a10a8bd1d314ea03dabc6668bd3ddd242 Mon Sep 17 00:00:00 2001 From: Felix Kaiser Date: Mon, 8 Apr 2024 22:03:34 -0700 Subject: [PATCH] Add support for EC2 images --- link2aws.js | 2 +- testcases/aws.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/link2aws.js b/link2aws.js index 6b1e672..ba3d4fe 100644 --- a/link2aws.js +++ b/link2aws.js @@ -433,7 +433,7 @@ class ARN { "dhcp-options": null, "elastic-gpu": null, "fpga-image": null, - "image": null, + "image": () => `https://${this.region}.${this.console}/ec2/home?region=${this.region}#ImageDetails:imageId=${this.resource}`, "instance": () => `https://${this.region}.${this.console}/ec2/v2/home`, "internet-gateway": null, "key-pair": null, diff --git a/testcases/aws.json b/testcases/aws.json index 1f95c71..cc9ca1a 100644 --- a/testcases/aws.json +++ b/testcases/aws.json @@ -6,6 +6,7 @@ "arn:aws:acm:us-east-1:123456789012:certificate/1f6ee793-4064-4a10-9567-f03875640b35": "https://console.aws.amazon.com/acm/home?region=us-east-1#/?id=1f6ee793-4064-4a10-9567-f03875640b35", + "arn:aws:ec2:us-west-1:136693071363:image/ami-0851c4af3ebd71c35": "https://us-west-1.console.aws.amazon.com/ec2/home?region=us-west-1#ImageDetails:imageId=ami-0851c4af3ebd71c35", "arn:aws:ec2:us-east-1:123456789012:instance/1234": "https://us-east-1.console.aws.amazon.com/ec2/v2/home", "arn:aws:ec2:us-east-1:123456789012:subnet/subnet-12345612312312312" : "https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#SubnetDetails:subnetId=subnet-12345612312312312", "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",