Your First Discovery
This guide walks you through running your first discovery job and understanding the results.
What is Discovery?β
Discovery is the process of connecting to your infrastructure sources (AWS accounts, network devices, etc.) and building a graph of all resources and their relationships.
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β AWS Account β β Infracast β β Graph β
β API ββββββΆβ Plugin ββββββΆβ Database β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β² β β
β β βΌ
ββββββββββββββββββββ βββββββββββββββ
Credentials β Topology β
β Findings β
βββββββββββββββ
Step 1: Add a Credentialβ
Before running discovery, you need credentials to access your infrastructure.
Navigate to Settingsβ
- Click Settings in the left sidebar
- Select the Credentials tab
Add AWS Credentials (Example)β
Click Add Credential and fill in:
| Field | Value |
|---|---|
| Name | aws-prod-readonly |
| Provider | AWS |
| Auth Type | IAM Role or Access Keys |
| Role ARN | arn:aws:iam::123456789012:role/InfracastReadOnly |
IAM roles with cross-account trust are more secure than access keys. They don't require rotating credentials and provide automatic temporary token refresh.
Test the Credentialβ
Click Test Connection to verify Infracast can authenticate.
Step 2: Create a Discovery Jobβ
Navigate to Jobsβ
- Click Jobs in the left sidebar
- Click New Discovery Job
Configure the Jobβ
| Field | Description |
|---|---|
| Credential | Select your credential |
| Regions | Choose regions to discover (e.g., us-east-1, us-west-2) |
| Resource Types | Leave blank for all, or specify (e.g., ec2, vpc, rds) |
| Schedule | One-time or recurring (cron expression) |
Example Configurationβ
credential: aws-prod-readonly
regions:
- us-east-1
- us-west-2
- eu-west-1
resource_types: [] # Empty = all supported types
schedule: "0 */6 * * *" # Every 6 hours
Start the Jobβ
Click Start Discovery to run immediately, or Schedule to set up recurring runs.
Step 3: Monitor Progressβ
Job Statusβ
The job will progress through these stages:
| Stage | Description | Typical Duration |
|---|---|---|
PENDING | Queued for execution | < 1 second |
RUNNING | Actively discovering | 2-15 minutes |
COMPLETED | Finished successfully | β |
FAILED | Error occurred | β |
View Logsβ
Click on the job to see detailed logs:
[2024-03-15 10:00:01] Starting AWS discovery for us-east-1
[2024-03-15 10:00:02] Discovering EC2 instances... found 47
[2024-03-15 10:00:05] Discovering VPCs... found 3
[2024-03-15 10:00:08] Discovering Security Groups... found 28
[2024-03-15 10:00:12] Discovering RDS instances... found 5
[2024-03-15 10:00:15] Building relationship edges... 156 edges
[2024-03-15 10:00:18] Discovery completed: 142 nodes, 156 edges
Step 4: Explore Resultsβ
Dashboardβ
After discovery completes, the Dashboard updates with:
- Total node count by type
- Nodes by provider (AWS, Azure, on-prem)
- Recent discovery job history
Topologyβ
Navigate to Topology to visualize your infrastructure:
- Search for a resource (e.g., "prod-vpc")
- Set depth to 2-3 to see related resources
- Click nodes to view properties
- Use Trace Path to check connectivity
Asset Explorerβ
The Assets page shows all discovered resources in a table:
- Filter by type, provider, region, or tags
- Click any row to see full node details
- Export to CSV for reporting
Understanding the Graphβ
Node Typesβ
Each discovered resource becomes a node with a type:
| Provider | Example Types |
|---|---|
| AWS | aws.ec2.instance, aws.ec2.vpc, aws.rds.instance, aws.s3.bucket |
| Azure | azure.compute.vm, azure.network.vnet, azure.storage.account |
| Network | cisco.device, paloalto.device, juniper.device |
| AD | ad.user, ad.group, ad.computer, ad.ou |
Edge Typesβ
Relationships between nodes are edges:
| Edge Type | Meaning |
|---|---|
contains | Parent contains child (VPC contains subnet) |
attached_to | Resource attached (instance β security group) |
routes_to | Network route (subnet β internet gateway) |
member_of | Membership (user β group) |
connects_to | Network connection (app β database) |
Incremental Discoveryβ
Subsequent discovery runs are incremental:
- New resources are added
- Changed resources are updated
- Deleted resources are marked
staleafter 7 days - Relationship edges are refreshed
Infracast tracks resource versions. Only changed nodes trigger audit rule re-evaluation, keeping compliance checks efficient.
Scheduling Discoveryβ
For continuous visibility, schedule recurring discovery:
Common Schedulesβ
| Schedule | Cron Expression | Use Case |
|---|---|---|
| Hourly | 0 * * * * | High-change environments |
| Every 6 hours | 0 */6 * * * | Standard production |
| Daily | 0 2 * * * | Stable environments |
| Weekly | 0 2 * * 0 | Compliance-only |
Set Up Schedulingβ
- Edit an existing job or create new
- Enable Schedule
- Enter cron expression
- Save
What's Next?β
Now that you have infrastructure data:
- Run a Compliance Audit β Check against NIST, CIS, etc.
- Add More Sources β Connect network devices, AD, other clouds
- Set Up Integrations β Send findings to Jira, Slack, ServiceNow
- Install Agents β Get visibility into workstations and servers