Skip to content

Commit 5f3e470

Browse files
authored
Merge pull request #9 from omartushevskyi/feature/app-insights-workspace-feature
feat: added Log Analytics workspace parameter
2 parents f409ffd + 82e3ea1 commit 5f3e470

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ No modules.
3737
| <a name="input_application_stack"></a> [application\_stack](#input\_application\_stack) | Application stack configuration, run `az webapp list-runtimes --os-type linux` to get the list of supported stacks | `map(string)` | <pre>{<br> "java_server": "JAVA",<br> "java_server_version": 11,<br> "java_version": "java11"<br>}</pre> | no |
3838
| <a name="input_application_type"></a> [application\_type](#input\_application\_type) | Application type (java, python, etc) | `string` | `"java"` | no |
3939
| <a name="input_enable_appinsights"></a> [enable\_appinsights](#input\_enable\_appinsights) | Enable application insights | `bool` | `true` | no |
40+
| <a name="input_appinsights_log_workspace_id"></a> [appinsights\_log\_workspace\_id](#input\_appinsights\_log\_workspace\_id) | Resource ID of Log Analytics workspace | `string` | `null` | no |
4041
| <a name="input_env"></a> [env](#input\_env) | Environment | `string` | n/a | yes |
4142
| <a name="input_identity_ids"></a> [identity\_ids](#input\_identity\_ids) | List of user assigned identity IDs | `list(string)` | `null` | no |
4243
| <a name="input_ip_restriction"></a> [ip\_restriction](#input\_ip\_restriction) | Firewall settings for the web app | <pre>list(object({<br> name = string<br> ip_address = string<br> service_tag = string<br> virtual_network_subnet_id = string<br> priority = string<br> action = string<br> headers = list(object({<br> x_azure_fdid = list(string)<br> x_fd_health_probe = list(string)<br> x_forwarded_for = list(string)<br> x_forwarded_host = list(string)<br> }))<br> }))</pre> | <pre>[<br> {<br> "action": "Allow",<br> "headers": null,<br> "ip_address": null,<br> "name": "allow_azure",<br> "priority": "100",<br> "service_tag": "AzureCloud",<br> "virtual_network_subnet_id": null<br> }<br>]</pre> | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ resource "azurerm_application_insights" "this" {
44
location = var.location
55
resource_group_name = var.resource_group
66
application_type = var.application_type
7+
workspace_id = var.appinsights_log_workspace_id
78
tags = var.tags
89
}
910

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,9 @@ variable "enable_appinsights" {
170170
description = "Enable application insights"
171171
default = true
172172
}
173+
174+
variable "appinsights_log_workspace_id" {
175+
type = string
176+
description = "Resource ID of Log Analytics Workspace"
177+
default = null
178+
}

0 commit comments

Comments
 (0)