Azure 구독에 대해 Terraform 명령을 사용하려면 먼저 해당 구독에 Terraform 인증 필요
Azure 공식 문서 참고 : https://learn.microsoft.com/ko-kr/azure/developer/terraform/authenticate-to-azure-with-microsoft-account
Microsoft 계정으로 Azure에 인증
Microsoft 계정으로 Azure에 Terraform을 인증하는 방법 알아보기
learn.microsoft.com
특이사항
Terraform은 Azure CLI를 통한 Azure에 대한 인증만 지원합니다. Azure PowerShell을 사용한 인증은 지원되지 않습니다.
따라서 Terraform 작업을 수행할 때 Azure PowerShell 모듈을 사용할 수 있지만 먼저 Azure CLI를 사용하여 Azure에 인증해야 합니다.
1. Azure CLI에 액세스하는 명령줄을 엽니다.
2. 로그인
3. #az account show로 현재 Azure 구독 확인
4. 구독 변경
az account set --subscription "<subscription_id_or_subscription_name>"
# 변경 후 확인
az account show
'Cloud > AZURE' 카테고리의 다른 글
Terraform on Azure 정리 (4) - Azure 배포 테스트 : Network (0) | 2025.05.07 |
---|---|
Terraform on Azure 정리 (3) - tf 파일과 기본 명령어 (0) | 2025.05.07 |
Terraform on Azure 정리 (1) - Cloud Shell에서 Terraform 구성 (0) | 2025.04.22 |
Azure Firewall을 위한 라우팅 정리 (0) | 2025.04.16 |
Azure Application Gateway 정리 (0) | 2025.04.07 |