Now
let's take a look at the configuration directory
and the file naming conventions used in Terraform.
So far,
we have been working with a single configuration file
called local.tf
and this is within the directory called terraform/local/file,
which is our configuration directory.
This directory is not limited to one configuration file.
We can create another configuration file
like this.
The cat.tf
is another configuration file that makes use
of the same local_file resource.
When applied,
it will create a new file called cat.txt.
Terraform will consider
any file with the .tf extension within the configuration directory.
Another common practice
is to have one single configuration file
that contains all the resource blocks
required to provision the infrastructure.
A single configuration file
can have as many number
of configuration blocks that you need.
A common naming convention used for such a configuration file
is to call it the main.tf.
There are other configuration files
that can be created within the directory
such as the variables.tf,
outputs.tf,
and providers.tf.
We will talk more about these files in the later sections of this course.
Now let's head over to the hands-on labs
and explore working with providers.