Triggering Workspace Deployment
Related Guides and Examples:
Overview: Firefly Workflows and Guardrails: High-level concepts and options.
Creating New Firefly Workflows: How to set up managed workflows.
Creating Guardrail Rules in Firefly: How to define and enforce policies and best practices.
Creating Projects: How to create projects to group IaC orchestration resources and control access.
Creating Variable Sets: Managing reusable variable collections.
Workspace deployment in Firefly Workflows allows you to trigger plan or plan+apply executions for your Infrastructure as Code (IaC) directly from the UI. This process enables you to validate changes, review execution plans, and deploy infrastructure updates with full control over the deployment process. Whether you need to perform a quick validation with a plan-only run or execute a complete deployment with automatic or manual apply, the Deploy Workspace modal provides all the necessary controls to manage your infrastructure deployments safely and efficiently.
Key Benefits of Workspace Deployment:
Flexible Execution: Choose between plan-only runs for validation or full plan+apply deployments.
Branch Control: Deploy from any branch to support feature testing and environment-specific deployments.
Automated Workflows: Configure automatic apply after plan completion or require manual approval for enhanced control.
Custom Arguments: Pass additional CLI arguments for advanced Terraform/OpenTofu/Terragrunt configurations.
Triggering a Workspace Deployment: Step-by-Step
Follow these steps to trigger a deployment for your workspace using the Deploy Workspace modal.
Procedure:
Navigate to Your Workspace:
In the Firefly UI, click on Workflows > Workspaces from the main navigation menu.
Select the workspace you want to deploy from the workspace list.
Open the Deploy Modal:
Click the Deploy button in the workspace actions menu.
The Deploy Workspace modal will appear with deployment configuration options.
Configure Deployment Settings:
Select Your Branch:
Choose which Git branch to deploy from using the Branch dropdown. This determines which version of your Infrastructure as Code will be executed.
Production deployments: Use
main
ormaster
for stable, tested codeTesting new features: Use feature branches like
feature/new-vpc
to test changes before merging
Choose Your Deployment Type:
Use the Run Apply checkbox to determine whether you want to preview changes or actually apply them.
Plan only (unchecked): Generate a preview of changes without making any modifications. Perfect for validating changes before deployment.
Plan + Apply (checked): Generate a plan and then apply the changes to your infrastructure.
Set Apply Behavior (when Run Apply is enabled):
When you've chosen to run both plan and apply, use the Apply Rules option to control when changes are applied.
Manual: Requires manual approval after reviewing the plan. Recommended for production environments.
Auto: Automatically applies changes after a successful plan. Ideal for development environments.
Add Custom Arguments (Optional):
Use the Additional Run Arguments field to pass extra parameters to Terraform/OpenTofu/Terragrunt. For example:
-parallelism=5
- Limit concurrent operations to avoid resource conflicts.-var="environment=staging"
- Override variable values for specific environments.-target=module.vpc
- Apply changes to specific resources only.
Review and Execute:
Verify all configuration settings are correct for your deployment needs.
Click Deploy to start the workspace deployment.
Click Cancel to abort the deployment process.
Deployment Execution Flow
Once you trigger a deployment, the following process occurs:
Plan Phase: Firefly executes
terraform plan
(or equivalent) using your selected branch and arguments.Plan Review: View the execution plan to understand what changes will be applied.
Apply Decision:
Auto Apply: Changes are automatically applied after successful plan.
Manual Apply: You must manually approve the apply operation.
Guardrail Checks: If any Guardrail rules are violated, the deployment will stop and you will be notified.
Plan-Only: Execution stops after plan completion for review.
Apply Phase: If approved, Firefly executes
terraform apply
to implement the changes.Completion: Review deployment results and any output values.
Best Practices for Workspace Deployment
Branch Strategy: Use feature branches for testing and
main
/master
for production deployments.Plan-Only First: Run plan-only executions before applying changes to production environments.
Manual Approval: Use manual apply rules for critical infrastructure changes.
Incremental Deployment: Deploy small, focused changes rather than large batches for easier troubleshooting.
Review Plans: Always review the execution plan before applying changes.
Environment Separation: Use different apply rules for different environments (manual for production, auto for development).
Custom Arguments: Leverage additional arguments for deployment-specific configurations.
Monitoring: Monitor deployment progress and review logs for any issues.
Common Deployment Scenarios
Development Environment Deployment
Branch: feature/new-feature
Run Apply: ✓ Checked
Apply Rules: Auto
Additional Arguments: -var="environment=dev"
Production Environment Deployment
Branch: main
Run Apply: ✓ Checked
Apply Rules: Manual
Additional Arguments: -parallelism=3
Plan-Only Validation
Branch: feature/infrastructure-update
Run Apply: ✗ Unchecked
Apply Rules: N/A (disabled)
Additional Arguments: (none)
Targeted Resource Deployment
Branch: main
Run Apply: ✓ Checked
Apply Rules: Manual
Additional Arguments: -target=module.database
By following this guide and implementing these best practices, you can safely and efficiently manage your infrastructure deployments through Firefly Workflows while maintaining full control over the deployment process.
Last updated
Was this helpful?