Skip to content

Commit

Permalink
Merge pull request #3 from data-platform-hq/fix_outputs
Browse files Browse the repository at this point in the history
fix: azure outputs
  • Loading branch information
owlleg6 authored Feb 3, 2023
2 parents 16e204c + 4bf0738 commit 89e6fb6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Terraform module for creation Azure Log Analytics Workspace
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 3.23.0 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 3.40.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.24.0 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.40.0 |

## Modules

Expand All @@ -31,21 +31,23 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_env"></a> [env](#input\_env) | Environment name | `string` | n/a | yes |
| <a name="input_location"></a> [location](#input\_location) | Specifies the supported Azure location where the resource exists | `string` | n/a | yes |
| <a name="input_project"></a> [project](#input\_project) | Project name | `string` | n/a | yes |
| <a name="input_env"></a> [env](#input\_env) | Environment name | `string` | n/a | yes |
| <a name="input_resource_group"></a> [resource\_group](#input\_resource\_group) | The name of the resource group in which the Log Analytics workspace is created | `string` | n/a | yes |
| <a name="input_retention_in_days"></a> [retention\_in\_days](#input\_retention\_in\_days) | Specifies the supported Azure location where the resource exists | `number` | `30` | no |
| <a name="input_sku"></a> [sku](#input\_sku) | Log Analytics Workspace | `string` | `"PerGB2018"` | no |
| <a name="input_location"></a> [location](#input\_location) | Azure location | `string` | n/a | yes |
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags to assign to the resource | `map(string)` | `{}` | no |
| <a name="input_retention_in_days"></a> [retention\_in\_days](#input\_retention\_in\_days) | The workspace data retention in days | `number` | `30` | no |
| <a name="input_sku"></a> [sku](#input\_sku) | Log Analytics Workspace sku | `string` | `"PerGB2018"` | no |

## Outputs

| Name | Description |
|----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| <a name="output_log_analytics_primary_shared_key"></a> [log\_analytics\_primary\_shared\_key](#output\_log\_analytics\_primary\_shared\_key) | The Primary shared key for the Log Analytics Workspace |
| <a name="output_log_analytics_workspace_id"></a> [log\_analytics\_workspace\_id](#output\_log\_analytics\_workspace\_id) | The Log Analytics Workspace ID |
| <a name="output_name_to_id_map"></a> [name\_to\_id\_map](#output\_name\_to\_id\_map) | Map of Virtual Network Name to Id |
| <a name="output_id"></a> [id](#output\_id) | The Log Analytics Workspace ID |
| <a name="output_name"></a> [name](#output\_name) | The Log Analytics Workspace Name |
| <a name="output_primary_shared_key"></a> [primary\_shared\_key](#output\_primary\_shared\_key) | The Primary shared key for the Log Analytics Workspace |
| <a name="output_name_to_id_map"></a> [name\_to\_id\_map](#output\_name\_to\_id\_map) | Map of Log Analytics Workspace Name to Id |

<!-- END_TF_DOCS -->

## License
Expand Down
11 changes: 8 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
output "log_analytics_workspace_id" {
output "id" {
value = azurerm_log_analytics_workspace.this.id
description = "The Log Analytics Workspace ID"
}

output "log_analytics_primary_shared_key" {
output "name" {
value = azurerm_log_analytics_workspace.this.name
description = "The Log Analytics Workspace Name"
}

output "primary_shared_key" {
value = azurerm_log_analytics_workspace.this.primary_shared_key
description = "The Primary shared key for the Log Analytics Workspace"
}

output "name_to_id_map" {
value = { (azurerm_log_analytics_workspace.this.name) = azurerm_log_analytics_workspace.this.id }
description = "Map of Virtual Network Name to Id"
description = "Map of Log Analytics Workspace Name to Id"
}
6 changes: 2 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Required
variable "project" {
type = string
description = "Project name"
Expand All @@ -25,15 +24,14 @@ variable "tags" {
default = {}
}

# Optional
variable "retention_in_days" {
type = number
description = "Specifies the supported Azure location where the resource exists"
description = "The workspace data retention in days"
default = 30
}

variable "sku" {
type = string
description = "Log Analytics Workspace"
description = "Log Analytics Workspace sku"
default = "PerGB2018"
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.23.0"
version = ">= 3.40.0"
}
}
}

0 comments on commit 89e6fb6

Please sign in to comment.