Listing, describing, and deleting domain peerings

This article shows you how to list your existing domain peerings in Managed Service for Microsoft Active Directory, get information about them, and delete the ones you no longer need.

Before you begin

Getting domain peering info

You can query for more information about a specific domain, including its current state. This is especially useful when creating a new domain peering.

To get domain peering info:

gcloud

Run the following gcloud tool command, replacing [PEERING-NAME] with the name of your domain peering (such as mypeering):

gcloud active-directory peerings describe [PEERING-NAME]

The response is YAML describing the peering, such as:

name: projects/my-project/locations/global/peerings/mypeering
authorizedNetworks:
- projects/my-project/global/networks/my-vpc
createTime: '2019-03-27T22:35:58.135726571Z'
domainResource: projects/my-project/locations/global/domains/ad.mycompany.com
state: CONNECTED
updateTime: '2019-03-29T23:58:12.249298693Z'

Possible domain states include:

State Description
STATE_UNSPECIFIED Not set.
CREATING The domain peering is being created.
CONNECTED The domain peering is connected and fully usable.
DELETING The domain peering is being deleted.
DISCONNECTED The domain peering is not connected yet. There are a few possible causes:
  • If looking at the domain resource project, the domain peering is not yet created from the VPC resource project
  • If looking at the VPC resource project, the domain peering is not yet created from the domain resource project

Listing domain peerings

gcloud

Run the following gcloud tool command:

gcloud active-directory peerings list

The response is a list of domain peerings in the project:

PEERING_NAME    PEERING_STATE  AUTHORIZED_NETWORK                              DOMAIN_RESOURCE                                              CREATE_TIME
mypeering       READY          project/my-project/global/networks/my-network   projects/my-project/locations/global/domains/mydomain.com    2021-01-01T22:00:00

Deleting a domain

gcloud

Run the following gcloud tool command, replacing [PEERING-NAME] with the name of your domain peering (such as mypeering):

gcloud active-directory peerings delete [PEERING-NAME]