DevOps Classroom Series – 05/Aug/2021

Terraform Providers

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

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
  • 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

  • Lets try to create one subnet
  • 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 comment

Turn on JavaScript to leave a comment.

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

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company
Exit mobile version
%%footer%%