awslabs / diagram-as-code

Diagram-as-code for AWS architecture.
Apache License 2.0
405 stars 22 forks source link

Ensuring a single parent for resources with multiple parents #58

Closed a2ush closed 1 month ago

a2ush commented 1 month ago

Issue #, if available: related #9

If a resource has multiple parents (e.g. a TGWAttachment related to both a VPC and a Subnet), the resource is not rendered.

Resources:
## VPC and Subnet definitions are omitted.
  VPCAattachment:
    Type: AWS::EC2::TransitGatewayAttachment
    Properties:
      SubnetIds:
        - !Ref SubnetA
      TransitGatewayId: !Ref TGW
      VpcId: !Ref VPCA

  VPCBattachment:
    Type: AWS::EC2::TransitGatewayAttachment
    Properties:
      SubnetIds:
        - !Ref SubnetB
      TransitGatewayId: !Ref TGW
      VpcId: !Ref VPCB

Description of changes:

image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.