Step-by-Step Process
1. Navigate to the Correct Directory
Move into the appropriate environment directory: For development:2. Initialize Terraform
- Initialize Terraform
- Create the SSM parameter for this unit if it does not already exist (when secrets are enabled)
3. Configure Your Application
Edit theinputs.hcl file and add your service definition under the microservice section.
Configuration Fields Explained
When you save the configuration, Fast Foundation automatically creates the following AWS resources:
Pipeline Role
IAM role for your CI/CD pipeline to deploy the application
Application Role
IAM role for your app to access AWS services
Application Secret
AWS Secrets Manager secret for environment variables
ECR Repository
Container registry for storing Docker images
4. Plan and Apply Changes
Run the following commands to review and apply changes:5. Save the Output Values
After Terraform applies successfully, capture the output values:Example Output
A typical output looks like this:Understanding the Output Values
Configure Application Secrets
At this stage you can add your environment variables:- Open AWS Secrets Manager in the AWS Console
- Find the secret created for your app
- Add key-value pairs for environment variables
Next Steps
With AWS resources created and outputs saved, move on to Create Manifest Files to configure your Kubernetes deployment.Troubleshooting
Permission Denied Error
Permission Denied Error
Ensure you’re using AWS credentials with the right permissions for the workload account.
Terraform State Lock Error
Terraform State Lock Error
State lock issues
Terragrunt and Terraform use DynamoDB locks to prevent multiple people from applying changes at the same time on the same unit. If you see a state lock error, it usually means someone else is already running a deployment.What to do:- ⏳ Wait for the other deployment to finish.
- ✅ Verify you’re not overwriting someone else’s changes.
- ✅ Refresh your parameter. Save your current changes locally (they may be overwritten).
- 🚀 Apply your changes once you’re sure everything is okay.
Configuration Not Found
Configuration Not Found
Double-check you are in the correct directory and have successfully run
terragrunt init.