Terraform을 사용한 클러스터 배포 문제 해결 - AWS ParallelCluster

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

Terraform을 사용한 클러스터 배포 문제 해결

이 섹션은 Terraform을 사용하여 배포된 클러스터와 관련이 있습니다.

ParallelCluster API를 찾을 수 없습니다.

ParallelCluster API를 찾을 수 없어 계획이 실패할 수 있습니다. 이 경우 반환되는 오류는 다음과 같습니다.

Planning failed. Terraform encountered an error while generating this plan. ╷ │ Error: Unable to retrieve ParallelCluster API cloudformation stack. │ │ with provider["registry.terraform.io/aws-tf/aws-parallelcluster"], │ on providers.tf line 6, in provider "aws-parallelcluster": │ 6: provider "aws-parallelcluster" { │ │ operation error CloudFormation: DescribeStacks, https response error StatusCode: 400, RequestID: REQUEST_ID, api error ValidationError: Stack with id PCAPI_STACK_NAME does not exist

이 오류를 해결하려면 클러스터를 생성할 계정에 ParallelCluster API를 배포하세요. 테라폼으로 클러스터 만들기 섹션을 참조하십시오.

사용자는 ParallelCluster API를 호출할 권한이 없습니다.

Terraform 프로젝트를 배포하기로 가정한 IAM 역할/사용자에게 API와 상호 작용할 권한이 없기 때문에 계획이 실패할 수 있습니다. ParallelCluster 이 경우 반환되는 오류는 다음과 같습니다.

Planning failed. Terraform encountered an error while generating this plan. │ Error: 403 Forbidden │ │ with module.parallelcluster_clusters.module.clusters[0].pcluster_cluster.managed_configs["DemoCluster01"], │ on .terraform/modules/parallelcluster_clusters/modules/clusters/main.tf line 35, in resource "pcluster_cluster" "managed_configs": │ 35: resource "pcluster_cluster" "managed_configs" { │ │ {{"Message":"User: USER_ARN is not authorized to perform: execute-api:Invoke on resource: PC_API_REST_RESOURCE with an explicit deny"} │ }

이 오류를 해결하려면 ParallelCluster 제공자가 ParallelCluster API 역할을 사용하여 API와 상호작용하도록 구성하십시오.

provider "aws-parallelcluster" { region = var.region profile = var.profile api_stack_name = var.api_stack_name **use_user_role** **= true** }