LogoLogo
  • Welcome to Firefly Documentation
  • Introduction
    • What is Firefly?
    • Who is Firefly for?
    • Why use Firefly?
    • Terminology (Glossary)
  • Key Features
    • Infrastructure-as-Code Automation
    • Cloud Asset Inventory
    • Drift Detection & Remediation
    • Policy-as-Code for Compliance & Governance
    • Cost Visibility & Optimization
    • AI Assistant
    • ChatOps Integration
  • Getting Started
    • Account Setup & Onboarding
    • Connecting Cloud Accounts
    • UI Walkthrough & Navigation
    • First Steps in Firefly
  • Detailed Guides
    • Dashboard Overview
    • Cloud Asset Inventory
      • Remediating Drifts
      • Deleting Assets
      • Creating IaC-Ignore Rules
      • Creating Exclude-Drift Rules
    • Policy & Governance
      • Creating Policy-as-Code Governance Rules
      • Remediating Policy Violations
    • Workflows & Guardrails
      • Creating Workflows
      • Creating Guardrail Rules
    • Codification
    • Self-Service
    • IaC Explorer
    • Event Center
    • Backup and Disaster Recovery
    • Notifications
    • User Management
    • SSO Configuration
  • Integrations
    • Integrations Overview
    • Integrating Data Sources
      • AWS
      • Azure
      • Google Cloud
      • Kubernetes
      • Akamai
      • Datadog
      • New Relic
      • Okta
      • GitHub
      • Cloudflare
      • NS1
      • PagerDuty
      • MongoDB Atlas
      • HashiCorp Vault
    • Integrating IaC Remote State
      • Terraform Cloud
      • Google Cloud Storage
      • env0
      • HashiCorp Consul
      • Firefly States Redactor
    • Integrating Version Control
      • GitHub
      • GitLab
      • Azure DevOps
      • CodeCommit
      • Bitbucket
    • Integrating Notifications
      • Slack
      • Microsoft Teams
      • PagerDuty
      • Opsgenie
      • Torq
      • Webex
      • Google Chat
      • Webhook
    • Integrating Project Management
      • Jira
      • ServiceNow
    • Integrating Workflows with CI/CD
    • Integrating Backstage
    • Integrating MCP
  • Use Cases & Best Practices
    • Cloud Governance & Visibility
    • Cost Optimization Strategies
    • Compliance and Security Best Practices
    • Infrastructure Automation & Self-Service
    • Best Practices and Implementation Tips
  • Analytics & Reporting
    • Analytics Dashboard Overview
    • Using Analytics for Improvement
    • Exporting and Sharing Reports
    • Analytics Security and Privacy
  • Code Snippets & Examples
    • Terraform Snippet for an AWS EC2 Instance (Codified via Firefly)
    • Example Rego Policy (OPA) for a Custom Rule
    • GitHub Actions Workflow YAML for Firefly Integration
    • JSON Output Example: Exporting Inventory
  • Troubleshooting & FAQs
    • Common Issues and Solutions
    • FAQs
  • General Information
    • Firefly API
      • Authentication
      • Inventory
      • Codification
      • Workflows
      • Self-Service
      • Policy & Governance
      • IaC Explorer
      • Event Center
      • Backup & Disaster Recovery
      • Notifications
      • Integrations
      • Identity & Access Management
    • Security & Compliance
    • Pricing Tiers & Add-ons
    • Contacting Support
Powered by GitBook
On this page
  • Explanation:
  • Usage:

Was this helpful?

  1. Code Snippets & Examples

JSON Output Example: Exporting Inventory

To give an idea of Firefly's data, here's an example of a JSON output from exporting the Inventory (simplified for illustration):

[
  {
    "id": "i-0abcd1234efgh5678",
    "name": "ExampleServer",
    "type": "AWS::EC2::Instance",
    "account": "aws-prod",
    "region": "us-east-1",
    "status": "Codified",
    "drift": false,
    "managed_by": "Terraform", 
    "iac_stack": "prod-web-stack",
    "properties": {
       "InstanceType": "t3.micro",
       "VpcId": "vpc-1111aaaa",
       "SubnetId": "subnet-1234abcd",
       "Encrypted": false
    },
    "tags": {
       "Name": "ExampleServer",
       "Environment": "Dev",
       "Owner": "team-alpha"
    }
  },
  {
    "id": "vol-0a1b2c3d4e5f6a7b8",
    "name": null,
    "type": "AWS::EC2::Volume",
    "account": "aws-prod",
    "region": "us-east-1",
    "status": "Unmanaged",
    "drift": false,
    "managed_by": null,
    "properties": {
       "Size": 100,
       "Encrypted": true,
       "AttachedInstance": null
    },
    "tags": {}
  }
]

Explanation:

This JSON array has two entries: one for an EC2 instance, one for an EBS volume.

Each entry has id, type, etc. Note how the volume has status: Unmanaged (meaning no IaC), and AttachedInstance: null (meaning it's unattached, likely orphaned).

The instance shows managed_by: Terraform and an iac_stack name, indicating Firefly knows it's in the Terraform stack "prod-web-stack" and thus Codified.

Encrypted is an example property Firefly tracks (volume is encrypted true, instance shows maybe root volume encryption false if that property is applicable).

This is the kind of data you might get if you use Firefly's API or export function. You can then feed this to other tools or scripts.

Usage:

You could use a script in Python to load this JSON and, for instance, find all unmanaged volumes (if item["type"] == "AWS::EC2::Volume" and item["status"] == "Unmanaged": ...).

Or generate a compliance report: list of all EC2 with Encrypted:false (you see the instance has Encrypted false – meaning its root volume likely not encrypted – a violation that Firefly would also flag).

This raw data is powerful for integration with CMDBs, or if you want to do custom queries not (yet) convenient in UI.

Note: The exact fields and structure can differ; refer to Firefly's API docs for precise output. But this gives a flavor of how data is represented.

PreviousGitHub Actions Workflow YAML for Firefly IntegrationNextCommon Issues and Solutions

Last updated 1 month ago

Was this helpful?