Soru

Zorluk: KolayDeploying Infrastructure using Deployment Manager or Terraform

A Cloud Engineer needs to create a new infrastructure deployment in Google Cloud using Google Cloud Deployment Manager. The configuration template file is stored locally as `network-config.yaml`. Which `gcloud` command should the engineer execute to create a new deployment named `production-network`?

  1. gcloud deployment-manager deployments create production-network --config network-config.yamlCevap
  2. B
    gcloud deployment-manager deployments update production-network --config network-config.yaml
  3. C
    gcloud compute instances create production-network --config network-config.yaml
  4. D
    gcloud storage buckets create production-network --config network-config.yaml

Cevap

The command `gcloud deployment-manager deployments create production-network --config network-config.yaml` is the correct syntax for creating a new deployment in Deployment Manager.
To create a brand-new deployment in Google Cloud Deployment Manager, the `gcloud deployment-manager deployments create` command must be used along with the deployment name and the `--config` flag pointing to the YAML or Jinja/Python configuration file.

Adım Adım Çözüm

1
Identify the Google Cloud service required for infrastructure as code deployment.
Google Cloud Deployment Manager is specified.
Deployment Manager manages GCP resource lifecycle via configuration templates.
2
Determine the proper gcloud command group and action verb for initial deployment creation.
The target command structure is `gcloud deployment-manager deployments create`.
Creating a new deployment resource requires the `create` action rather than `update` or compute-specific subcommands.
3
Specify mandatory positional arguments and flags.
`production-network` as the deployment name and `--config network-config.yaml` to pass the template file.
The deployment name is a required positional argument, and `--config` defines the path to the YAML configuration.

Anahtar Kavram

Deployment Manager CLI Execution
Bu soruyu puanla