폐쇄망에서 테라폼 설치하기
window에서 작업할때!!!
plugin_cache_dir = "%YOUR_APPDATA%/terraform.d/plugin_cache"
disable_checkpoint=true
provider_installation {
filesystem_mirror {
path= "%YOUR_APPDATA%/terraform.d/plugin_cache"
include = ["registry.terraform.io/hashicorp/*"]
}
direct {
exclude = ["registry.terraform.io/hashicorp/*"]
}
}
On Windows, the file must be named terraform.rc and placed in the relevant user's %APPDATA% directory. The physical location of this directory depends on your Windows version and system configuration; use $env:APPDATA in PowerShell to find its location on your system.
On all other systems, the file must be named .terraformrc (note the leading period) and placed directly in the home directory of the relevant user.
리눅스에서 작업할때.. 알고싶지 않았는데.. 리눅스 서버위에 올리는 것으로 바꿈.
wget https://releases.hashicorp.com/terraform/1.2.0/terraform_1.2.0_linux_amd64.zip
unzip terraform_1.2.0_linux_amd64.zip
sudo cp terraform /usr/bin/
./terraform -version
export PROVIDER=aws
wget https://github.com/GoogleCloudPlatform/terraformer/releases/download/0.8.20/terraformer-aws-linux-amd64
chmod +x terraformer-aws-linux-amd64
sudo mv terraformer-aws-linux-amd64 /usr/local/bin/terraformer
.terraformrc 파일 설정
plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"
disable_checkpoint = true
provider_installation {
filesystem_mirror {
path = "/usr/share/terraform/providers/"
include = ["*/*"]
}
direct {
exclude = ["*/*"]
}
}
~/.terraform.d/plugin-cache/registry.terraform.io/hashicorp/aws/4.48.0/linux_amd64여기다가 옮겨두기
/usr/share/terraform/providers/registry.terraform.io/hashicorp/aws/4.48.0/linux_amd64여기다가 옮겨두기
칸띄우는거 매우 중요한듯