Ravindra BagaleCourses & study guides मराठी

Ravi Sir's Cards › DevOps

Chapter 33: Terraform Providers Resources Variables Outputs Locals and Data Sources: Cards

मराठी cards · Open the chapter

Revision cards

Providers: the plugin that talks to AWS. Terraform itself knows nothing about AWS. A provider is a plugin that turns your code into AWS API calls.
Revision card 1 of 6: Providers: the plugin that talks to AWS · Download PNG · Open card page

Lesson: 33.1 Providers — the plugin that talks to AWS

Resources: the things Terraform creates. Everything Terraform builds (servers, buckets, databases) is a resource. Each block is one real thing in the cloud.
Revision card 2 of 6: Resources: the things Terraform creates · Download PNG · Open card page

Lesson: 33.2 Resources — the things Terraform creates

Variables and tfvars: one code, many inputs. Hard-coded values force you to copy the code for each environment. Variables let one code base take different inputs.
Revision card 3 of 6: Variables and tfvars: one code, many inputs · Download PNG · Open card page

Lesson: 33.3 Variables and tfvars — one code, many inputs

Outputs: values you hand to people and other code. After apply, people need addresses and IDs. Searching the console wastes time. Outputs print them.
Revision card 4 of 6: Outputs: values you hand to people and other code · Download PNG · Open card page

Lesson: 33.4 Outputs — values you hand to people and other tools

Locals: name a value once, use it everywhere. Repeating the same text in 20 places means 20 edits and typos. A local gives a value a name.
Revision card 5 of 6: Locals: name a value once, use it everywhere · Download PNG · Open card page

Lesson: 33.5 Locals — name a value once, use it everywhere

Data sources: read what already exists. Some things already exist and are not managed by your code. A data source reads them without changing them.
Revision card 6 of 6: Data sources: read what already exists · Download PNG · Open card page

Lesson: 33.6 Data sources — read what already exists

Interview cards

What is a Terraform provider? A provider is a plugin that lets Terraform talk to one platform’s API, like AWS, Azure or GitHub. It knows every resource type for that platform, such as aws_instance.
Interview card 1 of 6: What is a Terraform provider? · Download PNG · Open card page

Lesson: 33.1 Providers — the plugin that talks to AWS

How does Terraform know in which order to create resources? Terraform builds a dependency graph from references. If a subnet uses aws_vpc.main.id, Terraform creates the VPC first. Resources with no link are created in parallel.
Interview card 2 of 6: How does Terraform know in which order to create resources? · Download PNG · Open card page

Lesson: 33.2 Resources — the things Terraform creates

How do you give a value to a Terraform variable, and which wins? Ways: a default in the variable, a terraform.tfvars file, a -var-file, a -var flag, or an environment variable TF_VAR_name. A -var or -var-file on the command line wins over the files loaded automatically.
Interview card 3 of 6: How do you give a value to a Terraform variable, and which wins? · Download PNG · Open card page

Lesson: 33.3 Variables and tfvars — one code, many inputs

Why use outputs, and how do modules use them? An output prints a value after apply and stores it in state. Inside a parent configuration, a module’s outputs are read as module.name.output, so modules can pass values to each other.
Interview card 4 of 6: Why use outputs, and how do modules use them? · Download PNG · Open card page

Lesson: 33.4 Outputs — values you hand to people and other tools

What is the difference between a local and a variable? A variable is an input that users can set from outside (tfvars, -var). A local is a named value computed inside the code; nobody can set it from outside.
Interview card 5 of 6: What is the difference between a local and a variable? · Download PNG · Open card page

Lesson: 33.5 Locals — name a value once, use it everywhere

What is the difference between a data source and a resource? A resource creates, changes and deletes a real thing. A data source only reads something that already exists. Terraform never deletes what a data source reads.
Interview card 6 of 6: What is the difference between a data source and a resource? · Download PNG · Open card page

Lesson: 33.6 Data sources — read what already exists

Comparison cards

Variable vs local. Variable: an input to your Terraform code, set from outside.Local: a named value calculated inside the code.
Comparison card 1 of 3: Variable vs local · Download PNG · Open card page

Lesson: Chapter 33: Terraform Providers Resources Variables Outputs Locals and Data Sources

Data source vs resource. Resource: Terraform creates and owns it.Data source: Terraform only reads something that already exists.
Comparison card 2 of 3: Data source vs resource · Download PNG · Open card page

Lesson: Chapter 33: Terraform Providers Resources Variables Outputs Locals and Data Sources

Output vs variable. Variable: a value going into Terraform code.Output: a value coming out after apply.
Comparison card 3 of 3: Output vs variable · Download PNG · Open card page

Lesson: Chapter 33: Terraform Providers Resources Variables Outputs Locals and Data Sources