Resources and Relationships
How Knowledge Tree represents infrastructure as resource nodes and typed relationship edges in the knowledge graph.
Resources
Every discovered object is a resource. Resources are stored as labeled nodes in the knowledge graph with a set of properties. Each resource has a globally unique ID, a type in dotted notation, and key-value properties.
Resource Fields
| Field | Description | Example |
|---|---|---|
id | Globally unique identifier | aws:ec2:us-east-1:123:i-abc123 |
type | Dotted resource type | aws.ec2.instance |
name | Human-readable name | prod-api-server |
provider | Cloud provider | aws, azure, gcp, kubernetes |
region | Geographic region | us-east-1, europe-west1 |
account_id | Account/project ID | 123456789012 |
properties | Key-value attributes | state: running, instance_type: m5.large |
tags | User-defined labels | env:prod, team:platform |
raw_data | Full provider JSON | Preserved for detailed inspection |
Resource Types
Resource types follow a provider.service.resource naming convention. Knowledge Tree recognizes types across four providers:
AWS
aws.ec2.instance aws.rds.instance aws.s3.bucket
aws.lambda.function aws.eks.cluster aws.elb.load_balancer
aws.vpc aws.subnet aws.nat_gateway
aws.sqs.queue aws.sns.topic aws.dynamodb.table
aws.elasticache.cluster aws.iam.role aws.iam.policy
aws.cloudfront.distribution aws.apigateway.rest_apiAzure
azure.compute.virtual_machine azure.sql.database
azure.web.app_service azure.web.function_app
azure.containerservice.managed_cluster
azure.storage.account azure.network.virtual_network
azure.network.load_balancer azure.keyvault.vaultGCP
gcp.compute.instance gcp.cloudsql.instance gcp.storage.bucket
gcp.container.cluster gcp.run.service gcp.compute.network
gcp.pubsub.topic gcp.bigquery.dataset gcp.spanner.instanceKubernetes
k8s.namespace k8s.deployment k8s.service
k8s.pod k8s.ingress k8s.config_map
k8s.secret k8s.persistent_volume_claim
k8s.daemon_set k8s.stateful_set k8s.cron_jobRelationships
Relationships connect resources as typed, directed edges in the graph. They represent how resources depend on, connect to, or contain each other.
Relationship Types
| Type | Description | Example |
|---|---|---|
DEPENDS_ON | Runtime dependency | Service depends on a database |
CONNECTS_TO | Network connection | App connects to a cache endpoint |
ROUTES_TO | Traffic routing | Ingress routes to a service |
RUNS_ON | Execution hosting | Pod runs on a node |
EXPOSES | Public endpoint | Load balancer exposes a service |
OWNS | Ownership/containment | VPC owns a subnet |
CONTAINS | Physical containment | Cluster contains a node pool |
Properties
Resource properties are stored as key-value pairs prefixed withprop_ in the graph. For example, an EC2 instance would have prop_state, prop_instance_type,prop_private_ip, etc. These are fully searchable via Cypher queries.