커스텀 제약 조건을 사용하여 Dataproc 리소스 관리

Google Cloud 조직 정책을 사용하면 조직 리소스를 중앙에서 프로그래매틱 방식으로 제어할 수 있습니다. 조직 정책 관리자Google Cloud 리소스 계층 구조에서Google Cloud 리소스와 해당 리소스의 하위 요소에 적용되는 제약 조건이라는 제한사항 집합인 조직 정책을 정의할 수 있습니다. 조직, 폴더 또는 프로젝트 수준에서 조직 정책을 적용할 수 있습니다.

조직 정책은 다양한Google Cloud 서비스에 대한 사전 정의된 제약 조건을 제공합니다. 그러나 조직 정책에서 제한되는 특정 필드를 보다 세부적으로 맞춤설정 가능한 방식으로 제어하려면 커스텀 제약 조건을 만들고 커스텀 조직 정책에서 이러한 커스텀 제약 조건을 사용하면 됩니다.

이점

커스텀 조직 정책을 사용하여 Dataproc 클러스터에서 특정 작업을 허용하거나 거부할 수 있습니다. 예를 들어 클러스터 만들기 또는 업데이트 요청이 조직 정책에 설정된 대로 커스텀 제약 조건 검증을 충족하지 못하면 요청이 실패하고 호출자에게 오류가 반환됩니다.

정책 상속

기본적으로 조직 정책은 정책을 적용하는 리소스의 하위 요소에 상속됩니다. 예를 들어 폴더에 정책을 적용하면 Google Cloud 가 폴더의 모든 프로젝트에 정책을 적용합니다. 이 동작과 이를 변경하는 방법에 대한 자세한 내용은 계층 구조 평가 규칙을 참조하세요.

가격 책정

사전 정의된 조직 정책과 커스텀 조직 정책을 포함한 조직 정책 서비스는 무료로 제공됩니다.

