DevOps Classroomnotes 13/Oct/2022

Terraform Continued

  • While configuring Provider, Authentication has to be configured
  • For AWS Provider Authentication Refer Here
  • Refer Here on steps to create access key and secret key
  • For working with terrafom open terminal , cd into folder where we have terraform templates.
    • init => Downloads the necessary providers into .terraform folder
      Preview
    • validate => verify the template for configuration being valid or not
    • apply => creates/updates the infrastructure
      Preview
      Preview
      Preview
  • Now lets verify the existence of s3 bucket
    Preview
  • Lets execute terraform apply again
    Preview
  • Refer Here for the changes done in the class

Activity 2: Create a Network (VPC) in AWS

  • Manual
    Preview
    Preview
    Preview
  • To Create VPC =>
    • Region
    • cidr range
    • name tag
      Preview
  • Refer Here for the resource documentation
  • Configuring authentication, Install aws cli choco install awscli -y
  • Configure access key and secret key aws configure and enter access key, secret access key and region which will create a file called as credentials in <home-dir>/.aws/credentials and Terraform while executing will pick up from there
  • Now try applying the tempalte after init, validate to create vpc
    Preview
  • Lets use terraform destroy to delete all the resources created by the template
  • Refer Here for the template created in the class.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner