Designate a project to use for Cloud Number Registry
This page explains how to designate a project to use for
Cloud Number Registry. Only
one project in each organization can use
Cloud Number Registry. Before you can set up
Cloud Number Registry, an Organization Administrator must
designate which project can be used by creating an org-number-registries
resource.
Before you begin
- Create or select a project to use to manage Cloud Number Registry
for the parent organization. We strongly recommend creating a dedicated project
for this purpose. For more information, see
Project designation for Cloud Number Registry.
-
In the Google Cloud console, go to 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 theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Enable the Cloud Number Registry API.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.- Verify that you have the permissions required to complete this guide.
Required roles
To get the permissions that
you need to designate a project to use for Cloud Number Registry,
ask your administrator to grant you the
Cloud Number Registry IPAM Admin (roles/cloudnumberregistry.ipamAdmin) IAM role on the parent organization.
For more information about granting roles, see Manage access to projects, folders, and organizations.
You might also be able to get the required permissions through custom roles or other predefined roles.
Optional: Check if Cloud Number Registry is configured
Only one project in each organization can configure Cloud Number Registry. You can check if Cloud Number Registry is already configured in your organization from any project in the organization.
Console
In the Google Cloud console, go to the Cloud Number Registry page.
- If Cloud Number Registry is already configured in this organization, you are redirected to the project that manages Cloud Number Registry.
- If Cloud Number Registry isn't configured for this organization, a Create admin scope button is displayed.
gcloud
Check if Cloud Number Registry is already configured in your
organization by using the gcloud alpha number-registry ipam-admin-scopes
check-availability
command.
- If Cloud Number Registry is already configured, the
response is
UNAVAILABLE. - If there's no existing configuration, the response is
AVAILABLE.
gcloud alpha number-registry ipam-admin-scopes check-availability \
--scopes=organizations/ORGANIZATION_ID \
--location=global
Replace ORGANIZATION_ID with the ID number of the
organization that you want to manage.
Designate a project to use for Cloud Number Registry
To designate a project to use for Cloud Number Registry, you
create an org-number-registries resource that defines which project can be used
to set up Cloud Number Registry for its parent organization.
When you set up
Cloud Number Registry,
Google Cloud checks that you're creating the IPAM admin scope in a project
that matches the project defined in the org-number-registries resource.
gcloud
Designate a project to use for Cloud Number Registry by using
the gcloud alpha number-registry org-number-registries create
command.
gcloud alpha number-registry org-number-registries create ORG_NUMBER_REGISTRY \
--admin-project=projects/PROJECT_ID \
--target-scopes=organizations/ORGANIZATION_ID \
--organization=ORGANIZATION_ID \
--location=global
Replace the following:
ORG_NUMBER_REGISTRY: a name for the organization number registry resource.PROJECT_ID: the ID number of the project that you want to use to contain Cloud Number Registry information.ORGANIZATION_ID: the ID number of the organization that you want to manage.
List and view project designations
You can view which project has been designated to use with Cloud Number Registry.
gcloud
To list project designations for Cloud Number Registry, use the
gcloud alpha number-registry org-number-registries listcommand.gcloud alpha number-registry org-number-registries list \ --organization=ORGANIZATION_ID \ --location=globalReplace
ORGANIZATION_IDwith the ID number of the organization that you're managing.To view details for a project designation for Cloud Number Registry, use the
gcloud alpha number-registry org-number-registries describecommand.gcloud alpha number-registry org-number-registries describe ORG_NUMBER_REGISTRY \ --organization=ORGANIZATION_ID \ --location=globalReplace the following:
ORG_NUMBER_REGISTRY: the name of the organization number registry resource.ORGANIZATION_ID: the ID number of the organization that you're managing.
Delete a project designation
If a project designation exists, but Cloud Number Registry isn't
set up in the project, you can delete the org-number-registries resource that
designates the project.
If Cloud Number Registry is already set up in the project, you must decommission Cloud Number Registry before you can delete the project designation.
gcloud
Delete a project designation by using the gcloud alpha number-registry
org-number-registries delete
command.
gcloud alpha number-registry org-number-registries delete ORG_NUMBER_REGISTRY \
--organization=ORGANIZATION_ID \
--location=global
Replace the following:
ORG_NUMBER_REGISTRY: the name of the organization number registry resource.ORGANIZATION_ID: the ID number of the organization that you're managing.