
Lab Details:
- This lab walks you through Cloud Deployment Manager.
- You will be creating a Template and Deployment.
Lab Tasks:
- Login into GCP Console.
- Creating a Template file.
- Creating a Deployment to launch Compute Engine and Firewall Rule.
Creating a Deployment using CDM:
- Start the Cloud Shell from the top bar.
- Enter the command to create a template file.
nano vm-deploy.yaml
3. Enter the below code in the template file, save the file and exit the text editor.


You may download the above configuration file from following link: Download from here.
4. Enter the command to create a deployment from the template.
gcloud deployment-manager deployments create vm-deployment — config vm-deploy.yaml
If prompted, click on Authorize.
5. You can see the deployment completed successfully and you have created a virtual machine and a firewall rule.

6. Click on the hamburger icon on the top left corner.
7. Click on Compute Engine.
8. You can see the listed VM Instance created using a Template file.

9. Now go to VPC Network > Firewall. You will see the newly created firewall listed.

Completion and Conclusion:
- In this lab, you have created a Template i.e yaml file.
- You have created a Compute Engine and Firewall Rule using the Template defined in Deployment.
Happy Learning!!!
