Work/Terraform for Azure
윈도우 환경에서 Terraform 환경 설정 for Azure ( Windows, Visual Studio Code, Azure )
Flyyunha
2024. 1. 2. 13:20
:: Window PC 에 Terraform 을 설치하고 Visual Sutio Code 를 통해서 Azure 에 리소스 배포 하기 위한 환경 구성
- Windows PC 에 Terraform 환경 구성
( https://learn.microsoft.com/ko-kr/azure/developer/terraform/get-started-windows-powershell?tabs=bash#4-install-terraform-for-windows )
a. 압축을 풀어준 후 C 드라이브에 임의의 폴더(C:\terraform) 생성한 후 넣어준다.
b. 환경 변수 등록을 해준다.
:: 내 컴퓨터 > 속성 > 고급 시스템 설정 > 고급 탭 > 환경 변수
:: 시스템 변수 > Path 선택 후 > 편집 > 환경 변수 편집
:: 새로 만들기 > C 드라이브에 임의의 폴더(C:\terraform) 의 terraform.exe 경로 입력
2. Visual Studio Code 설치
a. Visual Studio Code 다운로드 & 설치
( https://code.visualstudio.com/Download )
b. Extension 도구 추가 설치
:: Extension > terraform 검색 > HashiCorp Terraform 설치
< 그 외 CLI 도구 설치 >
- Azure Powershell 설치
https://learn.microsoft.com/ko-kr/powershell/scripting/install/installing-powershell-core-on-windows - Azure CLI 설치
https://learn.microsoft.com/ko-kr/cli/azure/install-azure-cli-windows
- Azure에 Terraform 인증 :: Terraform 을 통해 배포될 Azure 구독 인증
- 계정으로 인증시 Azure CLI 인증만 지원
( https://learn.microsoft.com/ko-kr/azure/developer/terraform/get-started-windows-powershell?tabs=bash#authenticate-to-azure-via-a-microsoft-account) - Service Principal
( https://learn.microsoft.com/ko-kr/azure/developer/terraform/get-started-windows-powershell?tabs=bash#create-a-service-principal )
- 계정으로 인증시 Azure CLI 인증만 지원