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:
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.
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
Navigate to Self-Service > Module Call.
Select a Repository and Module: Choose from available public or private Terraform modules.
Review Variables: The UI displays all module variables, their descriptions, types, validation, and sensitivity.
Fill Out Fields:
Enter values for all required variables (marked as required).
Optionally fill in any additional variables to customize your configuration.
Generate: Click the Generate button. The system will produce a Terraform module call block, ready for use.
Review and Edit: Inspect the generated code. You can make further adjustments if needed.
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
Navigate to Self-Service > Generate with Thinkerbell AI.
Select Your IaC Tool: Choose from supported tools (Terraform, Pulumi, CloudFormation, etc.).
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").
Generate: Press Enter. The AI will generate the corresponding IaC code.
Iterate as Needed: You can enter additional prompts to refine or modify the template. The chat session is limited to 10 minutes.
Review the Code: Inspect the generated code for accuracy and completeness.
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
Go to Self-Service > Module Call.
Select the desired Terraform module.
Review the variables, noting which are required and their descriptions. Validation rules are checked in the UI.
Fill in values.
Click Generate to produce the module call block.
Review the code and export or create a pull request as needed.
Step-by-Step Example: Generate with Thinkerbell AI
Go to Self-Service > Generate with Thinkerbell AI.
Select your IaC tool (e.g., Terraform).
Enter a prompt: "Generate a Terraform template for an EC2 instance in us-west-2."
Review the generated code (provider block, resource block, etc.).
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
Click Pull request after generating your code.
Select your VCS integration.
Choose the target repository.
(Optional) Select the target branch.
(Optional) Add a file path or browse the repository to select the destination file.
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.
Last updated
Was this helpful?