DevOps Classroomnotes 28/Oct/2022

Terraform contd..

Taint resources using terraform

  • In Terraform we have options to taint
  • Taint: During next apply delete and recreate the resource.
  • For this lets write a simple template and taint some resource
    Preview
  • syntax for taint is terraform taint <resource_type>.<resource_name>
  • To unmark a resource tainted for replacement we can untaint before next terraform appply to undo the taint.
  • Graph: Refer Here for the changeset
    Preview
  • Immutable infrastructure: The approach we are following is immutable infrastructure. Any change in infrastructure can happen by the changes in the template. Every change is stored in version control system i.e. we have history of all the changes.

Lets add ec2 instance with public ip in web subnet

  • For creating an ec2 instance we need
    • ami id
    • security group
    • key pair (optional)
  • Refer Here for the changes done to add ec2 instance.
  • Now we are supposed to install some applications in the ec2 instance.

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube