이 페이지의 일부 또는 모든 정보는 Trusted Cloud by S3NS에 적용되지 않을 수 있습니다.
Resource Manager를 사용하여 조직 정책 시행
시작하기 전에
-
Verify that billing is enabled for your Trusted Cloud project.
-
Enable the Compute Engine and Resource Manager APIs.
Enable the APIs
-
Make sure that you have the following role or roles on the organization:
Organization Policy > Organization Policy Administrator, Compute Engine > Compute Storage Admin
Check for the roles
-
In the Trusted Cloud console, go to the IAM page.
Go to IAM
-
Select the organization.
-
In the Principal column, find all rows that identify you or a group that
you're included in. To learn which groups you're included in, contact your
administrator.
-
For all rows that specify or include you, check the Role column to see whether
the list of roles includes the required roles.
Grant the roles
-
In the Trusted Cloud console, go to the IAM page.
IAM으로 이동
-
조직을 선택합니다.
-
person_add 액세스 권한 부여를 클릭합니다.
-
새 주 구성원 필드에 사용자 식별자를 입력합니다.
일반적으로 직원 ID 풀의 사용자 식별자입니다. 자세한 내용은 IAM 정책에서 직원 풀 사용자 표현을 참조하거나 관리자에게 문의하세요.
-
역할 선택 목록에서 역할을 선택합니다.
-
역할을 추가로 부여하려면 add 다른 역할 추가를 클릭하고 각 역할을 추가합니다.
-
저장을 클릭합니다.
새 프로젝트 만들기
프로젝트 리소스를 만들려면 다음 단계를 따르세요.
새 프로젝트를 만들려면 다음을 수행합니다.
-
Google Cloud 콘솔에서 리소스 관리 페이지로 이동합니다.
리소스 관리로 이동
나머지 단계는 Google Cloud 콘솔에 표시됩니다.
-
페이지 상단의 조직 선택 드롭다운 목록에서 프로젝트를 만들려는 조직 리소스를 선택합니다. 무료 체험판 사용자인 경우에는 이 목록이 나타나지 않으므로, 이 단계를 건너뜁니다.
- 프로젝트 만들기를 클릭합니다.
-
나타나는 새 프로젝트 창에 프로젝트 이름을 입력하고 해당되는 결제 계정을 선택합니다. 프로젝트 이름은 문자, 숫자, 작은 따옴표, 하이픈, 공백 또는 느낌표만 포함할 수 있으며, 4~30자(영문 기준)여야 합니다.
-
위치 상자에 상위 조직 또는 폴더 리소스를 입력합니다. 이 리소스는 새 프로젝트의 계층적 상위 항목이 됩니다. 조직 없음 옵션이 있는 경우 이 옵션을 선택하여 자체 리소스 계층 구조의 최상위로 새 프로젝트를 만들 수 있습니다.
- 새 프로젝트 세부정보 입력을 마쳤으면 만들기를 클릭합니다.
프로젝트를 만들면 소유자 역할이 할당됩니다.
이 역할에는 다음 빠른 시작에 필요한 모든 권한이 포함됩니다.
권한에 대한 자세한 내용은 리소스에 대한 액세스 권한 부여, 변경, 취소를 참조하세요.
Compute Engine 디스크 만들기
리소스 위치 제약조건의 기능을 테스트하려면 Compute Engine 리전 영구 디스크를 설정합니다. 리전 영구 디스크를 만들 때 디스크가 상주할 위치를 지정해야 합니다. Compute Engine 리전 영구 디스크 만들기에 대한 자세한 내용은 리전 영구 디스크 볼륨 만들기 및 관리를 참조하세요.
Google Cloud 콘솔에서 디스크 페이지로 이동합니다.
디스크로 이동
앞에서 만든 프로젝트를 선택합니다.
- 결제 계정을 프로젝트에 연결하라는 메시지가 표시되면 연결합니다.
결제 사용 설정에 대한 자세한 내용은 프로젝트 결제 설정 수정을 참조하세요.
디스크 만들기를 클릭합니다.
디스크 이름을 지정합니다.
리전 내에서 이 디스크 복제를 선택합니다.
리전에서 europe-north1 (Finland)
를 선택합니다.
영역에서 europe-north1-a
와 europe-north1-b
를 선택합니다.
만들기를 클릭합니다.
디스크가 생성되면 이름 옆에 녹색 체크표시가 나타납니다.
조직 정책 설정
만든 프로젝트에서 조직 정책을 설정하는 방법은 다음과 같습니다.
Google Cloud 콘솔에서 조직 정책 페이지로 이동합니다.
조직 정책으로 이동
선택을 클릭합니다.
만든 프로젝트를 선택합니다.
Google Cloud Platform - 리소스 위치 정의를 클릭한 다음 수정을 클릭합니다.
적용 대상에서 맞춤설정을 선택합니다.
정책 값에서 커스텀을 선택합니다.
정책 유형에서 허용을 선택합니다.
정책 값 상자에 in:asia-locations
를 입력합니다.
저장을 클릭합니다. 정책 업데이트를 확인하는 알림이 표시됩니다.
asia-locations
는 특정 리전의 모든 위치를 포함하도록 Google에서 선별하는 값 그룹입니다.
이 경우 아시아의 모든 리전은 이 시점 이후 만들어지는 모든 리소스의 허용 위치로 정의됩니다. 정책이 소급 적용되지 않으므로 위에서 만든 리전 영구 디스크는 이 새 정책의 영향을 받지 않습니다.
조직 정책 테스트
조직 정책이 적용되므로 조직 정책의 일부로 지정되지 않은 리전에서는 리소스를 만들 수 없습니다. 이를 테스트하려면 잘못된 위치에 리전 영구 디스크를 만들어 보세요.
Google Cloud 콘솔에서 디스크 페이지로 이동합니다.
디스크로 이동
위에서 만든 프로젝트를 선택합니다.
디스크 만들기를 클릭합니다.
디스크 이름을 지정합니다.
리전 내에서 이 디스크 복제를 선택합니다.
리전에서 europe-north1 (Finland)
를 선택합니다.
영역에서 europe-north1-a
와 europe-north1-b
를 선택합니다.
만들기를 클릭합니다.
이름 옆에 빨간색 느낌표가 나타나고 오류 알림이 표시됩니다.
Location ZONE:europe-north1-a violates constraint
constraints/gcp.resourceLocations on the resource RESOURCE_ID
여기서 RESOURCE_ID는 프로젝트와 디스크의 전체 리소스 경로입니다.
디스크는 생성되지 않습니다.
올바른 위치에 리전 영구 디스크 만들기
올바른 위치를 지정하지 않으면 조직 정책 제약조건이 리소스 생성을 차단합니다.
Google Cloud 콘솔에서 디스크 페이지로 이동합니다.
디스크로 이동
앞에서 만든 프로젝트를 선택합니다.
디스크 만들기를 클릭합니다.
디스크 이름을 지정합니다.
리전 내에서 이 디스크 복제를 선택합니다.
리전에서 asia-east2 (Hong Kong)
를 선택합니다.
영역에서 asia-east2-a
와 asia-east2-b
를 선택합니다.
만들기를 클릭합니다.
asia-east2
아래의 모든 영역이 asia-locations
값 그룹 내에 있으므로 리소스가 생성됩니다.
삭제
이 페이지에서 사용한 리소스 비용이 Google Cloud 계정에 청구되지 않도록 하려면 다음 단계를 수행합니다.
리전 영구 디스크 삭제
이 빠른 시작에서 만든 리전 영구 디스크를 삭제합니다.
Google Cloud 콘솔에서 디스크 페이지로 이동합니다.
디스크로 이동
목록이 표시되면 만든 디스크 2개를 모두 선택합니다.
디스크 만들기 버튼 오른쪽에 있는 삭제를 클릭합니다.
확인 대화상자가 나타나면 삭제를 클릭합니다.
디스크가 삭제되었음을 확인하는 알림 대화상자가 나타납니다.
프로젝트 삭제
이 빠른 시작에서 만든 프로젝트를 삭제합니다.
Google Cloud 콘솔에서 리소스 관리 페이지로 이동합니다.
리소스 관리로 이동
페이지 상단의 드롭다운에서 빠른 시작 프로젝트를 만든 조직을 선택합니다.
프로젝트 리소스 목록이 표시되면 만든 프로젝트를 선택한 다음 삭제를 클릭합니다.
프로젝트 종료 대화상자가 나타나면 프로젝트 ID를 입력한 다음 종료를 클릭합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-18(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-18(UTC)"],[],[],null,["# Quickstart: Enforce organization policy by using Resource Manager\n\nEnforce organization policy by using Resource Manager\n=====================================================\n\nThis guide describes how to set an [organization policy](/resource-manager/docs/organization-policy/overview) that\nincludes the [resource locations](/resource-manager/docs/organization-policy/defining-locations) constraint, and\nhow to test that constraint after it is applied in the\n[Google Cloud console](https://console.cloud.google.com/).\n\nBefore you begin\n----------------\n\n1.\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n2.\n\n\n Enable the Compute Engine and Resource Manager APIs.\n\n\n [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=compute.googleapis.com,cloudresourcemanager.googleapis.com&redirect=https://console.cloud.google.com)\n3.\n\n Make sure that you have the following role or roles on the organization:\n\n Organization Policy \\\u003e Organization Policy Administrator, Compute Engine \\\u003e Compute Storage Admin\n\n #### Check for the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=organizationId)\n 2. Select the organization.\n 3.\n In the **Principal** column, find all rows that identify you or a group that\n you're included in. To learn which groups you're included in, contact your\n administrator.\n\n 4. For all rows that specify or include you, check the **Role** column to see whether the list of roles includes the required roles.\n\n #### Grant the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=organizationId)\n 2. Select the organization.\n 3. Click person_add **Grant access**.\n 4.\n In the **New principals** field, enter your user identifier.\n\n This is typically the email address for a Google Account.\n\n 5. In the **Select a role** list, select a role.\n 6. To grant additional roles, click add **Add\n another role** and add each additional role.\n 7. Click **Save**.\n\nCreate new Project\n------------------\n\nTo create a Project resource, follow the steps below:\n\nTo create a new project, do the following:\n\n1. Go to the **Manage resources** page in the Google Cloud console.\n\n [Go to Manage Resources](https://console.cloud.google.com/cloud-resource-manager?walkthrough_id=resource-manager--create-project&start_index=1#step_index=1)\n\n The remaining steps appear in the Google Cloud console.\n2. On the **Select organization** drop-down list at the top of the page, select the organization resource in which you want to create a project. If you are a free trial user, skip this step, as this list does not appear.\n3. Click **Create Project**.\n4. In the **New Project** window that appears, enter a project name and select a billing account as applicable. A project name can contain only letters, numbers, single quotes, hyphens, spaces, or exclamation points, and must be between 4 and 30 characters.\n5. Enter the parent organization or folder resource in the **Location** box. That resource will be the hierarchical parent of the new project. If **No organization** is an option, you can select it to create your new project as the top level of its own resource hierarchy.\n6. When you're finished entering new project details, click **Create**.\n\nAfter you create the Project, the **Owner** role is assigned to you.\nThis role includes all of the permissions you need for the following quickstart.\nFor more information about permissions, see\n[Granting, changing, and revoking access to resources](/iam/docs/granting-changing-revoking-access).\n\nCreate a Compute Engine disk\n----------------------------\n\nTo test the functionality of the resource locations constraint, set up\nCompute Engine regional persistent disks. When you create a regional\npersistent disk, you must specify the location where it will reside. For more\ninformation about creating Compute Engine regional persistent disks, see\n[Create and manage regional Persistent Disk volumes](/compute/docs/disks/regional-persistent-disk).\n\n1. In the Google Cloud console, go to the **Disks** page.\n\n [Go to Disks](https://console.cloud.google.com/compute/disks)\n2. Select the Project you created previously.\n\n 1. If you are prompted to link a billing account to your Project, do so now. For more information about enabling billing, see [Modify a Project's Billing Settings](/billing/docs/how-to/modify-project#enable_billing_for_a_project).\n3. Click **Create Disk**.\n\n4. Specify a **Name** for your disk.\n\n5. Select **Replicate this disk within region**.\n\n6. Under **Region** , select `europe-north1 (Finland)`.\n\n7. Under **Zones** , select `europe-north1-a` and `europe-north1-b`.\n\n8. Click **Create**.\n\nWhen the disk is successfully created, a green check mark appears next to the\nname.\n\nSet the organization policy\n---------------------------\n\nTo set an organization policy on the Project you created:\n\n1. In the Google Cloud console, go to the **Organization policies** page.\n\n [Go to Organization policies](https://console.cloud.google.com/iam-admin/orgpolicies)\n2. Click **Select**.\n\n3. Select the Project you created.\n\n4. Click **Google Cloud Platform - Define Resource Locations** , and then\n click **Edit**.\n\n5. Under **Applies to** , select **Customize**.\n\n6. Under **Policy values** , select **Custom**.\n\n7. Under **Policy type** , select **Allow**.\n\n8. In the **Policy value** box, enter `in:asia-locations`.\n\n9. Click **Save**. A notification appears to confirm the policy update.\n\n`asia-locations` is a [value group](/resource-manager/docs/organization-policy/defining-locations#value_groups) that is\ncurated by Google to include every location in a particular geographic region.\nIn this case, every region in Asia is defined as an allowed location for any\nresources created after this point. Note that the regional persistent disk you\ncreated above is not affected by this new policy, because the policy is not\nretroactive.\n\nTesting the organization policy\n-------------------------------\n\nNow that the organization policy is in effect, you cannot create resources in\nregions that were not specified as part of the organization policy. To test\nthis, try to create a regional persistent disk in an invalid location:\n\n1. In the Google Cloud console, go to the **Disks** page.\n\n [Go to Disks](https://console.cloud.google.com/compute/disks)\n2. Select the Project you created above.\n\n3. Click **Create Disk**.\n\n4. Specify a **Name** for your disk.\n\n5. Select **Replicate this disk within region**.\n\n6. Under **Region** , select `europe-north1 (Finland)`.\n\n7. Under **Zones** , select `europe-north1-a` and `europe-north1-b`.\n\n8. Click **Create**.\n\nA red exclamation point appears next to the name, and an error notification\ndisplays: \n\n```\nLocation ZONE:europe-north1-a violates constraint\nconstraints/gcp.resourceLocations on the resource RESOURCE_ID\n```\n\nWhere \u003cvar translate=\"no\"\u003eRESOURCE_ID\u003c/var\u003e is the full resource path of your Project and disk.\nThe disk is not created.\n\nCreate regional persistent disk in valid location\n-------------------------------------------------\n\nThe organization policy constraint blocks the creation of resources unless you\nspecify a valid location:\n\n1. In the Google Cloud console, go to the **Disks** page.\n\n [Go to Disks](https://console.cloud.google.com/compute/disks)\n2. Select the Project you created previously.\n\n3. Click **Create Disk**.\n\n4. Specify a **Name** for your disk.\n\n5. Select **Replicate this disk within region**.\n\n6. Under **Region** , select `asia-east2 (Hong Kong)`.\n\n7. Under **Zones** , select `asia-east2-a` and `asia-east2-b`.\n\n8. Click **Create**.\n\nThe resource is created successfully because all zones under `asia-east2` are\nwithin the `asia-locations` value group.\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n### Delete regional persistent disks\n\nDelete the regional persistent disks you created for this quickstart:\n\n1. In the Google Cloud console, go to the **Disks** page.\n\n [Go to Disks](https://console.cloud.google.com/compute/disks)\n2. In the list that appears, select both of the disks that you created.\n\n3. To the right of the **Create Disk** button, click **Delete**.\n\n4. In the confirmation dialog that appears, click **Delete**.\n\nA notification dialog appears to confirm the disks were deleted.\n\n### Delete the Project\n\nDelete the Project you created for this quickstart:\n\n1. In the Google Cloud console, go to the **Manage resources** page.\n\n [Go to Manage resources](https://console.cloud.google.com/cloud-resource-manager)\n2. In the drop-down at the top of the page, select the Organization in which\n you created the quickstart Project.\n\n3. In the list of Project resources that appears, select the Project that you\n created, then click **Delete**.\n\n4. On the **Shut down project** dialog that appears, enter the Project ID,\n and then click **Shut down**.\n\nWhat's next\n-----------\n\n- Learn more about [creating and managing organization policies](/resource-manager/docs/organization-policy/creating-managing-policies).\n- Review the [services that support the resource locations constraint](/resource-manager/docs/organization-policy/defining-locations-supported-services)."]]