기본적으로 프로젝트의 사용자는 공개 이미지 및 주 구성원이 IAM 역할을 통해 액세스할 수 있는 이미지를 사용하여 영구 디스크를 만들거나 이미지를 복사할 수 있습니다.
하지만 일부의 경우 주 구성원이 정책/보안 요구사항을 충족하는 승인 소프트웨어가 포함된 이미지에서만 부팅 디스크를 만들도록 제한할 수 있습니다.
신뢰할 수 있는 이미지 기능을 사용하면 주 구성원이 특정 프로젝트의 이미지에서만 영구 디스크를 만들도록 조직 정책을 정의할 수 있습니다.
신뢰할 수 있는 이미지 정책은 사용자가 자신의 로컬 프로젝트에 이미지 리소스를 만드는 것을 제한하지 않습니다.
이미지 액세스 제약조건 설정
프로젝트, 폴더 또는 조직에 compute.trustedImageProjects 제약조건을 설정하여 이미지 액세스 정책을 적용합니다. 이 제약조건을 설정하려면 조직 정책을 수정할 권한이 있어야 합니다. 예를 들어 roles/orgpolicy.policyAdmin에는 이러한 제약조건을 설정할 수 있는 권한이 있습니다. 프로젝트, 폴더 또는 조직 수준에서 정책을 관리하는 방법에 대한 자세한 내용은 제약조건 사용을 참조하세요.
Compute Engine에서 사용할 수 있는 모든 공개 이미지에 제약조건을 설정할 수 있습니다.
이미지 프로젝트 이름 목록은 운영체제 세부정보를 참조하세요.
또한 ml-images 프로젝트를 사용하여 Compute Engine에서 사용할 수 있는 머신러닝(ML) 이미지를 제한할 수도 있습니다. 서버리스 VPC 액세스를 사용하는 경우 serverless-vpc-access-images 프로젝트에서 Compute Engine VM 이미지 사용 권한을 프로젝트에 부여합니다.
Google Cloud 콘솔 또는 Google Cloud CLI를 사용하여 이미지 액세스에 대한 제약 조건을 설정합니다.
텍스트 편집기에서 policy.yaml 파일을 열고 compute.trustedImageProjects 제약조건을 수정합니다. 필요한 제한사항을 추가하고 더 이상 필요하지 않은 제한사항을 삭제합니다. 파일 수정이 끝나면 변경사항을 저장합니다. 예를 들어 정책 파일에서 설정할 수 있는 제약조건 항목은 다음과 같습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eTrusted image policies allow you to restrict the creation of persistent disks to only use images from specific projects, helping to enforce security and policy requirements.\u003c/p\u003e\n"],["\u003cp\u003eYou can set image access constraints by using the \u003ccode\u003ecompute.trustedImageProjects\u003c/code\u003e constraint at the project, folder, or organization level, allowing you to control which images can be used for boot disks.\u003c/p\u003e\n"],["\u003cp\u003eTrusted image policies do not affect access to custom images within your local project or image files in Cloud Storage buckets, and they do not prevent users from creating image resources in their local projects.\u003c/p\u003e\n"],["\u003cp\u003eImage access constraints can be configured to allow or deny the use of all public images or to specify a custom set of image projects that users can create boot disks from.\u003c/p\u003e\n"],["\u003cp\u003eTo implement constraints, you can use either the Google Cloud console or the gcloud CLI, with the latter requiring you to modify a policy.yaml file that outlines your specific restrictions.\u003c/p\u003e\n"]]],[],null,["# Setting up trusted image policies\n\n*** ** * ** ***\n\nBy default, users in your project can create persistent disks or copy\nimages using any of the\n[public images](/compute/docs/images#os-compute-support)\nand any images that\n[principals can access through IAM roles](/compute/docs/images/sharing-images-across-projects).\nHowever, in some situations you might want to restrict principals so that they\ncan create boot disks only from images that contain approved software that meets\nyour policy or security requirements.\n\nUse the Trusted image feature to define an organization policy that\nallows principals to create persistent disks only from images in specific\nprojects.\n\nTo restrict the locations where your images can be used, read\n[restricting use of your shared images, disks, and snapshots](/compute/docs/images/sharing-images-across-projects#restrict).\n\nBefore you begin\n----------------\n\n- Read the [Using constraints](/resource-manager/docs/organization-policy/using-constraints) page to learn about managing policies at organization level.\n- Read the [Understanding hierarchy evaluation](/resource-manager/docs/organization-policy/understanding-hierarchy) page to learn how organization policies propagate.\n- If you haven't already, set up [authentication](/compute/docs/authentication). Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:\n\n Select the tab for how you plan to use the samples on this page: \n\n ### Console\n\n\n When you use the Google Cloud console to access Google Cloud services and\n APIs, you don't need to set up authentication.\n\n ### gcloud\n\n 1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n After installation,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n\n\n If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n | **Note:** If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.\n 2. [Set a default region and zone](/compute/docs/gcloud-compute#set_default_zone_and_region_in_your_local_client).\n\n ### REST\n\n\n To use the REST API samples on this page in a local development environment, you use the\n credentials you provide to the gcloud CLI.\n 1. [Install](/sdk/docs/install) the Google Cloud CLI. After installation, [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command: \n\n ```bash\n gcloud init\n ```\n 2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\n For more information, see\n [Authenticate for using REST](/docs/authentication/rest)\n in the Google Cloud authentication documentation.\n\nLimitations\n-----------\n\n- Trusted image policies do not restrict access to the following images:\n\n - [Custom images](/compute/docs/images#custom_images) in your local project.\n\n - Image files in Cloud Storage buckets.\n\n- Trusted image policies do not prevent users from creating image resources in\n their local projects.\n\nSet image access constraints\n----------------------------\n\nEnact an image access policy by setting a `compute.trustedImageProjects`\nconstraint on your project, your folder, or your organization. You must have\npermission to modify organization policies to set these constraints. For\nexample,\n[`roles/orgpolicy.policyAdmin`](/resource-manager/docs/access-control-org)\nhas permission to set these constraints. For more information about managing\npolicies at the project, folder, or organization level, see\n[Using constraints](/resource-manager/docs/organization-policy/using-constraints).\n\nYou can set constraints on all public images available on Compute Engine.\nFor a list of image project names, see [Operating systems details](/compute/docs/images/os-details).\nYou can also restrict the Machine Learning (ML) images that are available on\nCompute Engine by using the `ml-images` project. If you are using\n[Serverless VPC Access](/vpc/docs/configure-serverless-vpc-access#errors),\ngrant your project permission to use Compute Engine VM images from the\n`serverless-vpc-access-images` project.\n\nUse the Google Cloud console or Google Cloud CLI to set constraints on image access. \n\n### Console\n\nFor example, to set a constraint at the project level, do the following:\n\n1. Go to the **Organization policies** page.\n\n [Go to Organization policies](https://console.cloud.google.com/iam-admin/orgpolicies/)\n2. From the policies list, click **Define trusted image projects** .\n The **Policy details** page displays.\n\n3. On the **Policy details** page, click **Manage Policy** . The **Edit policy**\n page displays.\n\n4. On the **Edit policy** page, select **Customize**.\n\n5. For **Policy enforcement** , select an enforcement option. For information\n about inheritance and the resource hierarchy, see\n [Understanding Hierarchy Evaluation](/resource-manager/docs/organization-policy/understanding-hierarchy).\n\n6. Click **Add rule**.\n\n7. In the **Policy values** list, you can select whether this organization\n policy should allow access to all image projects, deny access to all image\n projects, or you can specify a custom set of projects to allow or deny\n access to.\n\n To set the policy rule, complete one of the following options:\n - To allow users to create boot disks from all public images, select **Allow All**.\n - To restrict users from creating boot disk from all public images, select **Deny All**.\n - To specify a select set of public images that users can create boot\n disks from, select **Custom** .\n A **Policy type** and **Custom values** field displays.\n\n 1. In the **Policy type** list, select **Allow** or **Deny**.\n 2. In the **Custom values** field, enter the name of the image project\n using the `projects/`\u003cvar translate=\"no\"\u003eIMAGE_PROJECT\u003c/var\u003e format.\n\n Replace \u003cvar translate=\"no\"\u003eIMAGE_PROJECT\u003c/var\u003e with the image project\n you want to set the constraint on.\n\n You can add multiple image projects. For each image project that\n you want to add, click **Add** and enter the image project name.\n8. To save the rule, click **Done**.\n\n9. To save and apply the organization policy, click **Save**.\n\nFor more information about creating organization policies, see\n[Creating and managing organization policies](/resource-manager/docs/organization-policy/creating-managing-policies).\n\n### gcloud\n\nFor example, to set a constraint at the project level, do the following:\n\n1. Get the existing policy settings for your project by using the [`resource-manager org-policies describe`](/sdk/gcloud/reference/resource-manager/org-policies/describe) command.\n\n ```\n gcloud resource-manager org-policies describe \\\n compute.trustedImageProjects --project=PROJECT_ID \\\n --effective \u003e policy.yaml\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your project ID.\n2. Open the `policy.yaml` file in a text editor and modify the\n `compute.trustedImageProjects` constraint. Add the restrictions that you\n need and remove the restrictions that you no longer require. When you\n have finished editing the file, save your changes. For example,\n you might set the following constraint entry in your policy file:\n\n ```\n constraint: constraints/compute.trustedImageProjects\n listPolicy:\n allowedValues:\n - projects/debian-cloud\n - projects/cos-cloud\n deniedValues:\n - projects/IMAGE_PROJECT\n ```\n\n Replace \u003cvar translate=\"no\"\u003eIMAGE_PROJECT\u003c/var\u003e with the name of the image project that you want to restrict in your project.\n\n Optionally, you might want to deny access to all images outside of\n the custom images in your project. For that situation, use the\n following example: \n\n ```\n constraint: constraints/compute.trustedImageProjects\n listPolicy:\n allValues: DENY\n ```\n\n \u003cbr /\u003e\n\n3. Apply the `policy.yaml` file to your project. If your\n [organization or folder has existing constraints](/resource-manager/docs/organization-policy/understanding-policies),\n those constraints might conflict with project-level constraints that\n you set. To apply the constraint, use the [`resource-manager org-policies set-policy`](/sdk/gcloud/reference/resource-manager/org-policies/set-policy) command.\n\n ```\n gcloud resource-manager org-policies set-policy \\\n policy.yaml --project=PROJECT_ID\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your project ID.\n\nWhen you have finished configuring the constraints,\ntest those constraints to ensure that they create the restrictions that you\nneed.\n\nWhat's next\n-----------\n\n- Learn more about the [Organization Policy Service](/resource-manager/docs/organization-policy/overview).\n- See what [public images](/compute/docs/images) are available for you to use by default.\n- [Share your private image](/compute/docs/images/sharing-images-across-projects) with other projects.\n- Learn how to [restrict use of your shared images, disks, and snapshots](/compute/docs/images/sharing-images-across-projects#restrict).\n- Learn how to [start an instance from an image](/compute/docs/instances/creating-and-starting-an-instance#startinginstancwithimage)."]]