MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Terraform Assignment and Excercise


Terraform Assignment: Getting Started

Assignment 1

Create a new directory and write a terraform code which would create Ec2 instance and use Existing Security Group and Key.

Assignment 2

Create a new directory and write a terraform code which would create Security Group and new Key and create Ec2 instance and use newly created Security Group and Key.The security group should allow incoming traffic on port 22 (SSH) and port 80 (HTTP).

Assignment 3

Write a terraform code would create following resources

  • keypair (Pub – ON AWS – PVT – Local)
  • Display a pvt on Console
  • Create a Security group must open 80 Port
  • Create a Ec2 instance Ubuntu using the same Key & SG which you created above.
  • You must install/Start apache2 in EC2 instance
    $ apt-get update
    $ apt-get install apache2 -y
    $ systemctl start apache2

Terraform Assignment: Module

  • Create a Terraform module that provisions an Amazon S3 bucket and an associated CloudFront distribution for content delivery.
  • Write a Terraform module that creates an Amazon RDS database instance and an EC2 instance to connect to the database.
  • Develop a Terraform module that sets up an Amazon VPC with public and private subnets and an Internet Gateway for Internet access.
  • Create a Terraform module that provisions an Amazon Elastic Container Service cluster and a corresponding load balancer.
  • Write a Terraform module that creates an Amazon Elastic File System and mounts it on an EC2 instance.
  • Build a Terraform module that sets up an Amazon Route 53 hosted zone and an associated record set.
  • Develop a Terraform module that provisions an Amazon API Gateway and corresponding Lambda functions for serverless application deployment.
  • Write a Terraform module that creates an Amazon CloudWatch dashboard for monitoring metrics from multiple AWS services.
  • Build a Terraform module that sets up an Amazon Elastic Load Balancer and associated Auto Scaling Group for high availability & use this module in another Module which would create 2 Ubuntu Vms and loadbalance these 2 Vms using ELB.
  • Create a Terraform module that provisions an Amazon ECS Fargate task definition and corresponding IAM roles and policies for task execution.

How to Submit Assignment: Please publish it at www.Debug.School and share a URL in comment box.

Terraform FAQs

  1. What is Terraform, and how does it work?
  2. What are the benefits of using Terraform?
  3. How does Terraform differ from other infrastructure as code tools?
  4. What is the syntax for creating Terraform configurations?
  5. How do I declare resources in Terraform?
  6. How do I manage dependencies between resources in Terraform?
  7. What are Terraform modules, and how do I use them?
  8. How do I deploy and manage infrastructure with Terraform?
  9. How do I manage state in Terraform?
  10. How do I use Terraform with cloud providers such as AWS, Azure, and Google Cloud Platform?
  11. How do I debug Terraform configurations?
  12. How do I version control Terraform configurations?
  13. How do I test Terraform configurations?
  14. How do I secure Terraform configurations?
  15. How do I integrate Terraform with other tools and services in my stack?

Project & Assignment – 1

Project & Assignment – 2

Project & Assignment – 3

Project & Assignment – 4

Answer – Write a terraform code which would create Ec2 instance and use Existing Security Group and Key

Answer – write a terraform code which would create Security Group and new Key and create Ec2 instance and use newly created Security Group and Key.The security group should allow incoming traffic on port 22 (SSH) and port 80 (HTTP).

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Terraform Project โ€“ Assignment โ€“ Exercise โ€“ Lab#2: Modules

How to submit Assignment? Please submit assignment @https://www.debug.school/ and POST url share in the comments of this post. Project 1 – Create a terraform Module in which…

Read More

Hashicorp Packer Example Program: AWS AMI

This tutorial uses a HashiCorp Packer HCL2 template to build a custom Amazon Machine Image (AMI). The template starts from Ubuntu 22.04 in the ap-south-1 (Mumbai) region…

Read More

AWS Tutorials: AWS CodeBuild – Buildspec code for creating AMI from running instances

This page has an AWS CodeBuild buildspec that finds every running EC2 instance tagged environment=uat and creates an AMI from each one with the AWS CLI. It…

Read More

Terraform: Azure VM using terraform-azurerm-compute Module

The example above uses the community Azure/compute/azurerm and Azure/network/azurerm Terraform modules to build one Linux VM and one Windows VM in Azure. Both share a virtual network…

Read More

Terraform: Azure VM using virtual-machine Module

This tutorial uses the community kumarvna/virtual-machine/azurerm module from the Terraform Registry to deploy two Windows Server 2019 VMs into an existing Azure resource group, virtual network and…

Read More

Terraform Error Handing with Try Catch

Terraform has no try { } catch { } block. Error handling in HCL uses the try() function, which returns the first of its arguments that evaluates…

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Jason Mitchell
Jason Mitchell
3 months ago

One enhancement would be to include exercises that simulate real-world infrastructure changes instead of only initial resource creation. In practice, Terraform is frequently used to update existing environments, import unmanaged resources, resolve state conflicts, and safely remove obsolete infrastructure. Practicing these day-to-day scenarios helps learners build confidence in handling production environments where change management is often more challenging than the initial deployment.

1
0
Would love your thoughts, please comment.x
()
x