Skip to content

Conversation

@kryczkal
Copy link
Collaborator

This pull request introduces a complete setup for hosting a frontend application on AWS, including deployment scripts, Terraform modules, and configurations. The changes encompass the deployment pipeline, Terraform resource definitions, and output configurations to enable seamless integration with AWS services such as S3 and CloudFront.

Deployment Pipeline Enhancements:

  • Frontend Deployment Script: Added scripts/actions/deploy_frontend.bash to automate the frontend deployment process. It builds the Flutter web application, uploads files to an S3 bucket, and invalidates the CloudFront cache for immediate updates.

Terraform Configuration Updates:

  • Frontend Hosting Module: Created a new Terraform module (terraform/modules/frontend_hosting) to provision AWS resources for frontend hosting, including an S3 bucket, CloudFront distribution, and related policies.
  • Main Configuration: Integrated the frontend_hosting module into the main Terraform configuration (terraform/main/main.tf) to enable frontend hosting with API routing via CloudFront.

Output Management:

  • Terraform Outputs: Added outputs in terraform/main/outputs.tf to expose essential details like the frontend URL, S3 bucket name, and CloudFront distribution ID for deployment scripts.
  • Module Outputs: Defined outputs in terraform/modules/frontend_hosting/outputs.tf to provide resource identifiers for the S3 bucket and CloudFront distribution.

Variable Definitions:

  • Frontend Hosting Variables: Added variables in terraform/modules/frontend_hosting/variables.tf for project name and API base URL to ensure flexibility and reusability of the module.

@kryczkal kryczkal merged commit 27de278 into dev Jun 16, 2025
2 checks passed
@kryczkal kryczkal deleted the deploy-frontend branch June 16, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants