cycloidio / inframap

Read your tfstate or HCL to generate a graph specific for each provider, showing only the resources that are most important/relevant.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Groupping (VPC/Subnets/Region)

xescugc opened this issue · comments

Add the logic for VPCs, Subnets and Regions. The idea is to have a Grouping between resources that belong to the same VPC, Subnet and/or Region.

On AWS reading the TFState/HCL we are able to know if some resource belong to those:

  • VPC: vpc_id and vpc_security_group_ids.
  • Subnets: TBD
  • Region: TBD

The idea would be to add a Groups on the provider.Provider that does the same as ResourceInOut that returns which groups the resource belongs to and then from that extend to different Providers bit by bit.

commented

Regarding the grouping mechanism, there are several more:

  1. Region
  2. VPC
  3. Security group (when there are more than 1 instance for example)
  4. Subnets
  5. Availability Zone (nice addition to the region one)

I'm not sure of the order of priority though, region/VPC seem fairly straight forward and good to start with.
Perhaps security groups & subnets afterwards, while leaving the AZ for the last.