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
  • Overview of Self-Service
  • Self-Service Flows
  • Module Call
  • Generate with Thinkerbell AI
  • Advanced Features
  • Step-by-Step Example: Module Call
  • Step-by-Step Example: Generate with Thinkerbell AI
  • Creating a Pull Request
  • Procedure: Creating a Pull Request
  • Best Practices
  • Summary

Was this helpful?

  1. Detailed Guides

Self-Service

Self-Service in Firefly empowers users to generate new Infrastructure-as-Code (IaC) configurations from scratch, without relying on preexisting resources. This feature streamlines the process of composing cloud infrastructure, whether you want to use existing Terraform modules or leverage AI to generate custom templates in your preferred IaC language. This guide covers an overview of Self-Service, its two main flows (Module Call and Generate with Thinkerbell AI), advanced features, and a step-by-step walkthrough for each.

Overview of Self-Service

Self-Service is designed to make infrastructure provisioning accessible and efficient for all users. It offers two primary ways to generate IaC code:

  1. Module Call: Select and configure an existing Terraform module (from public or private repositories) by filling out its variables. The system guides you through required and optional fields, providing detailed information about each variable.

  2. Generate with Thinkerbell AI: Use AI to generate a resource template in any supported IaC tool (Terraform, Pulumi, CloudFormation, etc.) by simply describing your desired configuration in natural language.

Both flows allow you to export the generated code or create a pull request (PR) directly to your version control system (VCS), integrating seamlessly with your existing workflows.

Self-Service Flows

Module Call

The Module Call flow enables you to create Terraform module calls using modules from public or private repositories. This is ideal for teams with established module libraries or those adopting best practices through reusable infrastructure components.

Terraform Variable Indicators

When configuring a module, each variable is accompanied by indicators that provide the following information:

  • Required: Whether the variable must be filled out.

  • Validation: If the variable has validation rules (e.g., regex, allowed values).

  • Sensitive: If the variable contains sensitive data (e.g., passwords, secrets).

  • Description: A helpful explanation of the variable's purpose.

  • Type: The expected data type (string, number, list, etc.).

These indicators help you understand what is needed and ensure correct, secure input.

Procedure: Creating a Module Call

  1. Navigate to Self-Service > Module Call.

  2. Select a Repository and Module: Choose from available public or private Terraform modules.

  3. Review Variables: The UI displays all module variables, their descriptions, types, validation, and sensitivity.

  4. Fill Out Fields:

    • Enter values for all required variables (marked as required).

    • Optionally fill in any additional variables to customize your configuration.

  5. Generate: Click the Generate button. The system will produce a Terraform module call block, ready for use.

  6. Review and Edit: Inspect the generated code. You can make further adjustments if needed.

  7. Export or Create Pull Request:

    • Export: Download the code or copy it to your clipboard.

    • Pull Request: Select your VCS integration, repository, target branch, and file path. Optionally, browse the repository to select the destination file. Click Create to open a PR with the new configuration.

Note: The generated code is designed to be deployable as-is and does not depend on any preexisting resources.

Generate with Thinkerbell AI

The Thinkerbell AI flow allows you to generate IaC code for any resource or architecture by describing your needs in plain language. This is perfect for users who want to quickly scaffold new infrastructure or experiment with different IaC tools.

Procedure: Generating with Thinkerbell AI

  1. Navigate to Self-Service > Generate with Thinkerbell AI.

  2. Select Your IaC Tool: Choose from supported tools (Terraform, Pulumi, CloudFormation, etc.).

  3. Describe Your Desired Configuration: In the prompt field, enter a detailed description of the infrastructure you want to create (e.g., "Create an AWS EC2 instance with a security group allowing SSH").

  4. Generate: Press Enter. The AI will generate the corresponding IaC code.

  5. Iterate as Needed: You can enter additional prompts to refine or modify the template. The chat session is limited to 10 minutes.

  6. Review the Code: Inspect the generated code for accuracy and completeness.

  7. Export or Create Pull Request:

    • Export: Download or copy the code.

    • Pull Request: Select your VCS integration, repository, target branch, and file path. Click Create to open a PR with the generated code.

Tip: The AI-generated code is always created from scratch and does not reference or require any existing resources in your environment.

Advanced Features

  • Variable Validation: The system enforces validation rules for module variables, ensuring that your input meets all requirements before code generation.

  • Sensitive Data Handling: Sensitive variables are clearly marked, and their values are handled securely in the UI and code output.

  • Multi-IaC Support: Generate code for a variety of IaC tools, supporting diverse team preferences and cloud environments.

  • VCS Integration: Seamlessly create pull requests to your integrated version control systems, supporting collaborative review and deployment workflows.

Step-by-Step Example: Module Call

  1. Go to Self-Service > Module Call.

  2. Select the desired Terraform module.

  3. Review the variables, noting which are required and their descriptions. Validation rules are checked in the UI.

  4. Fill in values.

  5. Click Generate to produce the module call block.

  6. Review the code and export or create a pull request as needed.

Step-by-Step Example: Generate with Thinkerbell AI

  1. Go to Self-Service > Generate with Thinkerbell AI.

  2. Select your IaC tool (e.g., Terraform).

  3. Enter a prompt: "Generate a Terraform template for an EC2 instance in us-west-2."

  4. Review the generated code (provider block, resource block, etc.).

  5. Export or create a pull request to add the code to your repository.

Creating a Pull Request

You can add your generated Terraform (or other IaC) resources to your integrated VCS. This can be done for both Module Call and Thinkerbell AI flows.

Procedure: Creating a Pull Request

  1. Click Pull request after generating your code.

  2. Select your VCS integration.

  3. Choose the target repository.

  4. (Optional) Select the target branch.

  5. (Optional) Add a file path or browse the repository to select the destination file.

  6. Click Create to open a pull request with your new configuration.

Best Practices

  • Always review generated code before deploying to production.

  • Use module calls for standardized, reusable infrastructure patterns.

  • Leverage Thinkerbell AI for rapid prototyping or when exploring new IaC tools.

  • Take advantage of VCS integration for collaborative review and change tracking.

Summary

Self-Service in Firefly provides a powerful, flexible way to generate new infrastructure code, whether you prefer guided module configuration or AI-driven template creation. By supporting both Module Call and Thinkerbell AI flows, and integrating with your VCS, Self-Service accelerates your journey to fully managed, version-controlled infrastructure—without relying on preexisting resources.

PreviousCodificationNextIaC Explorer

Last updated 10 days ago

Was this helpful?