Welcome to AWS Essentials! This is the first task in a series to help you learn AWS.
It is easier to get familiar with a cloud by solving real-life tasks, so in this task series, you will deploy your very own instance of Grafana, configure it, and use it to monitor your cloud infrastructure! Grafana is a tool for building dashboards, mostly used for infrastructure monitoring.
Before completing any task in the module, make sure that you followed all the steps described in the Environment Setup topic, in particular:
-
Make sure you have an AWS account.
-
Install AWS CLI.
-
Install PowerShell Core.
-
Install Terraform.
-
Log in to AWS CLI on your computer by running the command:
aws configure
Grafana is an app for building dashboards with data from different sources. To run it, you need a webserver and a database. Today, you will start deploying your deployment's infrastructure with Terraform.
To complete this task:
-
Edit
main.tf
— uncommend theaws_vpc
resource. VPC is an AWS resource for building private networks. -
Run the following commands to generate a Terraform execution plan in JSON format:
terraform init terraform plan -out=tfplan terraform show -json tfplan > tfplan.json
-
Run an automated test to check yourself:
pwsh ./tests/test-tf-plan.ps1
If any test fails - please check your task code and repeat step 2 to generage a new tfplan.json file.
-
Deploy infrastructure using the following command:
terraform apply
-
Commit file
tfplan.json
and submit your solution for review.