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

기술뉴스, 2025-09-25

기술뉴스, 2025-09-25

끝없이 수정하다 AI 성과 무너뜨린다··· ‘둠프롬프팅’의 함정최근 LLM과 AI 에이전트 결과물을 무한 반복 수정하는 ‘둠프롬프팅’ 현상이 관찰되고 있다. 이는 성과 저하와 막대한 비용을 초래할 수 있다.CIOGrant Gross초보를 위한 Claude Code 안내서Claude Code의 등장으로 코딩의 패러다임이 완전히 바뀌었습니다. AI 시대의 개발이란? 개발자의 역할은 무엇일까요?Subicura's BlogsubicuraShould we revisit Extreme

By Hyonsok
[Terraform 튜토리얼 1-6] 중복 없애다 망한 썰 – DRY 원칙, 정말 항상 맞을까?

[Terraform 튜토리얼 1-6] 중복 없애다 망한 썰 – DRY 원칙, 정말 항상 맞을까?

개발자라면 한 번쯤 들어봤을 말, "Don't Repeat Yourself", 줄여서 DRY 원칙. 이건 소프트웨어 개발에서 아주 중요한 원칙이에요. 중복을 줄이면 버그도 줄고, 유지 보수도 쉬워지고, 코드도 깔끔해지죠. 그런데… Terraform 같은 IaC 세계에서도 DRY가 무조건 좋을까요? 🤔 DRY가 뭔데? DRY 원칙의 핵심은 딱 하나: "같은 걸 반복해서 쓰지 마." * 상수 값, 로직, 설정

By Chansong
[Terraform 튜토리얼 1-5] 선언형 vs 명령형: Terraform은 왜 선언형인가?

[Terraform 튜토리얼 1-5] 선언형 vs 명령형: Terraform은 왜 선언형인가?

Terraform을 쓰다 보면 종종 듣게 되는 말이 하나 있어요: Terraform은 "선언형(Declarative)" 도구다. 그런데 이게 도대체 무슨 뜻일까요? "명령형(Imperative)"이랑은 뭐가 다르고, 왜 Terraform은 선언형일까요? 🧠 선언형과 명령형, 개념부터 정리 구분 선언형 (Declarative) 명령형 (Imperative) 핵심 개념 무엇이 되어야 하는지만 선언 어떻게 할지를 하나하나 명령 예시 “난 스테이크 먹을래” “고기

By Chansong