diff --git a/link2aws.js b/link2aws.js index 5ba1a04..8e366ca 100644 --- a/link2aws.js +++ b/link2aws.js @@ -405,7 +405,7 @@ class ARN { "transit-gateway-multicast-domain": null, "transit-gateway-route-table": null, "volume": null, - "vpc": null, + "vpc": () => `https://${this.region}.${this.console}/vpc/home?region=${this.region}#VpcDetails:VpcId=${this.resource}`, "vpc-endpoint": null, "vpc-endpoint-service": null, "vpc-flow-log": null, diff --git a/testcases/aws.json b/testcases/aws.json index d30dd5c..6bc52d5 100644 --- a/testcases/aws.json +++ b/testcases/aws.json @@ -9,6 +9,7 @@ "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", + "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",