List, describe, and delete 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

Get 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 CLI 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:

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

Possible domain peering 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 isn't connected yet. There are a few possible causes:
  • If the state of the domain resource project is `DISCONNECTED`, it means that the domain peering isn't yet created from the VPC resource project.
  • If the state of the VPC resource project is `DISCONNECTED`, it means that the domain peering isn't yet created from the domain resource project.

List domain peerings

gcloud

Run the following gcloud CLI command:

gcloud active-directory peerings list

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

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

Delete a domain peering

gcloud

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

gcloud active-directory peerings delete [PEERING-NAME]