Week 7 ‐ 31.03.2025 ‐ 06.04.2025 - Campus-Castolo/m300 GitHub Wiki
Week 7 - 31.03.2025 ‐ 06.04.2025
Week 7 - 31.03.2025 ‐ 06.04.2025 - Task list
Task | Description | Notes | Status | Start Date | Completion Date | Hours Needed |
---|---|---|---|---|---|---|
Switch from Learner Lab to AWS Free Tier | Reconfigure credentials and terraform for personal AWS account | Region changed from us-east-1 to eu-central-1 |
✅ | 01.04.2025 | 01.04.2025 | 1.5 Hrs |
Refactor region & subnet AZs | Update Terraform code for subnets, resources, and AZs | Also required changing subnet availability zones | ✅ | 01.04.2025 | 02.04.2025 | 2 Hrs |
Update ARNs and IAM Role References | Change hardcoded ARNs to reflect new AWS account | Administrator role updated in ECS task definition | ✅ | 02.04.2025 | 02.04.2025 | 1 Hrs |
Optimize Terraform Files for DRY principle | Improve structure, use variables/locals where possible | Reduce code repetition | 🛠️ | 03.04.2025 | --- | 2.5 Hrs (ongoing) |
Daily Log 01.04.2025
Daily Log 01.04.2025 - Activity
Task | Description | Notes | Status | Start Date | Completion Date | Hours Needed |
---|---|---|---|---|---|---|
Region Change + Free Tier Migration | Updated AWS credentials and set region to eu-central-1 |
Removed old learner lab config | ✅ | 01.04.2025 | 01.04.2025 | 1.5 Hrs |
Subnet Refactoring for eu-central-1 | Adjusted availability zones in VPC and subnet configuration | AZs: eu-central-1a , -1b |
✅ | 01.04.2025 | 02.04.2025 | 2 Hrs |
Daily Log 01.04.2025 - Summary
Today I began the transition from AWS Learner Lab to a Free Tier AWS account to gain more flexibility and control over resource usage. This required changing the region from us-east-1
to eu-central-1
, which also meant refactoring availability zones in all subnet definitions. I also removed temporary credentials and prepared for updating hardcoded ARNs.
Daily Log 02.04.2025
Daily Log 02.04.2025 - Activity
Task | Description | Notes | Status | Start Date | Completion Date | Hours Needed |
---|---|---|---|---|---|---|
ARN + IAM Role Refactoring | Updated task definitions with new account role ARNs | New account ID: 972364552982 |
✅ | 02.04.2025 | 02.04.2025 | 1 Hrs |
Daily Log 02.04.2025 - Summary
I went through all files using AWS ARNs and updated them to reflect the new account's roles. ECS task definitions in infrastructure-ecs.tf
now reference:
execution_role_arn = "arn:aws:iam::972364552982:role/Administrator"
task_role_arn = "arn:aws:iam::972364552982:role/Administrator"
This was necessary to ensure IAM permissions worked properly after the migration.
Daily Log 04.04.2025
Daily Log 04.04.2025 - Activity
Task | Description | Notes | Status | Start Date | Completion Date | Hours Needed |
---|---|---|---|---|---|---|
Terraform DRY Optimization | Simplified code using locals and variables | Still working on refactoring | 🛠️ | 03.04.2025 | --- | 2.5 Hrs |
Daily Log 04.04.2025 - Summary
Started optimizing the Terraform structure for better reuse and simplicity. Replaced hardcoded values with reusable variables and locals
blocks where possible (e.g., subnet CIDRs, AZs, naming prefixes). Still ongoing and will be finalized in the next week.
Weekly Summary - 31.03.2025 - 06.04.2025
This week was centered around migrating from the AWS Learner Lab to a permanent Free Tier AWS account. The most significant change involved switching the region from us-east-1
to eu-central-1
, requiring multiple changes in subnet configurations, availability zones, and role ARNs. I also began applying DRY principles to my Terraform setup, which will continue into the next week for completion.
Weekly Summary - 31.03.2025 - 06.04.2025 - Activity
Task | Description | Status | Completion Date | Hours Spent |
---|---|---|---|---|
AWS Free Tier Migration | Updated credentials, region, and cleaned configurations | ✅ | 01.04.2025 | 1.5 Hrs |
Region Refactoring (eu-central-1) | Refactored subnets and AZs | ✅ | 02.04.2025 | 2 Hrs |
IAM Role / ARN Updates | Updated ECS ARNs to new account ID | ✅ | 02.04.2025 | 1 Hrs |
Terraform DRY Optimizations | Started simplifying infrastructure code | 🛠️ | --- | 2.5 Hrs |
Weekly Summary - 31.03.2025 - 06.04.2025 - Weekly Results
- ✅ Migrated successfully to AWS Free Tier in
eu-central-1
. - ✅ ECS and subnet resources adjusted for new availability zones.
- ✅ Hardcoded ARNs replaced with new account's IAM roles.
- 🔁 Started applying DRY principles to Terraform (locals + variables).
Weekly Summary - 31.03.2025 - 06.04.2025 - Problems
- Some resources failed to deploy initially due to AZ mismatch (
us-east-1a
not existing ineu-central-1
). - ECS tasks failed until ARNs were correctly updated with new account ID.
- Had to reinitialize Terraform backend after environment switch.
Weekly Summary - 31.03.2025 - 06.04.2025 - Open Questions
- Should I start organizing Terraform into modules for better structure?
- Is there a secure and scalable way to manage secrets across multiple environments?
- Are there Terraform linting or formatting tools I should add to my workflow?