Skip to content

Commit 4eee769

Browse files
authored
DTOSS-0000: Update the terraform docs (#243)
1 parent f9a6185 commit 4eee769

File tree

3 files changed

+103
-3
lines changed

3 files changed

+103
-3
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ Make sure to link all modules from this README.
6767

6868
## Alerts
6969

70-
Alerting exists on both container app and postgres modules.
71-
72-
To enable alerting on container app or postgres.
70+
To enable alerting (example here on container app)
7371
- Set `enable_alerting = true`.
7472
- Severity are 0 = Critical, 1 = Error, 2 = Warning, 3 = informational and 4 = verbose
7573

infrastructure/modules/container-app/tfdocs.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,38 @@ Type: `string`
4848

4949
Default: `null`
5050

51+
### <a name="input_action_group_id"></a> [action\_group\_id](#input\_action\_group\_id)
52+
53+
Description: ID of the action group to notify.
54+
55+
Type: `string`
56+
57+
Default: `null`
58+
59+
### <a name="input_alert_cpu_threshold"></a> [alert\_cpu\_threshold](#input\_alert\_cpu\_threshold)
60+
61+
Description: If alerting is enabled this will control what the cpu threshold will be, default will be 80.
62+
63+
Type: `number`
64+
65+
Default: `80`
66+
67+
### <a name="input_alert_memory_threshold"></a> [alert\_memory\_threshold](#input\_alert\_memory\_threshold)
68+
69+
Description: If alerting is enabled this will control what the memory threshold will be, default will be 80.
70+
71+
Type: `number`
72+
73+
Default: `80`
74+
75+
### <a name="input_alert_window_size"></a> [alert\_window\_size](#input\_alert\_window\_size)
76+
77+
Description: The period of time that is used to monitor alert activity e.g. PT1M, PT5M, PT15M, PT30M, PT1H, PT6H, PT12H. The interval between checks is adjusted accordingly.
78+
79+
Type: `string`
80+
81+
Default: `"PT5M"`
82+
5183
### <a name="input_app_key_vault_id"></a> [app\_key\_vault\_id](#input\_app\_key\_vault\_id)
5284

5385
Description: ID of the key vault to store app secrets. Each secret is mapped to an environment variable. Required when fetch\_secrets\_from\_app\_key\_vault is true.
@@ -56,6 +88,14 @@ Type: `string`
5688

5789
Default: `null`
5890

91+
### <a name="input_enable_alerting"></a> [enable\_alerting](#input\_enable\_alerting)
92+
93+
Description: Whether monitoring and alerting is enabled for the PostgreSQL Flexible Server.
94+
95+
Type: `bool`
96+
97+
Default: `false`
98+
5999
### <a name="input_enable_auth"></a> [enable\_auth](#input\_enable\_auth)
60100

61101
Description: Enable authentication for the container app. If true, the app will use Azure AD authentication.
@@ -170,6 +210,14 @@ Type: `number`
170210

171211
Default: `8080`
172212

213+
### <a name="input_replica_restart_alert_threshold"></a> [replica\_restart\_alert\_threshold](#input\_replica\_restart\_alert\_threshold)
214+
215+
Description: The replica restart alert threshold, default will be 1.
216+
217+
Type: `number`
218+
219+
Default: `1`
220+
173221
### <a name="input_secret_variables"></a> [secret\_variables](#input\_secret\_variables)
174222

175223
Description: Secret environment variables to pass to the container app.
@@ -243,6 +291,9 @@ The following resources are used by this module:
243291

244292
- [azapi_resource.auth](https://registry.terraform.io/providers/azure/azapi/2.5.0/docs/resources/resource) (resource)
245293
- [azurerm_container_app.main](https://registry.terraform.io/providers/hashicorp/azurerm/4.34.0/docs/resources/container_app) (resource)
294+
- [azurerm_monitor_metric_alert.cpu](https://registry.terraform.io/providers/hashicorp/azurerm/4.34.0/docs/resources/monitor_metric_alert) (resource)
295+
- [azurerm_monitor_metric_alert.memory](https://registry.terraform.io/providers/hashicorp/azurerm/4.34.0/docs/resources/monitor_metric_alert) (resource)
296+
- [azurerm_monitor_metric_alert.replica_restart_alert](https://registry.terraform.io/providers/hashicorp/azurerm/4.34.0/docs/resources/monitor_metric_alert) (resource)
246297
- [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/4.34.0/docs/data-sources/client_config) (data source)
247298
- [azurerm_key_vault.infra](https://registry.terraform.io/providers/hashicorp/azurerm/4.34.0/docs/data-sources/key_vault) (data source)
248299
- [azurerm_key_vault_secret.infra](https://registry.terraform.io/providers/hashicorp/azurerm/4.34.0/docs/data-sources/key_vault_secret) (data source)

infrastructure/modules/postgresql-flexible/tfdocs.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ Type: `string`
117117

118118
The following input variables are optional (have default values):
119119

120+
### <a name="input_action_group_id"></a> [action\_group\_id](#input\_action\_group\_id)
121+
122+
Description: ID of the action group to notify.
123+
124+
Type: `string`
125+
126+
Default: `null`
127+
120128
### <a name="input_admin_identities"></a> [admin\_identities](#input\_admin\_identities)
121129

122130
Description: List of managed identities modules with admin access to the postgres server. The managed identity must have the Directory.Read.All permission.
@@ -133,6 +141,46 @@ Type: `string`
133141

134142
Default: `null`
135143

144+
### <a name="input_alert_cpu_threshold"></a> [alert\_cpu\_threshold](#input\_alert\_cpu\_threshold)
145+
146+
Description: If alerting is enabled this will control what the cpu threshold will be, default will be 80.
147+
148+
Type: `number`
149+
150+
Default: `80`
151+
152+
### <a name="input_alert_memory_threshold"></a> [alert\_memory\_threshold](#input\_alert\_memory\_threshold)
153+
154+
Description: If alerting is enabled this will control what the memory threshold will be, default will be 80.
155+
156+
Type: `number`
157+
158+
Default: `80`
159+
160+
### <a name="input_alert_storage_threshold"></a> [alert\_storage\_threshold](#input\_alert\_storage\_threshold)
161+
162+
Description: If alerting is enabled this will control what the storage threshold will be, default will be 80.
163+
164+
Type: `number`
165+
166+
Default: `80`
167+
168+
### <a name="input_alert_window_size"></a> [alert\_window\_size](#input\_alert\_window\_size)
169+
170+
Description: The period of time that is used to monitor alert activity e.g. PT1M, PT5M, PT15M, PT30M, PT1H, PT6H, PT12H. The interval between checks is adjusted accordingly.
171+
172+
Type: `string`
173+
174+
Default: `"PT5M"`
175+
176+
### <a name="input_enable_alerting"></a> [enable\_alerting](#input\_enable\_alerting)
177+
178+
Description: Whether monitoring and alerting is enabled for the PostgreSQL Flexible Server.
179+
180+
Type: `bool`
181+
182+
Default: `false`
183+
136184
### <a name="input_key_vault_admin_pwd_secret_name"></a> [key\_vault\_admin\_pwd\_secret\_name](#input\_key\_vault\_admin\_pwd\_secret\_name)
137185

138186
Description: Key Vault secret name in which to store the Admin password, if one is created.
@@ -251,6 +299,9 @@ Description: n/a
251299
The following resources are used by this module:
252300

253301
- [azurerm_key_vault_secret.db_admin_pwd](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) (resource)
302+
- [azurerm_monitor_metric_alert.cpu](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_metric_alert) (resource)
303+
- [azurerm_monitor_metric_alert.memory](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_metric_alert) (resource)
304+
- [azurerm_monitor_metric_alert.storage](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_metric_alert) (resource)
254305
- [azurerm_postgresql_flexible_server.postgresql_flexible_server](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server) (resource)
255306
- [azurerm_postgresql_flexible_server_active_directory_administrator.admin_identity](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server_active_directory_administrator) (resource)
256307
- [azurerm_postgresql_flexible_server_active_directory_administrator.postgresql_admin](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server_active_directory_administrator) (resource)

0 commit comments

Comments
 (0)