Question

Difficulty: EasyDeploying Cloud Load Balancers and Configuring Cloud DNS

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`?

  1. --visibility=private --networks=corp-vpcAnswer
  2. B
    --visibility=internal --vpc=corp-vpc
  3. C
    --zone-type=private-zone --authorized-networks=corp-vpc
  4. 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

1
Identify the requirement for internal-only Cloud DNS name resolution.
Recognize that a private managed zone is required rather than a default public zone.
Private DNS zones restrict name resolution to authorized Virtual Private Cloud (VPC) networks.
2
Determine the correct `gcloud` command parameters for Cloud DNS zone creation.
Use `--visibility=private` to define private scope and `--networks=[VPC_NAME]` to authorize network access.
The `gcloud dns managed-zones create` command expects these specific flag names to establish private network authorization.

Key Concept

Configuring Cloud DNS Private Managed Zones via gcloud CLI
Rate this question