WEBVTT

00:01.220 --> 00:02.220
Now

00:02.410 --> 00:04.880
let's take a look
at the configuration directory

00:05.320 --> 00:07.900
and the file naming conventions
used in Terraform.

00:09.060 --> 00:10.060
So far,

00:10.290 --> 00:12.930
we have been working
with a single configuration file

00:13.270 --> 00:14.760
called local.tf

00:15.330 --> 00:18.990
and this is within the directory
called terraform/local/file,

00:19.330 --> 00:21.180
which is our configuration directory.

00:22.140 --> 00:25.200
This directory is not limited
to one configuration file.

00:26.340 --> 00:28.290
We can create
another configuration file

00:28.450 --> 00:29.450
like this.

00:30.370 --> 00:31.560
The cat.tf

00:31.760 --> 00:33.970
is another configuration file
that makes use

00:34.140 --> 00:36.620
of the same
local_file resource.

00:37.510 --> 00:38.510
When applied,

00:38.680 --> 00:41.460
it will create a new file
called cat.txt.

00:42.630 --> 00:43.830
Terraform will consider

00:44.000 --> 00:47.920
any file with the .tf extension
within the configuration directory.

00:48.840 --> 00:50.040
Another common practice

00:50.210 --> 00:52.400
is to have
one single configuration file

00:52.660 --> 00:54.510
that contains all the resource blocks

00:54.680 --> 00:56.680
required
to provision the infrastructure.

00:57.170 --> 00:58.520
A single configuration file

00:58.870 --> 01:00.120
can have as many number

01:00.290 --> 01:02.300
of configuration blocks
that you need.

01:03.520 --> 01:06.690
A common naming convention
used for such a configuration file

01:07.090 --> 01:09.550
is to call it the main.tf.

01:10.440 --> 01:12.190
There are other configuration files

01:12.350 --> 01:14.300
that can be created
within the directory

01:14.480 --> 01:16.660
such as the variables.tf,

01:16.870 --> 01:17.920
outputs.tf,

01:18.080 --> 01:19.390
and providers.tf.

01:20.470 --> 01:24.270
We will talk more about these files
in the later sections of this course.

01:25.630 --> 01:28.190
Now
let's head over to the hands-on labs

01:28.420 --> 01:30.820
and explore working with providers.

