Run Your First Discovery Scan
Scan your cloud account, see everything running, and turn existing infrastructure into Terraform code — without recreating anything.
Scenario
You have AWS resources running in your account that were created manually or by other tools. You want to:
- Get a full inventory of what exists
- Bring specific resources under IaC control
- Generate Terraform code that represents the current state
Prerequisites
Step 1: Open Discovery and Start a New Scan
Navigate to Discovery in the left sidebar. The overview page shows your previous scans and discovered resources.

Click New Scan to open the discovery wizard, then select your cloud provider.

Step 2: Configure the Scan
For AWS
| Field | What to enter |
|---|---|
| Integration | Select the AWS integration you connected |
| Regions | Pick specific regions or select all (scanning all regions takes longer) |
| Resource Types | Leave as default ("Select Common") to scan EC2, VPC, RDS, S3, Lambda, and other common types — or choose specific types to narrow the scan |
For GCP
| Field | What to enter |
|---|---|
| Integration | Select your GCP integration |
| Project ID | The GCP project to scan |
| Asset Types | Optional — filter to specific resource types |
For Azure
| Field | What to enter |
|---|---|
| Integration | Select your Azure integration |
| Subscription ID | The subscription to scan |
| Resource Groups | Optional — limit to specific resource groups |
Click Start Scan when ready.
Step 3: Watch the Scan Progress
The scan runs asynchronously and streams results in real time.

The progress view shows:
- Current phase — connecting, scanning regions, processing results
- Resources found — live count of discovered resources
- Current region — which AWS region is currently being scanned
- Recent resources — a live feed of the most recently found items
AWS scans typically complete in 1–5 minutes. You can leave this page and come back — the scan continues in the background.
Step 4: Review and Select Resources
When the scan completes, you see a full resource browser. Resources are grouped by type — EC2, VPC, RDS, S3, Lambda, and so on.

Use the filters to narrow down what you see:
Check the boxes next to the resources you want to import. You can select individual resources, all resources of a type, or everything from a region. Click Import Selected when ready.
Step 5: Link to an IaC Project
Choose where the imported resources will live.

Step 6: Configure the State Backend
Tell ops0 where to store the Terraform state file for this project.

| Backend | Required fields |
|---|---|
| AWS S3 | Bucket name, key (path), region, optional DynamoDB table for locking |
| GCP GCS | Bucket name, prefix |
| Azure Blob | Storage account, container, blob key |
| Local | No configuration needed (not recommended for teams) |
Click Generate Code when done.
Step 7: Review the Generated Terraform Code
ops0 generates .tf files representing your selected resources in their current state.

The editor shows the generated files:
main.tf— resource definitions matching your live infrastructurevariables.tf— extracted variablesbackend.tf— state backend configurationprovider.tf— provider and credentials configuration
Review the code. You can edit it directly in the editor before completing the import. Once satisfied, click Complete Import.
Step 8: Import Complete

Your resources are now tracked in the IaC project. ops0 has:
- Generated Terraform code for all selected resources
- Written the state file to your configured backend
- Linked the project to your cloud integration
Verification
Confirm everything is working:
- Open the IaC project that was created
- Click Deploy → Run Plan
- The plan should show 0 changes — the generated code matches the live infrastructure exactly
A clean plan confirms ops0 accurately represents your current state. Any differences shown in the plan are real drift between the generated code and the actual resource configuration.
(Optional) Push to GitHub
If you have a GitHub integration connected, push the generated code to version control:
.tf files to branch pulse-discovery-{timestamp}Next Steps
Troubleshooting
ReadOnlyAccess or equivalent. Ensure you selected the regions where your resources actually exist.