modules.tf-lambda icon indicating copy to clipboard operation
modules.tf-lambda copied to clipboard

Load Balancer target groups based on Cloudcraft "Edge" component

Open ebahsini opened this issue 5 years ago • 0 comments

Is your feature request related to a problem? Please describe.

It would be nice to define load balancer target groups based on drawing an "Edge" component between AWS Load Balancers and an EC2 instance, for example.

Describe the solution you'd like

When a User connects a Load Balancer to an EC2 instance, the exported terraform configuration would represent that connection as a "target group" or "target group attachment", depending on the Load Balancer configuration.

https://www.terraform.io/docs/providers/aws/d/lb_target_group.html https://www.terraform.io/docs/providers/aws/r/lb_target_group_attachment.html

Describe alternatives you've considered

  • Manual target groups
  • CLI post deployment
  • Not using Terraform, export to AWS CDK / SDK

Additional context

Cloudcraft JSON representation of an "elb" with an Edge component connecting to an "ec2"

{
  "nodes": [
    {
      "type": "elb",
      "id": "c2d0d77d-4627-470b-b1c3-553eac59d141",
      "mapPos": [
        5,
        11
      ],
      "region": "us-east-1",
      "color": {
        "isometric": "#ececed",
        "2d": "#693cc5"
      },
      "accentColor": {
        "isometric": "#4286c5",
        "2d": "#ffffff"
      },
      "elbType": "classic",
      "lcu": 1,
      "dataGb": 10
    },
    {
      "type": "ec2",
      "id": "e39584f4-208a-472d-a99d-7e963faa7867",
      "mapPos": [
        5,
        5
      ],
      "region": "us-east-1",
      "transparent": false,
      "platform": "linux",
      "instanceType": "m5",
      "instanceSize": "24xlarge",
      "color": {
        "isometric": "#ececed",
        "2d": "#d86613"
      },
      "accentColor": {
        "isometric": "#4286c5",
        "2d": "#d86613"
      },
      "billingOptions": {
        "type": "ri",
        "utilization": 1,
        "leaseContractLength": 36,
        "purchaseOption": "All Upfront",
        "offeringClass": "standard"
      }
    }
  ],
  "edges": [
    {
      "type": "edge",
      "from": "c2d0d77d-4627-470b-b1c3-553eac59d141",
      "to": "e39584f4-208a-472d-a99d-7e963faa7867",
      "width": 2,
      "color": {
        "isometric": "#000000",
        "2d": "#000000"
      },
      "dashed": false,
      "endCap": "arrow"
    }
  ],
  "boundingRect": {
    "x": 5,
    "y": 5,
    "width": 1,
    "height": 7
  }
}

ebahsini avatar Apr 21 '20 18:04 ebahsini