본문 바로가기

프로그래밍 언어/terraform6

[terraform] template v2.2.0 does not have a package available for your current platform, darwin_arm64 오류 처리 M1 맥북에서 테라폼 코드를 작성할 때 'template_cloudinit_confg'를 이용하면 오류가 발생합니다. - Using previously-installed terraform-provider-openstack/openstack v1.53.0 ╷ │ Error: Incompatible provider version │ │ Provider registry.terraform.io/hashicorp/template v2.2.0 does not have a package available for your current platform, darwin_arm64. │ │ Provider releases are separate from Terraform CLI releases, so not all prov.. 2024. 2. 18.
[terraform] provider를 로컬 캐쉬를 이용하여 초기화 하는 방법 테라폼을 이용해서 작업을 할 때 terrafom init 명령을 입력하면 프로바이더를 다운로드 하게 되는데 , 폐쇄된 환경에서는 사용할 수 없게 됩니다. 이런 경우 로컬 캐쉬를 이용해서 테라폼 프로바이더를 설정할 수 있습니다. # home 디렉토리에 .terraformrc 파일 생성 후 다음 내용을 입력 # .terraformrc 파일 내용 plugin_cache_dir = "/home/deploy/.terraform.d/plugins-cache" disable_checkpoint = true provider_installation { filesystem_mirror { path = "/home/deploy/.terraform.d/plugins-cache" include = ["registry.terra.. 2024. 2. 7.
[terraform] 테라폼의 특정 모듈만 삭제하는 방법 테라폼으로 생성한 인프라 중 특정 모듈만 삭제 하는 방법은 destroy 옵션에서 target을 지정하는 방법입니다. 2022. 4. 18.
[terraform] 오픈스택 VM 생성시 Invalid key_name provided 오류 오픈스택을 이용하여 VM 생성시 다음의 오류가 발생하는 경우가 있습니다. ╷ │ Error: Error creating OpenStack server: Bad request with: [POST https://compute.io/v2.1/XXXX/servers], error message: {"badRequest": {"code": 400, "message": "Invalid key_name provided."}} │ │ with openstack_compute_instance_v2.example-worker["example-worker-2"], │ on openstack_worker.tf line 1, in resource "openstack_compute_instance_v2" "example-wor.. 2022. 2. 15.
[terraform] 토큰 인증시 cannot use AllowReauth, when the token ID is defined and auth scope is not set 오류 테라폼 오픈스택 인증시 위와 같은 오류가 발생하는 경우 allow_reauth 값을 false 로 주면 됩니다. token 을 이용할 때는 해당 설정을 이용할 수 없기 때문입니다. 2022. 2. 14.
[terraform] 오픈스택 프로바이더 크레덴셜/토큰(credential/token) 예제 테라폼을 이용해서 오픈스택 리소스를 생성할 때 인증을 받는 방법은 여러가지가 있습니다. 키스톤에서 제공하는 인증을 설정 값에 추가하면 여러가지 인증을 이용할 수 있습니다. 그 중에서 아이디/암호, 크레덴셜 ID/시크릿, 토큰을 이용하는 방법은 오픈스택 rc 파일에 설정을 통해서 진행할 수 있습니다. 아이디/암호 OS_AUTH_TYPE=v3password OS_USERNAME=username OS_PASSWORD=password 크레덴셜ID/시크릿 OS_AUTH_TYPE=v3applicationcredential OS_APPLICATION_CREDENTIAL_ID=xxxxxxxxxxx OS_APPLICATION_CREDENTIAL_SECRET=xxxxxxxxxx 토큰 OS_AUTH_TYPE=v3token .. 2022. 2. 14.