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
  • Before you begin
  • Procedure
  • Option 1: Align the IaC to the Asset (Update Code)
  • Option 2: Reconcile the Asset to the IaC (Update Cloud)
  • Summary

Was this helpful?

  1. Detailed Guides
  2. Cloud Asset Inventory

Remediating Drifts

Drifted assets are resources whose configuration in your cloud environment differs from the configuration defined in your Infrastructure as Code (IaC) stack. Remediating drift ensures your cloud stays in its optimal, intended state.

This guide explains how to remediate drifted assets in Firefly, either by aligning your IaC code to match the current asset configuration or by reconciling the asset to match the desired configuration in your IaC.

Note: Fixing drifts promptly helps maintain security, compliance, and operational consistency.

Before you begin

  • Verify your Version Control System (VCS) is integrated with Firefly (e.g., GitHub, GitLab).

  • Ensure the Terraform IaC stack for the drifted asset is present in your VCS.

Procedure

  1. Go to Drifted Assets: In the Firefly console, navigate to Inventory > Drifted. This page lists all assets detected as drifted.

  2. View Drift Details: Select the row of the desired asset, or click the kebab menu (three dots) > Drift Details. A window appears, displaying the difference between the Running Configuration (cloud value) and the Desired Configuration (IaC state value).

Option 1: Align the IaC to the Asset (Update Code)

If you want to update your IaC code to match the current configuration of the asset in the cloud:

  1. In the Drift Details window, review the code block showing the difference between the cloud value and the IaC value.

  2. Click Fix Drift > Create Pull Request. Firefly will generate a code change in your IaC repository to align the code with the asset's current configuration.

  3. Review and merge the pull request in your VCS to update your IaC code.

  4. (Optional) To refresh the Terraform state, copy and run the provided terraform refresh command in the CLI where your Terraform workspace is configured.

# Example: Refresh Terraform state to synchronize with the cloud
terraform apply -refresh-only -target <resource-address>  # Replace <resource-address> with the actual resource

Option 2: Reconcile the Asset to the IaC (Update Cloud)

If you want to update the asset in the cloud to match the desired configuration in your IaC code:

  1. In the Drift Details window, review the code block showing the difference between the cloud value and the IaC value.

  2. Copy the provided terraform apply command.

  3. Run the command in the CLI where your Terraform workspace is configured. This will update the asset in the cloud to match your IaC definition.

# Example: Apply Terraform changes to fix drift in the cloud
terraform apply -target <resource-address>  # Replace <resource-address> with the actual resource

Tip: Always review the proposed changes before applying them to production environments.

Summary

  • Drifted assets are resources whose configuration differs between the cloud and your IaC code.

  • You can remediate drift by either aligning your IaC code to the asset's current state or by reconciling the asset to match your IaC code.

  • Use Firefly's Drift Details and Fix Drift features to generate code changes or CLI commands for remediation.

  • Always review and test changes before applying them in production.

PreviousCloud Asset InventoryNextDeleting Assets

Last updated 10 days ago

Was this helpful?