Skip to content

Commit

Permalink
feat: initial module (#1)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
hknutsen and github-actions[bot] authored Aug 30, 2022
1 parent 883ccb5 commit fa19192
Show file tree
Hide file tree
Showing 13 changed files with 1,062 additions and 11 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Azure Foobar Terraform module
# Azure Databricks Terraform module

Terraform module which creates an Azure Foobar resource.
Terraform module which creates an Azure Databricks workspace.

<!-- BEGIN_TF_DOCS -->
## Requirements
Expand All @@ -12,25 +12,36 @@ Terraform module which creates an Azure Foobar resource.

## Providers

No providers.
| Name | Version |
|------|---------|
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | >= 3.0.0 |

## Modules

No modules.

## Resources

No resources.
| Name | Type |
|------|------|
| [azurerm_databricks_workspace.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace) | resource |
| [azurerm_monitor_diagnostic_setting.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_diagnostic_setting) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_location"></a> [location](#input\_location) | The location to create the resources in. | `string` | n/a | yes |
| <a name="input_log_analytics_workspace_id"></a> [log\_analytics\_workspace\_id](#input\_log\_analytics\_workspace\_id) | The ID of the Log Analytics workspace to send diagnostics to. | `string` | n/a | yes |
| <a name="input_managed_resource_group_name"></a> [managed\_resource\_group\_name](#input\_managed\_resource\_group\_name) | The name of the resource group to create the managed Databricks resources in. | `string` | `null` | no |
| <a name="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name) | The name of the resource group to create the resources in. | `string` | n/a | yes |
| <a name="input_sku"></a> [sku](#input\_sku) | The SKU of this Databricks workspace. | `string` | `"standard"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to assign to the resources. | `map(string)` | `{}` | no |
| <a name="input_workspace_name"></a> [workspace\_name](#input\_workspace\_name) | The name of this Databricks workspace. | `string` | n/a | yes |

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_workspace_id"></a> [workspace\_id](#output\_workspace\_id) | The ID of this Databricks workspace. |
<!-- END_TF_DOCS -->
5 changes: 2 additions & 3 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Basic example

Terraform configuration which creates an Azure Foobar resource with the following features:
Terraform configuration which creates an Azure Databricks workspace with the following features:

- Feature 1
- Feature 2
- Standard SKU
16 changes: 13 additions & 3 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@ resource "azurerm_resource_group" "this" {
location = var.location
}

module "foobar" {
# source = "github.com/equinor/terraform-azurerm-foobar"
source = "../.."
module "log_analytics" {
source = "github.com/equinor/terraform-azurerm-log-analytics?ref=v1.1.0"

workspace_name = "log-${random_id.this.hex}"
resource_group_name = azurerm_resource_group.this.name
location = azurerm_resource_group.this.location
}

module "databricks" {
# source = "github.com/equinor/terraform-azurerm-databricks"
source = "../.."

workspace_name = "dbw-${random_id.this.hex}"
resource_group_name = azurerm_resource_group.this.name
location = azurerm_resource_group.this.location
log_analytics_workspace_id = module.log_analytics.workspace_id
}
7 changes: 7 additions & 0 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Complete example

Terraform configuration which creates an Azure Databricks workspace with the following features:

- Premium SKU
- Custom managed resource group name
- Export diagnostic logs to log analytics workspace
44 changes: 44 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
provider "azurerm" {
features {}
}

locals {
tags = {
Environment = "Test"
}
}

resource "random_id" "this" {
byte_length = 8
}

resource "azurerm_resource_group" "this" {
name = "rg-${random_id.this.hex}"
location = var.location

tags = local.tags
}

module "log_analytics" {
source = "github.com/equinor/terraform-azurerm-log-analytics?ref=v1.1.0"

workspace_name = "log-${random_id.this.hex}"
resource_group_name = azurerm_resource_group.this.name
location = azurerm_resource_group.this.location

tags = local.tags
}

module "databricks" {
# source = "github.com/equinor/terraform-azurerm-databricks"
source = "../.."

workspace_name = "dbw-${random_id.this.hex}"
resource_group_name = azurerm_resource_group.this.name
location = azurerm_resource_group.this.location
sku = "premium"
managed_resource_group_name = "rg-dbw-${random_id.this.hex}"
log_analytics_workspace_id = module.log_analytics.workspace_id

tags = local.tags
}
Empty file added examples/complete/outputs.tf
Empty file.
5 changes: 5 additions & 0 deletions examples/complete/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "location" {
description = "The location to create the resources in."
type = string
default = "northeurope"
}
Loading

0 comments on commit fa19192

Please sign in to comment.