Google Deployment Manager
- YAML tutorial Refer Here
- As projects grow in size and complexity creating cloud resources manually or using a gcloud cli to create resources individually might not be a solution
- In GCp there are several tool used for infrastructure managemetn which are collectively known as configuration management tools. These tool deliver value in the following areas
- Repeatability
- Transparency
- Testability
- Declarative Configuration Management:
- Two primary approaches to infrastructure management are
- imperative: how it has to be done
- declarative: what has to be done
- Two primary approaches to infrastructure management are
- GCP Deployment manager is a declarative configuration management system.
- The desired state is defined using configurations which are YAML files
- The basic configuration file takes the following format
resources
- name: <Resource_Name>
type: <Resource_Type>
properties:
<key>: <value>
- Refer Here for the official docs
- In the documentation they use jinja which is closely related to yaml format
- Resource types and properties
- This resource type defines the kind of the resource to be created. These resources include VMs, disk, netowork, BigQuery, AppEngine, Pub/Sub
- Manage base type takes the form of
<API>.<VERSION>.<RESOURCE>egcompute.v1.instance - Refer Here for the list of supported resource types
- Properties of the resource depends on the type used. Properties map directly to the types API representation.

Simple cloud deployment configuration
- Ensure Deployment Manager API is enabled for the project
- Try to create a configuration to create a storage bucket Refer Here for the configuration created
- Now deploy the configuration from gcloud for cli Refer Here

- now lets update the deployment to create a new network
- Add the changes to the preview mode and the apply by executing update Refer Here for the changes done

- Add the changes to the preview mode and the apply by executing update Refer Here for the changes done
- Now delete the deployment

- When we delete the deployment the resources created by the deployment will be deleted by deployment manager
