Changing language resets inputs and results.

Reading resource relationships

Follow Connection, Association, and Dependency endpoints in one diagram.

Read the diagram

Find the thicker dotted Connection between aws_security_group.app and aws_instance.app, derived from the vpc_security_group_ids reference. It does not guarantee network reachability.

Follow the dashed Association between the subnet and route table. Match its endpoint numbers with aws_route_table_association.app in the Relationship Resources index.

Find the thin solid Dependency arrow from aws_instance.app to aws_instance.new: the user_data of new references app.private_ip.

Relationship Lines and what omission changes (Glossary)

Input JSON

This fictional Plan JSON extends Tutorial 2 with a security group, route table, and association. Download the JSON, select it on the conversion page, and press Generate.

Sample JSON Open the conversion page

Show input JSON
{
  "format_version": "1.2",
  "terraform_version": "1.9.8",
  "resource_changes": [
    {
      "address": "aws_vpc.demo",
      "mode": "managed",
      "type": "aws_vpc",
      "name": "demo",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "change": {
        "actions": [
          "no-op"
        ],
        "before": {
          "id": "vpc-demo",
          "cidr_block": "10.0.0.0/16"
        },
        "after": {
          "id": "vpc-demo",
          "cidr_block": "10.0.0.0/16"
        }
      }
    },
    {
      "address": "aws_subnet.app",
      "mode": "managed",
      "type": "aws_subnet",
      "name": "app",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "change": {
        "actions": [
          "no-op"
        ],
        "before": {
          "id": "subnet-app",
          "vpc_id": "vpc-demo",
          "cidr_block": "10.0.1.0/24"
        },
        "after": {
          "id": "subnet-app",
          "vpc_id": "vpc-demo",
          "cidr_block": "10.0.1.0/24"
        }
      }
    },
    {
      "address": "aws_instance.new",
      "mode": "managed",
      "type": "aws_instance",
      "name": "new",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "change": {
        "actions": [
          "create"
        ],
        "before": null,
        "after": {
          "subnet_id": "subnet-app",
          "instance_type": "t3.micro"
        }
      }
    },
    {
      "address": "aws_instance.app",
      "mode": "managed",
      "type": "aws_instance",
      "name": "app",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "change": {
        "actions": [
          "update"
        ],
        "before": {
          "id": "i-app",
          "subnet_id": "subnet-app",
          "instance_type": "t3.micro",
          "vpc_security_group_ids": [
            "sg-app"
          ]
        },
        "after": {
          "id": "i-app",
          "subnet_id": "subnet-app",
          "instance_type": "t3.small",
          "vpc_security_group_ids": [
            "sg-app"
          ]
        }
      }
    },
    {
      "address": "aws_instance.old",
      "mode": "managed",
      "type": "aws_instance",
      "name": "old",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "change": {
        "actions": [
          "delete"
        ],
        "before": {
          "id": "i-old",
          "subnet_id": "subnet-app",
          "instance_type": "t3.micro"
        },
        "after": null
      }
    },
    {
      "address": "aws_security_group.app",
      "mode": "managed",
      "type": "aws_security_group",
      "name": "app",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "change": {
        "actions": [
          "no-op"
        ],
        "before": {
          "id": "sg-app",
          "vpc_id": "vpc-demo"
        },
        "after": {
          "id": "sg-app",
          "vpc_id": "vpc-demo"
        }
      }
    },
    {
      "address": "aws_route_table.app",
      "mode": "managed",
      "type": "aws_route_table",
      "name": "app",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "change": {
        "actions": [
          "no-op"
        ],
        "before": {
          "id": "rtb-app",
          "vpc_id": "vpc-demo"
        },
        "after": {
          "id": "rtb-app",
          "vpc_id": "vpc-demo"
        }
      }
    },
    {
      "address": "aws_route_table_association.app",
      "mode": "managed",
      "type": "aws_route_table_association",
      "name": "app",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "change": {
        "actions": [
          "no-op"
        ],
        "before": {
          "subnet_id": "subnet-app",
          "route_table_id": "rtb-app"
        },
        "after": {
          "subnet_id": "subnet-app",
          "route_table_id": "rtb-app"
        }
      }
    }
  ],
  "configuration": {
    "root_module": {
      "resources": [
        {
          "address": "aws_vpc.demo",
          "provider_config_key": "aws"
        },
        {
          "address": "aws_subnet.app",
          "expressions": {
            "vpc_id": {
              "references": [
                "aws_vpc.demo.id"
              ]
            }
          },
          "provider_config_key": "aws"
        },
        {
          "address": "aws_instance.app",
          "expressions": {
            "subnet_id": {
              "references": [
                "aws_subnet.app.id"
              ]
            },
            "vpc_security_group_ids": {
              "references": [
                "aws_security_group.app.id"
              ]
            }
          },
          "provider_config_key": "aws"
        },
        {
          "address": "aws_instance.new",
          "expressions": {
            "subnet_id": {
              "references": [
                "aws_subnet.app.id"
              ]
            },
            "user_data": {
              "references": [
                "aws_instance.app.private_ip"
              ]
            }
          },
          "provider_config_key": "aws"
        },
        {
          "address": "aws_security_group.app",
          "expressions": {
            "vpc_id": {
              "references": [
                "aws_vpc.demo.id"
              ]
            }
          },
          "provider_config_key": "aws"
        },
        {
          "address": "aws_route_table.app",
          "expressions": {
            "vpc_id": {
              "references": [
                "aws_vpc.demo.id"
              ]
            }
          },
          "provider_config_key": "aws"
        },
        {
          "address": "aws_route_table_association.app",
          "expressions": {
            "subnet_id": {
              "references": [
                "aws_subnet.app.id"
              ]
            },
            "route_table_id": {
              "references": [
                "aws_route_table.app.id"
              ]
            }
          },
          "provider_config_key": "aws"
        }
      ]
    },
    "provider_config": {
      "aws": {
        "name": "aws",
        "full_name": "registry.terraform.io/hashicorp/aws",
        "expressions": {
          "region": {
            "constant_value": "us-east-1"
          }
        }
      }
    }
  }
}

SVG

This page displays pregenerated files and does not run conversion.

Open SVG in a new tab

EC2 instances, security group, and route table inside a VPC with three kinds of relationship lines

Try it

Search for each address in the HTML viewer and compare it with configuration in the JSON. See the glossary for line definitions and symbols.

Open HTML in a new tab

Generation record