SGO/wiki/Usage.md
Eduardo Figueroa e0fc3bdd42
wiki
2025-11-20 14:41:17 -08:00

140 lines
4.2 KiB
Markdown

# Usage Guide
## Search
### Basic Search
1. Type in the search box (minimum 2 characters)
2. Results appear instantly as you type
3. Filter by resource type using the buttons: **All Resources** | **EC2 Instances** | **Security Groups**
### Regex Search
Enable advanced pattern matching:
1. Check the "Regex" box to use regular expressions
2. Examples:
- `^prod-.*-\d+$` - Finds names starting with "prod-" and ending with numbers
- `(dev|test|qa)` - Finds names containing dev, test, or qa
- `10\.0\.\d+\.\d+` - Finds IP addresses in the 10.0.x.x range
## View Details
### EC2 Instance View
Click on any EC2 instance from search results to view:
- **Main card** shows EC2 details:
- Instance ID
- Private IP Address
- State (running, stopped, etc.)
- Account ID and Name
- All AWS Tags
- **Nested cards** show all attached Security Groups with their details
### Security Group View
Click on any Security Group from search results to view:
- **Main card** shows SG details:
- Group ID
- Group Name
- Wave Tag
- Ingress/Egress Rule Counts
- All AWS Tags
- **Nested cards** show all EC2 instances using this Security Group
## View Security Group Rules
When viewing security groups (either attached to an EC2 or directly):
1. Click the **View Rules** button on any security group card
2. A modal opens showing all ingress and egress rules
3. Switch between **Ingress** and **Egress** tabs
4. Use the search box to filter rules by protocol, port, source, or description
5. Rules are displayed in a compact table format with:
- Protocol (TCP, UDP, ICMP, All)
- Port Range
- Source Type (CIDR, Security Group, Prefix List)
- Source (IP range or SG ID)
- Description
## Navigation
- Click **← Back to Search** to return to search results
- Perform a new search at any time
- Click outside the rules modal to close it
## Export to CSV
SGO provides comprehensive CSV export capabilities in multiple contexts.
### Search Results Export
- Click the **💾 Export** button in the view controls (top right)
- Exports all current search results with filters applied
- Includes:
- Type (EC2 or Security Group)
- Name
- ID (Instance ID or Group ID)
- Account
- State (for EC2)
- IP Address (for EC2)
- Security Groups count (for EC2)
- Wave
- Git Repository
- Git Organization
- Git File
### EC2 Instance Details Export
- Click the **💾 Export** button in any EC2 detail card
- Exports complete EC2 information including:
- Instance details (ID, name, state, IP, account info)
- All AWS tags
- Attached security groups with their details
### Security Group Details Export
- Click the **💾 Export** button in any SG detail card
- Exports complete SG information including:
- Group details (ID, name, wave, rule counts)
- All AWS tags
- Attached EC2 instances with their details
### Security Group Rules Export
- Click the **💾 Export** button in the rules modal
- Exports all ingress and egress rules with:
- Rule details (direction, protocol, ports, source)
- Group ID and name
- Account ID and name
- Git file and commit information from tags
All exports include timestamps in filenames and proper CSV escaping for safe data handling.
## Import and Refresh
### Import from AWS
1. From the Explorer page, click **Change Profiles** (or visit `/` directly)
2. Select AWS profiles to import
3. Enter MFA/TOTP codes for profiles that require authentication
4. Click **Start Import** for each profile
5. Watch real-time progress logs
6. Click **Done - Go to Explorer** when finished
### Refresh Data
- Click the **Refresh Data** button on the Explorer page
- Uses cached AWS sessions (valid for 55 minutes)
- No need to re-enter MFA codes during the session cache window
- Imports data from the same profiles used in the last import
## Tips
- **Parallel Imports**: Import multiple profiles simultaneously to save time
- **Session Cache**: Refresh multiple times within 55 minutes without re-entering MFA
- **Regex Power**: Use regex patterns for complex searches across your infrastructure
- **CSV Exports**: Export at any level (search results, individual resources, or rules)
- **Quick Navigation**: Use browser back/forward buttons or the built-in navigation links