Atlantis for Terraform Automation with Azure multi-subscription

Atlantis for Terraform Automation with Azure multi-subscription

1.Make Azure Service Principal with Multi-Subscription

az ad sp create-for-rbac -n "xxx" --role Owner --scopes /subscriptions/xxx-xxx-xxx-xxx-xxx /subscriptions/xxx-xxx-xxx-xxx-xxx

2.Dockerfile command

FROM ghcr.io/runatlantis/atlantis:latest
ENV ARM_CLIENT_ID=xxx
ENV ARM_CLIENT_SECRET=xxx
ENV ARM_TENANT_ID=xxx
ENV ARM_SUBSCRIPTION_ID=xxx

RUN apk add py3-pip
RUN apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo make
RUN pip install --upgrade pip
RUN pip install azure-cli

RUN az login --service-principal -u xxx -p xxx --tenant xxx

3.'backend.tf' with each azure subsctiption

terraform {
  backend "azurerm" {
    container_name       = "xxx"
    key                  = "xxx"
    resource_group_name  = "xxx"
    storage_account_name = "xxx"
    subscription_id      = "xxx"
  }
}

4.Reference

Terraform Pull Request Automation | Atlantis
Atlantis: Terraform Pull Request Automation
Terragrunt | Terraform wrapper
Terragrunt is a thin wrapper for Terraform that provides extra tools for keeping your Terraform configurations DRY, working with multiple Terraform modules, and managing remote state.
Create Azure service principals using the Azure CLI
Learn how to create and use service principals to control access to Azure resources using the Azure CLI.

Read more

200 OK, 텅 빈 body — Starlette Race Condition 장애 분석기

발생일: 2026-04-23 / 해결일: 2026-04-27 영향 범위: report-dev.machine365.ai 전체 API 들어가며 API가 200 OK를 반환하는데 body가 비어있다. 프론트엔드에는 아무것도 안 뜨고, Swagger UI(/docs)도 빈 화면. 그런데 로컬에서 돌리면 멀쩡하다. 배경은 이랬다. 미터링(Metering) 기능을 만들면서 API 호출 로그를 수집할 미들웨어를 작성했다. Spring Boot 백엔드에 먼저 적용하고, Python

By Jeonggil
쉬어가며2

쉬어가며2

개발 일만 하다 보면 눈앞의 코드에만 집중하게 된다. 오늘은 조금 다른 이야기를 해볼까 한다. 바로 주식에 대한 이야기다. 왜 주식을 해야 하는가? 주식을 시작하면 자연스럽게 질문이 많아진다. "왜 이 회사는 영업이익이 늘었는데 주가는 떨어졌을까?" "PER이 낮은데 왜 아무도 사지 않을까?" 재무제표를 읽고, 뉴스를 찾아보고, 시장의 흐름을 추적하다 보면 세상을 보는

By Jeonggil
쉬어가며

쉬어가며

개발 일만 하다 보면 때로는 잠시 멈춰서 주변을 둘러보는 것도 중요하다. 오늘은 오래전에 다녔던 병원에서의 일을 가볍게 풀어볼까 한다. 고객이 병원에 방문하고, 그것이 수익으로 이어지기까지. 그 안에는 생각보다 훨씬 많은 전략과 기술, 그리고 사람들의 노력이 숨어있다. 1. 들어가며 오래전 다녔던 한 병원에서의 일이다. 당시 나는 "의료 IT"라는 낯선 도메인에

By Jeonggil