Skip to content

Commit

Permalink
update with linux.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaentz committed Jun 26, 2022
1 parent 398c60c commit 597ef6a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions automated_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The only real way to test infrastructure code beyond static analysis is by deplo

## Task 1: Write a Terraform Module

First, ensure you are in the `~/workstation/terraform/` directory in your workstation. Inside of the `~/workstation/terraform/` directory create a `testing_lab` folder add the following Terraform configuration files, using this structure.
First, ensure you are in the `~/workstation/terraform/` directory on your workstation. Inside of the `~/workstation/terraform/` directory create a `testing_lab` folder add a `main.tf` calling a module that we will be writing and testing.

### Root Module
```shell
Expand Down Expand Up @@ -45,27 +45,28 @@ Create a Module for building a Linux VM with a Flask Application that will be th

```shell
mkdir -p ~/workstation/terraform/testing_lab/modules/my_linux_vm
touch ~/workstation/terraform/testing_lab/modules/my_linux_vm/{main,variables,outputs,terraform}.tf
touch ~/workstation/terraform/testing_lab/modules/my_linux_vm/{linux,variables,outputs,terraform}.tf
touch ~/workstation/terraform/testing_lab/modules/my_linux_vm/hello.py
```

The structure for this module testing will look similar:
The structure for this module testing will look similar to the following file layout:

```sh
testing_lab
├── main.tf
├── modules
│ └── my_linux_vm
| └── main.tf
| └── linux.tf
| └── variables.tf
| └── outputs.tf
| └── hello.py
├── terraform.tfvars
└── variables.tf
```

Insided the `my_linux_vm` directory update the terraform configuration files as follows:

`main.tf`
`linux.tf`
```terraform
provider azurerm {
features {}
Expand Down

0 comments on commit 597ef6a

Please sign in to comment.