Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #16

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,27 @@ To complete this task, Terraform and Azure CLI must be installed and configured
**2. Create Directory Structure**

- Create the following directory structure:
![alt text](image.png)
```
/
├─ modules/
│ ├─ network/
│ │ ├─ main.tf
│ │ ├─ variables.tf
│ │ └─ outputs.tf
│ ├─ compute/
│ │ ├─ main.tf
│ │ ├─ variables.tf
│ │ └─ outputs.tf
│ └─ storage/
│ ├─ main.tf
│ ├─ variables.tf
│ └─ outputs.tf
├─ main.tf
├─ variables.tf
├─ outputs.tf
├─ terraform.tfvars
└─ backend.tf
```

**3. Define Network Module**

Expand All @@ -28,7 +48,7 @@ To complete this task, Terraform and Azure CLI must be installed and configured
- The compute module will create a network interface, virtual machine, and VM extension for deploying the ToDo List application.
* Network Interface: name it `${var.vm_name}-nic`.
* Virtual Machine: name it `matebox`, image `Ubuntu2204`, size `Standard_B1s`, SSH key `linuxboxsshkey`.
* VM Extension: use `CustomScript` extension to execute `install-app.sh` script.
* VM Extension: use the `CustomScript` extension to execute `install-app.sh` script.


**5. Define Storage Module**
Expand All @@ -39,15 +59,15 @@ To complete this task, Terraform and Azure CLI must be installed and configured

**6. Configure Remote State Backend**

- Define the backend configuration in backend.tf to store the state in Azure Blob Storage. Use the following parameters:
- Define the backend configuration in `backend.tf` to store the state in Azure Blob Storage. Use the following parameters:
* Resource Group: `mate-azure-task-12`.
* Storage Account: `yourstorageaccount`.
* Container Name: `tfstate`.
* Key: `terraform.tfstate`.
- Ensure that you have a storage account and container created for the remote state. This can be included in your `main.tf` or managed separately.

**7. Use Modules in Main Configuration**
- Define variables in variables.tf with the following parameters:
- Define variables in `variables.tf` with the following parameters:
* location: `uksouth`.
* resource_group_name: `mate-azure-task-12`.
* virtual_network_name: `vnet`.
Expand Down
Loading