You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<palign="right">(<ahref="#readme-top">back to top</a>)</p>
@@ -101,66 +107,112 @@ To get a local copy up and running, follow these instructions.
101
107
102
108
### Prerequisites
103
109
104
-
- Azure CLI (`az`)
105
-
- Terraform ≥ 1.5
106
-
- Ansible ≥ 2.15
107
-
- Python 3 with `msrestazure`, `azure-cli-core`, `requests`
108
-
- SSH key pair
110
+
Most dependencies are installed automatically in the GitHub Actions workflow. However, for local development or debugging, ensure you have the following:
109
111
110
-
### Setup
112
+
- 🖥️ Azure CLI (`az`)
113
+
- 📦 Terraform ≥ 1.5
114
+
- ⚙️ Ansible ≥ 2.15
115
+
- 🔐 SSH key pair for accessing virtual machines
116
+
- 📦 Node.js ≥ 14 and npm (required for both frontend and backend)
117
+
- 📚 `zip` utility (used to package the frontend app)
118
+
- ☁️ Azure Service Principal credentials (used by the workflow):
119
+
-`ARM_CLIENT_ID`
120
+
-`ARM_CLIENT_SECRET`
121
+
-`ARM_TENANT_ID`
122
+
-`ARM_SUBSCRIPTION_ID`
123
+
- 💡 *(Optional)* GitHub CLI (`gh`) – useful for managing secrets or manually triggering workflows
You can modify the following variables to adapt the deployment to your needs. These are defined in the Terraform configuration files:
170
+
171
+
### `infra/terraform.tfvars`
172
+
173
+
```hcl
174
+
allowed_ssh_ip = "186.155.19.140/32" # IP allowed to access VMs via SSH
175
+
mysql_user = "mysqladmin" # MySQL admin user
176
+
mysql_admin_password = "Sec#reP@ssword123!" # MySQL admin password
177
+
178
+
variable "location" {
179
+
default = "westus2" # Azure region to deploy resources
180
+
}
181
+
182
+
variable "admin_username" {
183
+
default = "myadminuser" # Admin username for virtual machines
184
+
}
185
+
186
+
variable "lb_api_port" {
187
+
default = 8080 # API port exposed by Load Balancer
188
+
}
189
+
```
190
+
---
191
+
## ☁️ Remote Terraform State in Azure <aname="remote-state"></a>
192
+
193
+
Terraform uses remote state storage to persist infrastructure state across executions and team members.
194
+
195
+
This project stores the Terraform state file (`terraform.tfstate`) securely in an **Azure Storage Account** using a backend configuration like the following:
0 commit comments