part 1 Flashcards
(10 cards)
What are the key features of Terraform?
- Resource graph: Automatically generates a dependency graph to understand resource relationships.
- Modules for Reusability: Organize configurations into reusable code to maintain consistency and reduce duplication.
- Multi-Cloud and Provider Support:
What is Terraform Cloud?
Terraform Cloud is a hosted service provided by HashiCorp to help teams manage their infrastructure using Terraform. Think of it as a platform that takes care of running Terraform commands (like plan and apply) in a centralized and secure way.
Here’s a simple breakdown:
Centralized Workspace: It stores your Terraform configurations and state (the record of your infrastructure) in the cloud, so you don’t have to manage them yourself.
Team Collaboration: Multiple people can work together on the same infrastructure with features like access control and change history.
Automation: Automatically runs Terraform commands to plan and apply changes to your infrastructure.
Safety Features: Adds safeguards like approval workflows and locking to avoid accidental changes.
What are Terraform variables, and how can you use them?
Terraform variables are a way to parameterize your Terraform configurations, allowing your code to be more flexible and reusable.
what is the difference between input and output variables in terraform ?
- Input Variables: These are values that you define in your Terraform configuration that can be passed into the module or configuration from outside.
- Output Variables: These are used to extract information from your Terraform configurations after deployment.
What are the different ways to declare variables in terraform ?
- Declaring Variables in a variables.tf or Similar File
- Defining Variables in a terraform.tfvars File
- Passing Variables Directly via Command Line ( terraform apply -var=”variable_name=value”)
- using environment variables ( export TF_VAR_variable_name=value)
- What’s terraform plan command, and what is its purpose?
The terraform plan command shows you what Terraform will do before actually making any changes to your infrastructure.
what are the different types of provisioners ?
- Remote-exec: Runs commands on the resource via SSH or WinRM. Example: Installing software on a virtual machine.
- Local-exec: Runs commands on your local machine. Example: Triggering a script to notify a monitoring system.
- file : The file provisioner copies files or directories from the machine running Terraform to the newly created resource.
what is terraform ?
An IAC tool created by hashicorp that helps you set up and manage your IT infrastructure (like servers, networks, and databases)
what are the different IAC tools you know ?
- terraform
- CloudFormation
- Ansible
- SaltStack
- chef, puppet
what is a provisioner in terraform ?
A provisioner in Terraform is a tool used to run scripts or commands on a resource after it has been created