워크로드 마이그레이션

이 페이지에서는 기존 프로젝트를 Assured Workloads 폴더로 마이그레이션하기 전에 규정 준수 분석을 수행하는 방법을 설명합니다. 이 분석은 소스 프로젝트와 대상 Assured Workloads 폴더를 비교하여 마이그레이션을 시작하기 전후에 필요한 변경사항을 확인합니다. 예를 들어 FedRAMP 중간 수준으로 구성된 Assured Workloads 폴더로 이동하려는 프로젝트가 있는 경우 프로젝트를 이동하기 전에 발생할 수 있는 잠재적인 규정 준수 위반을 사전에 해결할 수 있습니다.

이동 분석에서 다음 유형의 발견 항목을 반환합니다.

  • 소스 프로젝트에서 지원되지 않는 제품 또는 서비스를 사용합니다.
  • 소스 프로젝트가 허용되지 않는 위치에 있는 리소스가 포함되어 있습니다.
  • 소스 프로젝트는 대상 Assured Workloads 폴더와 호환되지 않는 조직 정책 제약조건 값으로 구성됩니다.

이동을 시도하기 전에 이러한 발견 항목을 발견해야 합니다. 기본적으로 Assured Workloads 폴더에는 폴더의 제어 패키지에서 지원하는 서비스의 리소스 유형만 포함될 수 있습니다. 폴더의 제어 패키지에서 지원하지 않는 서비스의 리소스가 프로젝트에 포함된 경우 해당 리소스를 다시 배포하거나 삭제해야 할 수 있습니다.

규정을 준수하지 않는 서비스가 폴더에 배포되도록 리소스 사용량 제한 조직 정책을 변경하여 Assured Workloads 폴더의 지원되는 서비스 기본 목록을 변경할 수 있지만 규정을 준수하지 않는 서비스 및 해당 리소스가 백그라운드 규정 준수 검사에서 무시됩니다. 따라서 지원되지 않는 서비스를 사용 설정하면 워크로드가 규정을 준수하지 않을 위험을 허용하게 됩니다.

시작하기 전에

  • 소스 프로젝트와 대상 Assured Workloads 폴더의 리소스 ID를 수집합니다.
  • 소스 프로젝트와 대상 Assured Workloads 폴더 모두에 대해 IAM 권한을 할당하거나 확인하여 호출자가 마이그레이션을 수행할 권한이 있는지 확인합니다.

필수 IAM 권한

마이그레이션 분석을 수행하려면 더 넓은 권한 집합을 포함하는 사전 정의된 역할 또는 필요한 최소 권한으로 제한된 커스텀 역할 중 하나를 사용하여 호출자에게 IAM 권한을 부여해야 합니다.

다음 권한이 필요합니다.

  • 대상 워크로드에 대한 assuredworkloads.workload.get 권한
  • 소스 프로젝트에 대한 cloudasset.assets.searchAllResources 권한
  • 소스 프로젝트 및 대상 Assured Workloads 폴더에 대한 orgpolicy.policy.get 권한

마이그레이션 분석 수행

소스 프로젝트 및 대상 Assured Workloads 폴더에 대한 분석을 수행할 때는 프로젝트를 대상으로 이전하기 전에 발견 항목을 해결해야 합니다. 발견 항목으로 인해 프로젝트 이전이 차단되지는 않지만 대상 Assured Workloads 폴더에서 규정 준수 위반이 발생할 수 있습니다.

이러한 발견 항목은 다음 두 가지 유형으로 나뉩니다.

  • 경고: 경고 결과는 소스 프로젝트가 대상 프로젝트와 잠재적으로 호환되지 않을 때 발생하며 규정 준수 위반이 발생할 수 있습니다. 비호환성이 허용 가능한지 또는 이전하기 전에 해결해야 하는지 확인하기 위해 경고를 조사해야 합니다.
  • 차단: 소스 프로젝트와 대상 간에 규정 준수 위반이 감지되면 차단 결과가 발생합니다. 이전을 진행하기 전에 차단 문제를 해결해야 합니다.

다음 유형의 발견 항목이 보고됩니다.

  • 리소스 위치: 많은 제어 패키지는 소스 프로젝트에 허용되지 않는 위치에 있는 리소스가 포함된 경우와 같이 규정 준수 요구사항을 준수하도록 리소스에 대한 위치 제한을 적용합니다.

    이 문제를 해결하려면 영향을 받는 리소스를 허용된 위치로 이동하거나, 삭제하거나, 대상의 gcp.resourceLocations 조직 정책 제약조건 설정을 수정합니다.

  • 지원되지 않는 제품/서비스: 각 제어 패키지는 Google Cloud 제품 및 서비스의 특정 목록을 지원합니다. 프로젝트에서 대상 Assured Workloads 폴더의 제어 패키지에서 지원하지 않는 서비스를 사용하면 발견 항목으로 나열됩니다.

  • 조직 정책 제약조건: 대상 Assured Workloads 폴더의 유효 정책과 다르거나 대상 제어 패키지를 준수하지 않는 조직 정책 제약조건 값으로 소스 프로젝트를 구성할 수 있습니다. 이 분석은 대상 Assured Workloads 폴더의 제어 패키지와 관련된 제약조건에 대해서만 수행되며, 프로젝트의 모든 제약조건 값은 평가되지 않습니다. 다음 문제와 같은 몇 가지 결과가 발생할 수 있습니다.

    • 프로젝트 및 대상의 유효 정책이 호환되지 않습니다.
    • 프로젝트에 대상 위치로 설정되지 않은 조직 정책 제약조건 값이 있거나 그 반대의 경우가 있습니다.
    • 프로젝트에 대상 제어 패키지를 준수하지 않는 조직 정책 제약조건 값이 있거나 그 반대의 경우가 있습니다.

    조직 정책 제약조건에 대한 차단 기능이 발견되면 대상 제어 패키지를 준수하는 예상 값이 응답에 포함됩니다. 마이그레이션을 수행하기 전에 이러한 예상 값을 사용하여 프로젝트를 변경할 수 있습니다.

이 문제를 해결하려면 수정해야 하는 조직 정책 제약조건을 결정하고 필요한 변경사항을 적용합니다.

지원되지 않는 발견 항목 유형

마이그레이션 분석에서는 다음과 같은 유형의 발견 항목이 지원되지 않습니다.

  • gcp.resourceLocations 이외의 조직 정책 제약조건에 대한 리소스 수준 비호환성입니다. 예를 들어 일부 제어 패키지는 전역 gcp.restrictCmekCryptoKeyProjects 제약조건 또는 Compute Engine 관련 compute.disableNestedVirtualization 제약조건으로 구성되며, 소스와 대상 간 이러한 제약조건과의 비호환성이 분석되거나 보고되지 않습니다.
  • 특정 제어 패키지에 대해 사용 중지될 수 있는 서비스별 기능입니다. 예를 들어 IL4 폴더의 경우 Cloud Monitoring 업타임 체크가 사용 중지되고 ITAR 폴더의 경우 BigQuery의 원격 함수가 사용 중지됩니다. 소스 프로젝트에서 사용 중지된 기능을 사용하는 경우 이러한 비호환성은 분석되거나 보고되지 않습니다.

Assured Workloads 폴더로 프로젝트 이전 분석

analyzeWorkloadMove 메서드는 소스 프로젝트를 대상 Assured Workloads 폴더로 이전하는 분석을 수행합니다.

아래의 요청 예시에서 다음 매개변수를 실제 값으로 바꿉니다.

  • ENDPOINT_URI: Assured Workloads 서비스 엔드포인트 URI. 이 URI는 대상 워크로드의 위치와 일치하는 엔드포인트여야 합니다(예: us-west1 리전의 리전화된 워크로드의 경우 https://us-west1-assuredworkloads.googleapis.com, 미국의 멀티 리전의 경우 https://us-assuredworkloads.googleapis.com).
  • DESTINATION_ORGANIZATION_ID: 소스 프로젝트를 마이그레이션할 대상 워크로드의 조직 ID. 예를 들면 919698201234입니다.
  • DESTINATION_LOCATION_ID: 대상 워크로드의 위치입니다. 예를 들면 us-west1 또는 us입니다. 워크로드의 data region 값에 해당합니다.
  • DESTINATION_WORKLOAD_ID: 소스 프로젝트가 마이그레이션될 대상 Assured Workloads 폴더의 ID입니다. 예를 들면 00-701ea036-7152-4780-a867-9f5입니다.
  • SOURCE_PROJECT_ID: 마이그레이션할 소스 프로젝트의 ID에 대한 쿼리 매개변수. 예를 들면 my-project-123입니다.
  • ASSET_TYPES: (선택사항) 지정된 유형으로만 발견 항목을 필터링하는 쿼리 매개변수당 애셋 유형 1개. 예를 들면 cloudresourcemanager.googleapis.com/Project입니다.
  • PAGE_SIZE: (선택사항) 페이지당 반환할 결과 수의 쿼리 매개변수. 예를 들면 5입니다.
  • PAGE_TOKEN: (선택사항) 결과를 계속 페이지로 나누는 토큰의 쿼리 매개변수. 예를 들면 CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA입니다.

HTTP 메서드, URL, 쿼리 매개변수:

GET https://[ENDPOINT_URI]/v1/organizations/[DESTINATION_ORGANIZATION_ID]/locations/[DESTINATION_LOCATION_ID]/workloads/[DESTINATION_WORKLOAD_ID]:analyzeWorkloadMove?project=projects/SOURCE_PROJECT_ID&page_size=PAGE_SIZE&page_token=PAGE_TOKEN

예를 들면 다음과 같습니다.

GET https://us-west1-assuredworkloads.googleapis.com/v1/organizations/919698298765/locations/us-west1/workloads/00-701ea036-7152-4781-a867-9f5:analyzeWorkloadMove?project=projects/my-project-123&page_size=5&page_token=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA

다음과 비슷한 JSON 응답이 표시됩니다.

{
  "assetMoveAnalyses": [
    {
      "asset": "//orgpolicy.googleapis.com/projects/130536381852/policies/container.restrictNoncompliantDiagnosticDataAccess",
      "assetType": "orgpolicy.googleapis.com/Policy"
    },
    {
      "asset": "//compute.googleapis.com/projects/my-project-123/global/routes/default-route-9ca6e6b0ab7326f0",
      "assetType": "compute.googleapis.com/Route",
      "analysisGroups": [
        {
          "displayName": "RESOURCE_LOCATIONS",
          "analysisResult": {
            "warnings": [
              {
                "detail": "The asset's location 'global' is incompatible with the gcp.resourceLocations org policy effective at the target. In case of 'global only' assets, this may be ignored."
              }
            ]
          }
        }
      ]
    },
    {
      "asset": "//compute.googleapis.com/projects/my-project-123/regions/europe-west10/subnetworks/default",
      "assetType": "compute.googleapis.com/Subnetwork",
      "analysisGroups": [
        {
          "displayName": "RESOURCE_LOCATIONS",
          "analysisResult": {
            "blockers": [
              {
                "detail": "The asset's location 'europe-west10' is incompatible with the gcp.resourceLocations org policy effective at the target."
              }
            ]
          }
        }
      ]
    },
    {
      "asset": "//serviceusage.googleapis.com/projects/130536381852/services/servicemanagement.googleapis.com",
      "assetType": "serviceusage.googleapis.com/Service"
    },
    {
      "asset": "//serviceusage.googleapis.com/projects/130536381852/services/monitoring.googleapis.com",
      "assetType": "serviceusage.googleapis.com/Service"
    },
    {
      "asset": "//serviceusage.googleapis.com/projects/130536381852/services/bigquerymigration.googleapis.com",
      "assetType": "serviceusage.googleapis.com/Service",
      "analysisGroups": [
        {
          "displayName": "DISALLOWED_SERVICES",
          "analysisResult": {
            "warnings": [
              {
                "detail": "This service is not allowed by the gcp.restrictServiceUsage org policy effective at the target"
              }
            ]
          }
        }
      ]
    },
    {
      "asset": "//cloudresourcemanager.googleapis.com/projects/my-project-123",
      "assetType": "cloudresourcemanager.googleapis.com/Project",
      "analysisGroups": [
        {
          "displayName": "ORG_POLICIES",
          "analysisResult": {
            "warnings": [
              {
                "detail": "constraints/gcp.resourceLocations: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target."
              },
              {
                "detail": "constraints/compute.disableInstanceDataAccessApis: Source applies this custom policy and it is not applied by the target."
              },
              {
                "detail": "constraints/cloudkms.allowedProtectionLevels: Source and target set different values for this policy."
              },
              {
                "detail": "constraints/container.restrictNoncompliantDiagnosticDataAccess: Source and target set different values for this policy."
              },
              {
                "detail": "constraints/gcp.restrictServiceUsage: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target."
              }
            ],
            "blockers": [
              {
                "detail": "constraints/gcp.resourceLocations: The value applied at the source is not compliant with the target compliance program. The expected allowed values are [us-west4, us-west1, us-west2, us-west3, us-central1, us-east1, us-east4, us-south1, us-central2, us-east5]."
              },
              {
                "detail": "constraints/container.restrictNoncompliantDiagnosticDataAccess: The value applied at the source is not compliant with the target compliance program. The expected value is [true]."
              },
              {
                "detail": "constraints/container.restrictTLSVersion: The value applied at the source is not compliant with the target compliance program. The expected denied values are [TLS_VERSION_1, TLS_VERSION_1_1]."
              }
            ]
          }
        }
      ]
    }
  ],
  "nextPageToken": "Ch8wLDc0MzY3NTExNCwzMzg4ODM1NTM2NDQ0NTg4MDMy"
}

특정 애셋 유형별로 발견 항목을 필터링하려면 asset_types 쿼리 매개변수를 사용합니다.

GET https://assuredworkloads.googleapis.com/v1/organizations/919698298765/locations/us-west1/workloads/00-701ea036-7152-4781-a867-9f5:analyzeWorkloadMove?project=projects/my-project-123&asset_types=cloudresourcemanager.googleapis.com/Project&page_size=5&page_token=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA

결과에는 지정된 유형(cloudresourcemanager.googleapis.com/Project)의 발견 항목만 포함됩니다.

{
  "assetMoveAnalyses": [
    {
      "asset": "//cloudresourcemanager.googleapis.com/projects/my-project-123",
      "assetType": "cloudresourcemanager.googleapis.com/Project",
      "analysisGroups": [
        {
          "displayName": "ORG_POLICIES",
          "analysisResult": {
            "warnings": [
              {
                "detail": "constraints/gcp.resourceLocations: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target."
              },
              {
                "detail": "constraints/compute.disableInstanceDataAccessApis: Source applies this custom policy and it is not applied by the target."
              }
            ],
            "blockers": [
              {
                "detail": "constraints/gcp.resourceLocations: The value applied at the source is not compliant with the target compliance program. The expected allowed values are [us-west4, us-west1, us-west2, us-west3, us-central1, us-east1, us-east4, us-south1, us-central2, us-east5]."
              }
            ]
          }
        }
      ]
    }
  ],
  "nextPageToken": "Ch8wLDc0MzY3NTExNCwzMzg4ODM1NTM2NDQ0NTg4MDMy"
}

둘 이상의 애셋 유형으로 발견 항목을 필터링하려면 각각을 추가 쿼리 매개변수로 추가합니다.

GET https://assuredworkloads.googleapis.com/v1/organizations/919698298765/locations/us-west1/workloads/00-701ea036-7152-4781-a867-9f5:analyzeWorkloadMove?project=projects/my-project-123&asset_types=cloudresourcemanager.googleapis.com/Project&asset_types=serviceusage.googleapis.com/Service&page_size=5&page_token=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA

결과에는 지정된 유형의 발견 항목만 포함됩니다(cloudresourcemanager.googleapis.com/Projectserviceusage.googleapis.com/Service).

{
  "assetMoveAnalyses": [
    {
      "asset": "//serviceusage.googleapis.com/projects/130536381852/services/bigquerymigration.googleapis.com",
      "assetType": "serviceusage.googleapis.com/Service",
      "analysisGroups": [
        {
          "displayName": "DISALLOWED_SERVICES",
          "analysisResult": {
            "warnings": [
              {
                "detail": "This service is not allowed by the gcp.restrictServiceUsage org policy effective at the target"
              }
            ]
          }
        }
      ]
    },
    {
      "asset": "//cloudresourcemanager.googleapis.com/projects/my-project-123",
      "assetType": "cloudresourcemanager.googleapis.com/Project",
      "analysisGroups": [
        {
          "displayName": "ORG_POLICIES",
          "analysisResult": {
            "warnings": [
              {
                "detail": "constraints/gcp.resourceLocations: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target."
              },
              {
                "detail": "constraints/compute.disableInstanceDataAccessApis: Source applies this custom policy and it is not applied by the target."
              }
            ],
            "blockers": [
              {
                "detail": "constraints/gcp.resourceLocations: The value applied at the source is not compliant with the target compliance program. The expected allowed values are [us-west4, us-west1, us-west2, us-west3, us-central1, us-east1, us-east4, us-south1, us-central2, us-east5]."
              }
            ]
          }
        }
      ]
    }
  ],
  "nextPageToken": "Ch8wLDc0MzY3NTExNCwzMzg4ODM1NTM2NDQ0NTg4MDMy"
}

마이그레이션 분석을 수행한 후에는 경고 또는 차단 요소를 검토하고 해결한 후 분석을 다시 실행하여 해결되었는지 확인합니다. 그런 다음 프로젝트 이전을 진행할 수 있습니다.

다음 단계