FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

Β© 2026 FlareStart. All rights reserved.

Back to articles
lab part 2: legacy system production-grade Terraform modules + GitLab
How-ToDevOps

lab part 2: legacy system production-grade Terraform modules + GitLab

via Dev.to DevOpsAisalkyn Aidarova1mo ago

🎯 Goal When you push to GitLab: CI runs terraform plan for envs/legacy It uses remote S3 backend It assumes AWS role (OIDC) It does NOT auto-apply Apply is manual + protected πŸ— Current Structure (Correct) infra-live/ β”œβ”€β”€ envs/ β”‚ β”œβ”€β”€ legacy/ β”‚ β”‚ β”œβ”€β”€ backend.tf β”‚ β”‚ β”œβ”€β”€ main.tf β”‚ β”‚ β”œβ”€β”€ providers.tf β”‚ β”‚ β”œβ”€β”€ variables.tf β”‚ β”‚ β”œβ”€β”€ terraform.tfvars β”‚ β”‚ └── .terraform.lock.hcl β”œβ”€β”€ scripts/ β”‚ └── assume_role.sh β”œβ”€β”€ .gitlab-ci.yml └── .gitignore Backend already configured: backend "s3" {} State is already in S3. Good. 🟒 STEP 1 β€” Make Sure CI Has AWS Access Your pipeline already uses OIDC: scripts/assume_role.sh It should: Assume IAM role Export AWS credentials Print caller identity In CI logs you should see: aws sts get-caller-identity If that works β†’ AWS access is ready. 🟒 STEP 2 β€” Add Legacy Plan Job in .gitlab-ci.yml Add this block: stages : - plan - apply legacy-plan : stage : plan image : hashicorp/terraform:1.7 before_script : - apk add --no-cache bash curl jq aws-cli - . scripts/assume_rol

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
34 views

Related Articles

Loguru vs Structlog: When to Use Which
How-To

Loguru vs Structlog: When to Use Which

Medium Programming β€’ 1w ago

The Developer’s Playbook 2026: Master the Hottest Tech Stack While Building Passive Income in…
How-To

The Developer’s Playbook 2026: Master the Hottest Tech Stack While Building Passive Income in…

Medium Programming β€’ 1w ago

Seeing the problem: An Introduction to Separation of Concerns
How-To

Seeing the problem: An Introduction to Separation of Concerns

Dev.to β€’ 1w ago

Claude Code Isn’t Slow β€” Your Workflow Is
How-To

Claude Code Isn’t Slow β€” Your Workflow Is

Medium Programming β€’ 1w ago

Building ATS2 from Source in 2026
How-To

Building ATS2 from Source in 2026

Lobsters β€’ 1w ago

Discover More Articles