DevOps Classroom Series – 05/Aug/2021

Terraform Providers

  • Refer Here for the various providers supported by terraform
  • Official Providers Refer Here
  • How Terraform Works Preview

Scenario-1

  • Write a Terraform configuration to deploy application with ntier architecture in AWS
  • As a first step lets try to create the following network in AWS Preview
  • Configuring AWS Authentication using shared file
    • Ensure you have the following directory and file ~/.aws/credentials
    • In this file
      [default]
      aws_access_key_id = <your access key id>
      aws_secret_access_key = <your secret access key>
      
    • If we follow this approach credentials are store outside of terraform configuration.
    • If you dont want to create this file manually. Install aws cli Refer Here
  • Refer Here for the configuration written in the class
  • Now we executed
terraform init
terraform validate
terraform apply

Preview Preview

  • Lets try to create one subnet Preview
  • For any resource we have arguments where we provide inputs and when the resource is created successfully it will have outputs which are referred as attributes
  • To use attributes we have a syntax <resource-type>.<name>.<attribute>
  • Refer Here for the changeset where we have created websubnet
  • Exercise: Try to create app and db subnet

Leave a Reply

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

About learningthoughtsadmin