시작하기 전에

  1. 프로젝트를 설정합니다.
    1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
    2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

      Roles required to select or create a project

      • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
      • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

      Go to project selector

    3. Verify that billing is enabled for your Google Cloud project.

    4. Enable the Dataproc API.

      Roles required to enable APIs

      To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

      Enable the API

    5. Install the Google Cloud CLI.

    6. 외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.

    7. gcloud CLI를 초기화하려면 다음 명령어를 실행합니다.

      gcloud init
    8. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

      Roles required to select or create a project

      • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
      • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

      Go to project selector

    9. Verify that billing is enabled for your Google Cloud project.

    10. Enable the Dataproc API.

      Roles required to enable APIs

      To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

      Enable the API

    11. Install the Google Cloud CLI.

    12. 외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.

    13. gcloud CLI를 초기화하려면 다음 명령어를 실행합니다.

      gcloud init
    14. 조직 ID를 알고 있어야 합니다.
    15. 필요한 역할

      조직 정책을 관리하는 데 필요한 권한을 얻으려면 관리자에게 다음 IAM 역할을 부여해 달라고 요청하세요.

      역할 부여 방법에 대한 자세한 내용은 프로젝트, 폴더, 조직에 대한 액세스 관리를 참조하세요.

      이러한 사전 정의된 역할에는 조직 정책 관리에 필요한 권한이 포함되어 있습니다. 필수 권한 섹션을 펼치면 필요한 권한을 정확하게 확인할 수 있습니다.

      필수 권한

      조직 정책을 관리하려면 다음 권한이 필요합니다.

      • orgpolicy.constraints.list
      • orgpolicy.policies.create
      • orgpolicy.policies.delete
      • orgpolicy.policies.list
      • orgpolicy.policies.update
      • orgpolicy.policy.get
      • orgpolicy.policy.set

      커스텀 역할이나 다른 사전 정의된 역할을 사용하여 이 권한을 부여받을 수도 있습니다.

      커스텀 제약 조건 만들기

      커스텀 제약 조건은 적용되는 리소스, 메서드, 조건, 작업으로 YAML 파일에서 정의됩니다. Dataproc는 CLUSTER 리소스의 CREATEUPDATE 메서드에 적용되는 커스텀 제약 조건을 지원합니다(리소스 및 작업에 대한 Dataproc 제약 조건 참조).

      Dataproc 커스텀 제약 조건에 사용할 YAML 파일을 만들려면 다음 안내를 따르세요.

      name: organizations/ORGANIZATION_ID/customConstraints/CONSTRAINT_NAME
      resourceTypes:
      - dataproc.googleapis.com/Cluster
      methodTypes: 
      - METHOD
      condition: "CONDITION"
      actionType: ACTION
      displayName: DISPLAY_NAME
      description: DESCRIPTION
      

      다음을 바꿉니다.

      • ORGANIZATION_ID: 조직 ID(예: 123456789)

      • CONSTRAINT_NAME: 새 커스텀 제약 조건에 사용할 이름. 커스텀 제약 조건은 custom.으로 시작해야 하며 대문자, 소문자 또는 숫자만 포함할 수 있습니다(예: custom.dataprocEnableComponentGateway). 이 필드의 최대 길이는 프리픽스를 제외하고 70자(영문 기준)입니다(예: organizations/123456789/customConstraints/custom).

      • METHOD: 클러스터 만들기 제약 조건을 만들 때 CREATE를 지정합니다. 클러스터 UPDATE 제약 조건을 만들 때는 둘 다 다음과 같이 지정합니다.
        methodTypes:
        - CREATE
        - UPDATE
        
      • CONDITION: 지원되는 서비스 리소스의 표현에 대해 작성된 CEL 조건. 이 필드의 최대 길이는 1,000자(영문 기준)입니다. 조건을 작성하는 데 사용할 수 있는 리소스에 대한 자세한 내용은 지원되는 리소스를 참조하세요. 예를 들면 "resource.config.endpointConfig.enableHttpPortAccess==true"입니다.

      • ACTION: condition이 충족되면 수행할 작업. ALLOW 또는 DENY일 수 있습니다.

      • DISPLAY_NAME: 사용자 친화적인 제약 조건 이름(예: 'Dataproc 구성요소 게이트웨이 강제 사용 설정'). 이 필드의 최대 길이는 200자(영문 기준)입니다.

      • DESCRIPTION: 정책을 위반할 때 오류 메시지로 표시할 사용자 친화적인 제약 조건 설명(예: '구성요소 게이트웨이가 사용 설정된 경우에만 Dataproc 클러스터 만들기 허용'). 이 필드의 최대 길이는 2,000자(영문 기준)입니다.

      커스텀 제약 조건을 만드는 방법에 대한 자세한 내용은 커스텀 제약 조건 정의를 참조하세요.

      커스텀 제약 조건 설정

      콘솔

      커스텀 제약 조건을 만들려면 다음을 수행합니다.

      1. Google Cloud 콘솔에서 조직 정책 페이지로 이동합니다.

        조직 정책으로 이동

      2. 프로젝트 선택 도구에서 조직 정책을 설정할 프로젝트를 선택합니다.
      3. 커스텀 제약 조건을 클릭합니다.
      4. 표시 이름 상자에 인간이 읽을 수 있는 제약 조건 이름을 입력합니다. 이 이름은 오류 메시지에 사용되며 식별과 디버깅에 사용할 수 있습니다. 이 이름은 오류 메시지에 노출될 수 있으므로 표시 이름에 개인 식별 정보나 민감한 정보를 사용하지 마세요. 이 필드는 최대 200자(영문 기준)까지 포함할 수 있습니다.
      5. 제약 조건 ID 상자에 새 커스텀 제약 조건에 사용하려는 이름을 입력합니다. 커스텀 제약 조건은 문자(대문자 및 소문자 포함) 또는 숫자만 포함할 수 있습니다(예: custom.disableGkeAutoUpgrade). 이 필드는 프리픽스(custom.)를 제외하고 최대 70자(영문 기준)까지 포함할 수 있습니다(예: organizations/123456789/customConstraints/custom). 오류 메시지에 노출될 수 있으므로 제약 조건 ID에 개인 식별 정보나 민감한 정보를 포함하지 마세요.
      6. 설명 상자에 인간이 읽을 수 있는 제약 조건 설명을 입력합니다. 이 설명은 정책이 위반되었을 때 오류 메시지로 사용됩니다. 정책 위반이 발생한 이유와 정책 위반을 해결하는 방법에 대한 세부정보를 포함합니다. 오류 메시지에 노출될 수 있으므로 설명에 개인 식별 정보나 민감한 정보를 포함하지 마세요. 이 필드는 최대 2,000자(영문 기준)까지 포함할 수 있습니다.
      7. 리소스 유형 상자에서 제한하려는 객체와 필드가 포함된 Google Cloud REST 리소스 이름을 선택합니다(예: container.googleapis.com/NodePool). 대부분의 리소스 유형은 커스텀 제약 조건을 최대 20개까지 지원합니다. 커스텀 제약 조건을 더 만들려고 하면 작업이 실패합니다.
      8. 적용 방법에서 REST CREATE 메서드에 또는 CREATEUPDATE 메서드 모두에 제약 조건을 적용할지 여부를 선택합니다. 제약 조건을 위반하는 리소스에 UPDATE 메서드를 사용하여 제약 조건을 적용하면 변경사항이 위반을 해결하지 않는 한 조직 정책에 의해 해당 리소스에 대한 변경사항이 차단됩니다.
      9. 모든 Google Cloud 서비스에서 두 메서드를 모두 지원하지는 않습니다. 각 서비스에 지원되는 메서드를 보려면 지원되는 서비스에서 서비스를 찾으세요.

      10. 조건을 정의하려면 조건 수정을 클릭합니다.
        1. 조건 추가 패널에서 지원되는 서비스 리소스를 참조하는 CEL 조건을 만듭니다(예: resource.management.autoUpgrade == false). 이 필드는 최대 1,000자(영문 기준)까지 포함할 수 있습니다. CEL 사용 방법에 대한 자세한 내용은 Common Expression Language를 참조하세요. 커스텀 제약 조건에 사용할 수 있는 서비스 리소스에 대한 자세한 내용은 커스텀 제약 조건 지원 서비스를 참조하세요.
        2. 저장을 클릭합니다.
      11. 작업에서 조건이 충족될 경우 평가된 메서드를 허용하거나 차단할지 여부를 선택합니다.
      12. 거부 작업은 조건이 true로 평가되면 리소스를 만들거나 업데이트하는 작업이 차단됨을 의미합니다.

        허용 작업은 조건이 true로 평가되는 경우에만 리소스를 만들거나 업데이트하는 작업이 허용됨을 의미합니다. 조건에 명시적으로 나열된 케이스를 제외한 다른 모든 케이스가 차단됩니다.

      13. 제약 조건 만들기를 클릭합니다.
      14. 각 필드에 값을 입력하면 이 커스텀 제약 조건에 해당하는 YAML 구성이 오른쪽에 표시됩니다.

      gcloud

      1. 커스텀 제약 조건을 만들려면 다음 형식으로 YAML 파일을 만듭니다.
      2.       name: organizations/ORGANIZATION_ID/customConstraints/CONSTRAINT_NAME
              resourceTypes:
              - RESOURCE_NAME
              methodTypes:
              - CREATE
              condition: "CONDITION"
              actionType: ACTION
              displayName: DISPLAY_NAME
              description: DESCRIPTION
              

        다음을 바꿉니다.

        • ORGANIZATION_ID: 조직 ID(예: 123456789)
        • CONSTRAINT_NAME: 새 커스텀 제약 조건에 사용할 이름. 커스텀 제약 조건은 문자(대문자 및 소문자 포함) 또는 숫자만 포함할 수 있습니다(예: custom.dataprocEnableComponentGateway). 이 필드는 최대 70자(영문 기준)까지 포함할 수 있습니다.
        • RESOURCE_NAME: 제한하려는 객체와 필드가 포함된 Google Cloud리소스의 정규화된 이름. 예를 들면 cluster입니다.
        • CONDITION: 지원되는 서비스 리소스의 표현에 대해 작성된 CEL 조건. 이 필드는 최대 1,000자(영문 기준)까지 포함할 수 있습니다. 예를 들면 "resource.config.endpointConfig.enableHttpPortAccess==true"입니다.
        • 조건을 작성하는 데 사용할 수 있는 리소스에 대한 자세한 내용은 지원되는 리소스를 참조하세요.

        • ACTION: condition이 충족되면 수행할 작업. ALLOW만 가능합니다.
        • 허용 작업은 조건이 true로 평가되면 리소스를 만들거나 업데이트하는 작업이 허용됨을 의미합니다. 즉, 조건에 명시적으로 나열된 케이스를 제외한 다른 모든 케이스는 차단됩니다.

        • DISPLAY_NAME: 사용자 친화적인 제약 조건 이름. 이 필드는 최대 200자(영문 기준)까지 포함할 수 있습니다.
        • DESCRIPTION: 정책이 위반될 때 오류 메시지로 표시할 사용자 친화적인 제약 조건 설명. 이 필드는 최대 2,000자(영문 기준)까지 포함할 수 있습니다.
      3. 새 커스텀 제약 조건에 사용할 YAML 파일을 만든 후에는 조직의 조직 정책에 이 파일을 사용할 수 있도록 설정해야 합니다. 커스텀 제약 조건을 설정하려면 gcloud org-policies set-custom-constraint 명령어를 사용합니다.
      4.         gcloud org-policies set-custom-constraint CONSTRAINT_PATH
              

        CONSTRAINT_PATH를 커스텀 제약 조건 파일의 전체 경로로 바꿉니다. 예를 들면 /home/user/customconstraint.yaml입니다.

        이 작업이 완료되면 Google Cloud 조직 정책 목록에서 조직 정책으로 커스텀 제약 조건을 사용할 수 있습니다.

      5. 커스텀 제약 조건이 있는지 확인하려면 gcloud org-policies list-custom-constraints 명령어를 사용합니다.
      6.       gcloud org-policies list-custom-constraints --organization=ORGANIZATION_ID
              

        ORGANIZATION_ID를 조직 리소스 ID로 바꿉니다.

        자세한 내용은 조직 정책 보기를 참조하세요.

      커스텀 제약 조건 적용

      제약 조건을 참조하는 조직 정책을 만든 후 해당 조직 정책을 Google Cloud 리소스에 적용하여 제약 조건을 적용할 수 있습니다.

      콘솔

      1. Google Cloud 콘솔에서 조직 정책 페이지로 이동합니다.

        조직 정책으로 이동

      2. 프로젝트 선택 도구에서 조직 정책을 설정할 프로젝트를 선택합니다.
      3. 조직 정책 페이지의 목록에서 제약 조건을 선택하여 해당 제약 조건의 정책 세부정보 페이지를 봅니다.
      4. 이 리소스의 조직 정책을 구성하려면 정책 관리를 클릭합니다.
      5. 정책 수정 페이지에서 상위 정책 재정의를 선택합니다.
      6. 규칙 추가를 클릭합니다.
      7. 적용 섹션에서 이 조직 정책을 적용할지 여부를 선택합니다.
      8. (선택사항) 태그로 조직 정책을 조건부로 만들려면 조건 추가를 클릭합니다. 조건부 규칙을 조직 정책에 추가하면 비조건부 규칙을 최소 하나 이상 추가해야 합니다. 그러지 않으면 정책을 저장할 수 없습니다. 자세한 내용은 태그를 사용하여 조직 정책 설정을 참조하세요.
      9. 변경사항 테스트를 클릭하여 조직 정책 효과를 시뮬레이션합니다. 자세한 내용은 정책 시뮬레이터로 조직 정책 변경사항 테스트를 참조하세요.
      10. 테스트 실행 모드의 조직 정책을 적용하려면 테스트 실행 정책 설정을 클릭합니다. 자세한 내용은 테스트 실행 모드의 조직 정책 만들기를 참조하세요.
      11. 테스트 실행 모드의 조직 정책이 의도한 대로 작동하는지 확인한 후 정책 설정을 클릭하여 실시간 정책을 설정합니다.

      gcloud

      1. 불리언 규칙이 있는 조직 정책을 만들려면 제약 조건을 참조하는 정책 YAML 파일을 만듭니다.
      2.         name: projects/PROJECT_ID/policies/CONSTRAINT_NAME
                spec:
                  rules:
                  - enforce: true
                
                dryRunSpec:
                  rules:
                  - enforce: true
                
              

        다음을 바꿉니다.

        • PROJECT_ID: 제약 조건을 적용할 프로젝트
        • CONSTRAINT_NAME: 커스텀 제약 조건에 정의한 이름. 예를 들면 custom.dataprocEnableComponentGateway입니다.
      3. 테스트 실행 모드의 조직 정책을 적용하려면 dryRunSpec 플래그와 함께 다음 명령어를 실행합니다.
      4.         gcloud org-policies set-policy POLICY_PATH \
                  --update-mask=dryRunSpec
              

        POLICY_PATH를 조직 정책 YAML 파일의 전체 경로로 바꿉니다. 정책이 적용되는 데 최대 15분이 걸립니다.

      5. 테스트 실행 모드의 조직 정책이 의도한 대로 작동하는지 확인한 후 org-policies set-policy 명령어와 spec 플래그를 사용하여 실시간 정책을 설정합니다.
      6.         gcloud org-policies set-policy POLICY_PATH \
                  --update-mask=spec
              

        POLICY_PATH를 조직 정책 YAML 파일의 전체 경로로 바꿉니다. 정책이 적용되는 데 최대 15분이 걸립니다.

      커스텀 제약 조건 테스트

      다음 클러스터 만들기 예시에서는 구성요소 게이트웨이(resource.config.endpointConfig.enableHttpPortAccess==true)를 사용 설정하도록 요구하기 위해 커스텀 조직 정책을 만들고 클러스터 만들기에 적용했다고 가정합니다.

      gcloud dataproc clusters create example-cluster \
          --project=PROJECT_ID \
          --zone=COMPUTE_ZONE
      

      샘플 출력(기본적으로 Dataproc 클러스터가 생성될 때 구성요소 게이트웨이가 사용 설정되지 않음):

      Operation denied by custom org policies: ["customConstraints/custom.dataprocEnableComponentGateway": "Only allow Dataproc cluster creation if the Component Gateway is enabled"]
      

      리소스 및 작업에 대한 Dataproc 제약 조건

      다음 Dataproc 커스텀 제약 조건 필드는 Dataproc 클러스터를 만들거나 업데이트할 때 사용 가능합니다. 클러스터를 업데이트할 때는 수정 가능한 클러스터 파라미터와 관련된 제약 조건만 지원됩니다(클러스터 업데이트 참조).

      • Compute Engine 네트워크 구성(networkUri, internalIpOnly, serviceAccount, 메타데이터)
        • resource.config.gceClusterConfig.networkUri
        • resource.config.gceClusterConfig.internalIpOnly
        • resource.config.gceClusterConfig.serviceAccount
        • resource.config.gceClusterConfig.metadata
      • Compute Engine 인스턴스 그룹 구성(imageUri 및 machineTypeUri)
        • resource.config.masterConfig.imageUri
        • resource.config.masterConfig.machineTypeUri
        • resource.config.workerConfig.imageUri
        • resource.config.workerConfig.machineTypeUri
        • resource.config.secondaryWorkerConfig.imageUri
        • resource.config.secondaryWorkerConfig.machineTypeUri
      • Compute Engine 인스턴스 그룹 디스크 구성(bootDiskType, bootDiskSizeGb, numLocalSsds, localSsdInterface)
        • resource.config.masterConfig.diskConfig.bootDiskType
        • resource.config.workerConfig.diskConfig.bootDiskType
        • resource.config.secondaryWorkerConfig.diskConfig.bootDiskType
        • resource.config.masterConfig.diskConfig.bootDiskSizeGb
        • resource.config.workerConfig.diskConfig.bootDiskSizeGb
        • resource.config.secondaryWorkerConfig.diskConfig.bootDiskSizeGb
        • resource.config.masterConfig.diskConfig.numLocalSsds
        • resource.config.workerConfig.diskConfig.numLocalSsds
        • resource.config.secondaryWorkerConfig.diskConfig.numLocalSsds
        • resource.config.masterConfig.diskConfig.localSsdInterface
        • resource.config.workerConfig.diskConfig.localSsdInterface
        • resource.config.secondaryWorkerConfig.diskConfig.localSsdInterface
      • 초기화 작업(executableFile)
        • resource.config.initializationActions.executableFile
      • 소프트웨어 구성(imageVersion, properties, optionalComponents)
        • resource.config.softwareConfig.imageVersion
        • resource.config.softwareConfig.properties
        • resource.config.softwareConfig.optionalComponents
      • Kerberos 구성(enableKerberos 및 crossRealmTrustKdc)
        • resource.config.securityConfig.kerberosConfig.enableKerberos
        • resource.config.securityConfig.kerberosConfig.crossRealmTrustKdc
      • 구성요소 게이트웨이(enableHttpPortAccess)
        • resource.config.endpointConfig.enableHttpPortAccess
      • Metastore 구성(dataprocMetastoreService)
        • resource.config.metastoreConfig.dataprocMetastoreService
      • Persistent Disk CMEK(gcePdKmsKeyName)
        • resource.config.encryptionConfig.gcePdKmsKeyName
      • 클러스터 라벨
        • resource.labels
      • 클러스터 크기
        • resource.config.masterConfig.numInstances
        • resource.config.workerConfig.numInstances
        • resource.config.secondaryWorkerConfig.numInstances
      • 자동 확장
        • resource.config.autoscalingConfig.policyUri
      • 보안 인스턴스 구성(enableSecureBoot, enableVtpm, enableIntegrityMonitoring)
        • resource.config.gceClusterConfig.shieldedInstanceConfig.enableSecureBoot
        • resource.config.gceClusterConfig.shieldedInstanceConfig.enableVtpm
        • resource.config.gceClusterConfig.shieldedInstanceConfig.enableIntegrityMonitoring

      일반적인 사용 사례에 대한 커스텀 제약 조건 예시

      다음 표에서는 커스텀 제약 조건의 예시를 제공합니다.

      설명 제약 조건 문법
      클러스터를 만들거나 업데이트할 때 Dataproc 작업자 인스턴스 수를 10개 이하로 제한합니다.
          name: organizations/ORGANIZATION_ID/customConstraints/custom.dataprocNoMoreThan10Workers
          resourceTypes:
          - dataproc.googleapis.com/Cluster
          methodTypes:
          - CREATE
          - UPDATE
          condition: "resource.config.workerConfig.numInstances + resource.config.secondaryWorkerConfig.numInstances > 10"
          actionType: DENY
          displayName: Total number of worker instances cannot be larger than 10
          description: Cluster cannot have more than 10 workers, including primary and
          secondary workers.
      Dataproc 클러스터 선점형 작업자에서 애플리케이션 마스터가 실행되지 않도록 합니다.
          name: organizations/ORGANIZATION_ID/customConstraints/custom.dataprocAmPrimaryOnlyEnforced
          resourceTypes:
          - dataproc.googleapis.com/Cluster
          methodTypes:
          - CREATE
          condition:  "('dataproc:am.primary_only' in resource.config.softwareConfig.properties) && (resource.config.softwareConfig.properties['dataproc:am.primary_only']==true)"
          actionType: ALLOW
          displayName: Application master cannot run on preemptible workers
          description: Property "dataproc:am.primary_only" must be "true".
      Dataproc 클러스터에서 커스텀 Hive 속성을 허용하지 않습니다.
          name: organizations/ORGANIZATION_ID/customConstraints/custom.dataprocNoCustomHiveProperties
          resourceTypes:
          - dataproc.googleapis.com/Cluster
          methodTypes:
          - CREATE
          condition: "resource.config.softwareConfig.properties.all(p, !p.startsWith('hive:'))"
          actionType: ALLOW
          displayName: Cluster cannot have custom Hive properties
          description: Only allow Dataproc cluster creation if no property
          starts with Hive prefix "hive:".
      Dataproc 마스터 인스턴스에서 n1-standard-2 머신 유형을 사용할 수 없습니다.
          name: organizations/ORGANIZATION_ID/customConstraints/custom.dataprocMasterMachineType
          resourceTypes:
          - dataproc.googleapis.com/Cluster
          methodTypes:
          - CREATE
          condition: "resource.config.masterConfig.machineTypeUri.contains('n1-standard-2')"
          actionType: DENY
          displayName: Master cannot use the n1-standard-2 machine type
          description:  Prevent Dataproc cluster creation if the master machine type is n1-standard-2.
      지정된 초기화 작업 스크립트를 강제로 사용합니다.
          name: organizations/ORGANIZATION_ID/customConstraints/custom.dataprocInitActionScript
          resourceTypes:
          - dataproc.googleapis.com/Cluster
          methodTypes:
          - CREATE
          condition: "resource.config.initializationActions.exists(action, action.executableFile=='gs://some/init-action.sh')"
          actionType: ALLOW
          displayName: Initialization action script "gs://some/init-action.sh" must be used
          description:  Only allow Dataproc cluster creation if the "gs://some/init-action.sh"
          initialization action script is used.
      지정된 영구 디스크 암호화 키를 강제로 사용합니다.
          name: organizations/ORGANIZATION_ID/custom.dataprocPdCmek
          resourceTypes:
          - dataproc.googleapis.com/Cluster
          methodTypes:
          - CREATE
          condition: "resource.config.encryptionConfig.gcePdKmsKeyName == 'projects/project-id/locations/global/keyRings/key-ring-name/cryptoKeys/key-name'"
          actionType: ALLOW
          displayName: Cluster PD must be encrypted with "key-name" from "key-ring-name" key-ring
          description: Only allow Dataproc cluster creation if the PD is encrypted with "key-name" from "key-ring-name" key-ring.
      클러스터 라벨 제한사항을 적용합니다.
          name: organizations/ORGANIZATION_ID/customConstraints/custom.dataprocEnvLabel
          resourceTypes:
          - dataproc.googleapis.com/Cluster
          methodTypes:
          - CREATE
          - UPDATE
          condition:  "('env' in resource.labels) && (resource.labels.env=='test')"
          actionType: DENY
          displayName: Cluster cannot have the "env=test" label
          description:  Deny Dataproc cluster creation or update if the cluster will be labeled "env=test".
      기본이 아닌 네트워크를 강제로 사용합니다.
          name: organizations/ORGANIZATION_ID/customConstraints/custom.dataprocNoDefaultNetwork
          resourceTypes:
          - dataproc.googleapis.com/Cluster
          methodTypes:
          - CREATE
          condition:  "resource.config.gceClusterConfig.networkUri.contains('networks/default')"
          actionType: DENY
          displayName: Cluster cannot be created in the default network
          description:  Deny Dataproc cluster creation if the cluster will be created in the default network.

      다음 단계