이 페이지에서는 Cloud SQL 인스턴스에서 조직 정책을 추가하고, 프로젝트, 폴더, 조직 수준에서 Cloud SQL에 제한사항을 적용하는 방법을 설명합니다. 개요는 Cloud SQL 조직 정책을 참조하세요.
시작하기 전에
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.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
상단 탭에서 프로젝트 드롭다운 메뉴를 클릭한 다음 조직 정책이 필요한 프로젝트, 폴더 또는 조직을 선택합니다. 조직 정책 페이지에 사용 가능한 조직 정책 제약조건의 목록이 표시됩니다.
제약조건 name 또는 display_name으로 필터링합니다.
서비스에 대해 리소스에 CMEK가 사용되도록 보장하기 위해 DENY 목록에 서비스 이름을 입력하려면 다음 안내를 따르세요.
name:"constraints/gcp.restrictNonCmekServices"display_name:"Restrict which services may create resources without CMEK"
Deny로 제한된 서비스 목록에 sqladmin.googleapis.com을 추가해야 합니다.
프로젝트 내에서 Cloud KMS 인스턴스의 키만 CMEK에 사용되도록 ALLOW 목록에 프로젝트 ID를 입력하려면 다음 안내를 따르세요.
name:"constraints/gcp.restrictCmekCryptoKeyProjects"display_name:"Restrict which projects may supply KMS CryptoKeys for CMEK"
목록에서 정책 이름을 선택합니다.
수정을 클릭합니다.
맞춤설정을 클릭합니다.
규칙 추가를 클릭합니다.
정책 값에서 커스텀을 클릭합니다.
constraints/gcp.restrictNonCmekServices의 경우:
a. 정책 유형에서 거부를 선택합니다.
b. 커스텀 값 아래에 sqladmin.googleapis.com을 입력합니다.
constraints/gcp.restrictCmekCryptoKeyProjects의 경우:
a. 정책 유형에서 허용을 선택합니다.
b. 커스텀 값 아래에 under:organizations/ORGANIZATION_ID, under:folders/FOLDER_ID, projects/PROJECT_ID 형식을 사용하여 리소스를 입력합니다.
[[["이해하기 쉬움","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-08-13(UTC)"],[],[],null,["# Add predefined organization policies\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/sql/docs/postgres/org-policy/configure-org-policy \"View this page for the PostgreSQL database engine\") \\| [SQL Server](/sql/docs/sqlserver/org-policy/configure-org-policy \"View this page for the SQL Server database engine\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page describes how to add organization policies on Cloud SQL\ninstances, to put restrictions on Cloud SQL at the project, folder, or\norganization level. For an overview, see [Cloud SQL organization policies](/sql/docs/mysql/org-policy/org-policy).\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\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\n-\n [Install](/sdk/docs/install) the [gcloud CLI](/sdk/gcloud).\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\n-\n To [initialize](/sdk/docs/initializing) the gcloud CLI, run the following command:\n\n ```bash\n gcloud init\n ```\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\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\n-\n [Install](/sdk/docs/install) the [gcloud CLI](/sdk/gcloud).\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\n-\n To [initialize](/sdk/docs/initializing) the gcloud CLI, run the following command:\n\n ```bash\n gcloud init\n ```\n\n1. Add the **Organization Policy Administrator** role ([`roles/orgpolicy.policyAdmin`](/iam/docs/understanding-roles#organization-policy-roles)) to your user or service account from the **IAM \\& Admin** page.\n\n\n [Go to the IAM accounts page](https://console.cloud.google.com/iam-admin/iam)\n2. See [Restrictions](/sql/docs/mysql/org-policy/org-policy#restrictions) before performing this procedure.\n\n\u003cbr /\u003e\n\nAdd the connection organization policy\n--------------------------------------\n\nFor an overview see [Connection organization policies](/sql/docs/mysql/org-policy/org-policy#connection-organization-policy).\n\nTo add a connection organization policy:\n\n1. Go to the **Organization policies** page.\n\n [Go to the Organization policies page](https://console.cloud.google.com/iam-admin/orgpolicies)\n2. Click projects dropdown menu in the top tab, and then select the project, folder,\n or organization that requires the organization policy. The\n **Organization policies** page displays a list of organization policy\n constraints that are available.\n\n3. Filter for the constraint `name` or `display_name`.\n\n - To disable access to or from the Internet:\n\n name: \"constraints/sql.restrictPublicIp\"\n display_name: \"Restrict Public IP access on Cloud SQL instances\"\n\n - To disable access from the internet when IAM authentication is missing\n (this does not affect access using Private IP):\n\n name: \"constraints/sql.restrictAuthorizedNetworks\"\n display_name: \"Restrict Authorized Networks on Cloud SQL instances\"\n\n4. Select the policy **Name** from the list.\n\n5. Click **Edit**.\n\n6. Click **Customize**.\n\n7. Click **Add rule**.\n\n8. Under **Enforcement** , click **On**.\n\n9. Click **Save**.\n\nAdd the CMEK organization policy\n--------------------------------\n\nFor an overview, see [Customer-managed encryption keys organization policies](/sql/docs/mysql/org-policy/org-policy#cmek-organization-policy).\n\nTo add a CMEK organization policy:\n\n1. Go to the **Organization policies** page.\n\n [Go to the Organization policies page](https://console.cloud.google.com/iam-admin/orgpolicies)\n2. Click projects dropdown menu in the top tab, and then select the project, folder,\n or organization that requires the organization policy. The\n **Organization policies** page displays a list of organization policy\n constraints that are available.\n\n3. Filter for the constraint `name` or `display_name`.\n\n - To put service names in a DENY list to ensure that CMEK is used in the\n resources for that service:\n\n name: \"constraints/gcp.restrictNonCmekServices\"\n display_name: \"Restrict which services may create resources without CMEK\"\n\n You must add `sqladmin.googleapis.com` to the list of restricted services\n with Deny.\n - To put project IDs in an ALLOW list to ensure that only keys from an\n instance of Cloud KMS within that project are used for CMEK.\n\n name: \"constraints/gcp.restrictCmekCryptoKeyProjects\"\n display_name: \"Restrict which projects may supply KMS CryptoKeys for CMEK\"\n\n4. Select the policy **Name** from the list.\n\n5. Click **Edit**.\n\n6. Click **Customize**.\n\n7. Click **Add rule**.\n\n8. Under **Policy values** , click **Custom**.\n\n9. For `constraints/gcp.restrictNonCmekServices`:\n a. Under **Policy types** , select **Deny** .\n b. Under **Custom values** , enter `sqladmin.googleapis.com`.\n\n For `constraints/gcp.restrictCmekCryptoKeyProjects`:\n a. Under **Policy types** , select **Allow** .\n b. Under **Custom values** , enter the resource using the following format:\n `under:organizations/ORGANIZATION_ID`,\n `under:folders/FOLDER_ID`, or `projects/PROJECT_ID`.\n10. Click **Done**.\n\n11. Click **Save**.\n\nWhat's next\n-----------\n\n- Learn about [Organization policies](/sql/docs/mysql/org-policy/org-policy).\n- Learn about how [private IP](/sql/docs/mysql/private-ip) works with Cloud SQL.\n- Learn how to [configure private IP](/sql/docs/mysql/configure-private-ip) for Cloud SQL.\n- Learn about the [organization policy service](/resource-manager/docs/organization-policy/overview).\n- Learn about [organization policy constraints](/resource-manager/docs/organization-policy/understanding-constraints)."]]