You are configuring internal domain name resolution for instances running within a Virtual Private Cloud (VPC) network named `corp-vpc`. You plan to use the Google Cloud CLI (`gcloud`) to create a Cloud DNS managed zone named `corp-zone` for the internal domain `internal.corp.com`. Which combination of flags must you specify in the `gcloud dns managed-zones create` command to restrict resolution of this zone exclusively to `corp-vpc`?
- --visibility=private --networks=corp-vpcAnswer
- B--visibility=internal --vpc=corp-vpc
- C--zone-type=private-zone --authorized-networks=corp-vpc
- D--scope=vpc-internal --allowed-networks=corp-vpc
Answer
Specify the flags `--visibility=private` and `--networks=corp-vpc` when running the `gcloud dns managed-zones create` command.
To create a private Cloud DNS zone bound to a specific VPC network using the gcloud CLI, you must set `--visibility=private` and pass the target VPC network name to `--networks=corp-vpc`.
Step-by-Step Solution
Key Concept
Configuring Cloud DNS Private Managed Zones via gcloud CLI