커스텀 조직 정책을 사용하여 VPC 리소스 관리

이 페이지에서는 조직 정책 서비스 커스텀 제약 조건을 사용하여 다음 Google Cloud 리소스에 대한 특정 작업을 제한하는 방법을 보여줍니다.

  • compute.googleapis.com/Address
  • compute.googleapis.com/Network
  • compute.googleapis.com/NetworkAttachment
  • compute.googleapis.com/PacketMirroring
  • compute.googleapis.com/Route
  • compute.googleapis.com/ServiceAttachment
  • compute.googleapis.com/Subnetwork
  • networkconnectivity.googleapis.com/InternalRange
  • networkconnectivity.googleapis.com/RegionalEndpoint
  • servicenetworking.googleapis.com/Connection

조직 정책에 대한 자세한 내용은 커스텀 조직 정책을 참조하세요.

조직 정책 및 제약조건 정보

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

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

정책 상속

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

제한사항

  • 커스텀 제약조건은 경로 리소스CREATE 메서드에만 적용됩니다.

시작하기 전에

  1. Google Cloud 계정에 로그인합니다. Google Cloud를 처음 사용하는 경우 계정을 만들고 Google 제품의 실제 성능을 평가해 보세요. 신규 고객에게는 워크로드를 실행, 테스트, 배포하는 데 사용할 수 있는 $300의 무료 크레딧이 제공됩니다.
  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. Google Cloud CLI를 설치합니다.

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

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

    gcloud init
  7. 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

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

  9. Google Cloud CLI를 설치합니다.

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

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

    gcloud init
  12. 조직 ID를 알고 있어야 합니다.

필요한 역할

커스텀 조직 정책을 관리하는 데 필요한 권한을 얻으려면 관리자에게 조직 리소스에 대한 조직 정책 관리자 (roles/orgpolicy.policyAdmin) IAM 역할을 부여해 달라고 요청하세요. 역할 부여에 대한 자세한 내용은 프로젝트, 폴더, 조직에 대한 액세스 관리를 참조하세요.

커스텀 역할이나 다른 사전 정의된 역할을 통해 필요한 권한을 얻을 수도 있습니다.

VPC 지원 리소스

다음 표에는 커스텀 제약 조건에서 참조할 수 있는 VPC 리소스가 나와 있습니다.

리소스 필드
compute.googleapis.com/Address resource.address
resource.addressType
resource.description
resource.ipv6EndpointType
resource.ipVersion
resource.name
resource.network
resource.networkTier
resource.prefixLength
resource.purpose
resource.subnetwork
compute.googleapis.com/Network resource.autoCreateSubnetworks
resource.description
resource.enableUlaInternalIpv6
resource.internalIpv6Range
resource.mtu
resource.name
resource.networkFirewallPolicyEnforcementOrder
resource.peerings.autoCreateRoutes
resource.peerings.exchangeSubnetRoutes
resource.peerings.exportCustomRoutes
resource.peerings.exportSubnetRoutesWithPublicIp
resource.peerings.importCustomRoutes
resource.peerings.importSubnetRoutesWithPublicIp
resource.peerings.name
resource.peerings.network
resource.peerings.peerMtu
resource.peerings.stackType
resource.routingConfig.bgpAlwaysCompareMed
resource.routingConfig.bgpBestPathSelectionMode
resource.routingConfig.bgpInterRegionCost
resource.routingConfig.routingMode
compute.googleapis.com/NetworkAttachment resource.connectionPreference
resource.description
resource.name
resource.producerAcceptLists
resource.producerRejectLists
resource.subnetworks
compute.googleapis.com/PacketMirroring resource.collectorIlb.url
resource.description
resource.enable
resource.filter.cidrRanges
resource.filter.direction
resource.filter.IPProtocols
resource.mirroredResources.instances.url
resource.mirroredResources.subnetworks.url
resource.mirroredResources.tags
resource.name
resource.network.url
resource.priority
compute.googleapis.com/Route resource.description
resource.destRange
resource.name
resource.network
resource.nextHopGateway
resource.nextHopIlb
resource.nextHopInstance
resource.nextHopIp
resource.nextHopVpnTunnel
resource.priority
resource.tags
compute.googleapis.com/ServiceAttachment resource.connectionPreference
resource.consumerAcceptLists.connectionLimit
resource.consumerAcceptLists.networkUrl
resource.consumerAcceptLists.projectIdOrNum
resource.consumerRejectLists
resource.description
resource.domainNames
resource.enableProxyProtocol
resource.name
resource.natSubnets
resource.product.id
resource.product.variantId
resource.propagatedConnectionLimit
resource.reconcileConnections
resource.targetService
compute.googleapis.com/Subnetwork resource.description
resource.externalIpv6Prefix
resource.internalIpv6Prefix
resource.ipCidrRange
resource.ipv6AccessType
resource.logConfig.aggregationInterval