

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

# Terraform을 사용한 클러스터 배포 문제 해결
<a name="troubleshooting-v3-terraform"></a>

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

## ParallelCluster API를 찾을 수 없음
<a name="troubleshooting-v3-terraform-parallelcluster-nf"></a>

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를 배포합니다. [Terraform을 사용하여 클러스터 생성](tutorial-create-cluster-terraform.md)을(를) 참조하세요.

## 사용자가 ParallelCluster API를 호출할 권한이 없음
<a name="troubleshooting-v3-terraform-parallelcluster-na"></a>

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

```
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 API 역할을 사용하여 API와 상호 작용하도록 ParallelCluster 공급자를 구성합니다.

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