DevOps Classroom Notes – 11/08/2021

Terraform conditionals

  • Lets use some conditionals in terraform
    • Refer Here for the changes made to add the condition for vm creation
  • Terraorm has a taint command that informs terraform that a particular object has become degraded or damaged and during the next execution of terraform replace it.
  • Terraform taint can be undone with untaint command
  • Every provider in terraform gives us data sources which we can use to pull information. The basic syntax of defining datasource is
data "type" "name" {
    arg1 = value1
    ...
    argn = valuen
}
  • To use the datasource attributes in the terraform configuration syntax is data.<type>.<name>.<attribute-name>
  • Terraform has a output block which can display output after the apply is completed
  • Refer Here for the changeset with datasources and output
  • Refer Here for the demo with aws datasources

Next Steps

  • Terraform Modules
  • Terraform Provisioing
  • Terraform Remote Backends
  • Terraform Workspaces

Published
Categorized as Uncategorized Tagged ,

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%