-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'marvinbuss/ai_studio_tst' of https://github.com/Perfect…
…ThymeTech/terraform-azurerm-modules into marvinbuss/ai_studio_tst
- Loading branch information
Showing
25 changed files
with
288 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: databricksaccessconnector tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "modules/databricksaccessconnector/**" | ||
- ".github/workflows/terraform-databricksaccessconnector.yml" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "modules/databricksaccessconnector/**" | ||
- ".github/workflows/terraform-databricksaccessconnector.yml" | ||
|
||
jobs: | ||
terraform_dev: | ||
uses: ./.github/workflows/_terraformTestTemplate.yml | ||
name: "Dev" | ||
with: | ||
environment: "dev" | ||
config: "databricksaccessconnector" | ||
terraform_version: "1.9.8" | ||
node_version: 20 | ||
tenant_id: "37963dd4-f4e6-40f8-a7d6-24b97919e452" | ||
subscription_id: "1fdab118-1638-419a-8b12-06c9543714a0" | ||
secrets: | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
run "create_appserviceplan" { | ||
command = apply | ||
|
||
variables { | ||
location = "northeurope" | ||
resource_group_name = "tfmodule-test-rg" | ||
tags = { | ||
test = "appserviceplan" | ||
} | ||
service_plan_name = "tftstr-asp002" | ||
service_plan_maximum_elastic_worker_count = null | ||
service_plan_os_type = "Linux" | ||
service_plan_per_site_scaling_enabled = false | ||
service_plan_sku_name = "Y1" | ||
service_plan_worker_count = 1 | ||
service_plan_zone_balancing_enabled = false | ||
diagnostics_configurations = [] | ||
} | ||
|
||
assert { | ||
condition = azurerm_service_plan.service_plan.resource_group_name == "tfmodule-test-rg" | ||
error_message = "Failed to deploy." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
# Azure Databricks Terraform Module | ||
|
||
## Documentation | ||
<!-- markdownlint-disable MD033 --> | ||
|
||
## Requirements | ||
|
||
The following requirements are needed by this module: | ||
|
||
- <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) (>=0.12) | ||
|
||
- <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) (~> 4.0) | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
<!-- markdownlint-disable MD013 --> | ||
<!-- markdownlint-disable MD034 --> | ||
## Required Inputs | ||
|
||
The following input variables are required: | ||
|
||
### <a name="input_databricks_access_connector_name"></a> [databricks\_access\_connector\_name](#input\_databricks\_access\_connector\_name) | ||
|
||
Description: Specifies the name of the Azure Databricks workspace. | ||
|
||
Type: `string` | ||
|
||
### <a name="input_location"></a> [location](#input\_location) | ||
|
||
Description: Specifies the location of all resources. | ||
|
||
Type: `string` | ||
|
||
### <a name="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name) | ||
|
||
Description: Specifies the resource group name in which all resources will get deployed. | ||
|
||
Type: `string` | ||
|
||
## Optional Inputs | ||
|
||
The following input variables are optional (have default values): | ||
|
||
### <a name="input_diagnostics_configurations"></a> [diagnostics\_configurations](#input\_diagnostics\_configurations) | ||
|
||
Description: Specifies the diagnostic configuration for the service. | ||
|
||
Type: | ||
|
||
```hcl | ||
list(object({ | ||
log_analytics_workspace_id = optional(string, ""), | ||
storage_account_id = optional(string, "") | ||
})) | ||
``` | ||
|
||
Default: `[]` | ||
|
||
### <a name="input_tags"></a> [tags](#input\_tags) | ||
|
||
Description: Specifies a key value map of tags to set on every taggable resources. | ||
|
||
Type: `map(string)` | ||
|
||
Default: `{}` | ||
|
||
## Outputs | ||
|
||
The following outputs are exported: | ||
|
||
### <a name="output_databricks_access_connector_id"></a> [databricks\_access\_connector\_id](#output\_databricks\_access\_connector\_id) | ||
|
||
Description: Specifies the resource id of the Azure Databricks access connector. | ||
|
||
### <a name="output_databricks_access_connector_name"></a> [databricks\_access\_connector\_name](#output\_databricks\_access\_connector\_name) | ||
|
||
Description: Specifies the resource name of the Azure Databricks access connector. | ||
|
||
### <a name="output_databricks_access_connector_principal_id"></a> [databricks\_access\_connector\_principal\_id](#output\_databricks\_access\_connector\_principal\_id) | ||
|
||
Description: Specifies the principal id of the Azure Databricks access connector. | ||
|
||
<!-- markdownlint-enable --> | ||
|
||
<!-- END_TF_DOCS --> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Azure Databricks Terraform Module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resource "azurerm_databricks_access_connector" "databricks_access_connector" { | ||
name = var.databricks_access_connector_name | ||
location = var.location | ||
resource_group_name = var.resource_group_name | ||
tags = var.tags | ||
identity { | ||
type = "SystemAssigned" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
output "databricks_access_connector_id" { | ||
description = "Specifies the resource id of the Azure Databricks access connector." | ||
value = azurerm_databricks_access_connector.databricks_access_connector.id | ||
sensitive = false | ||
} | ||
|
||
output "databricks_access_connector_name" { | ||
description = "Specifies the resource name of the Azure Databricks access connector." | ||
value = azurerm_databricks_access_connector.databricks_access_connector.name | ||
sensitive = false | ||
} | ||
|
||
output "databricks_access_connector_principal_id" { | ||
description = "Specifies the principal id of the Azure Databricks access connector." | ||
value = azurerm_databricks_access_connector.databricks_access_connector.identity[0].principal_id | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
terraform { | ||
required_version = ">=0.12" | ||
|
||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "~> 4.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
run "create_databricks_access_connector" { | ||
command = apply | ||
|
||
variables { | ||
location = "northeurope" | ||
resource_group_name = "tfmodule-test-rg" | ||
tags = { | ||
test = "databricks_access_connector" | ||
} | ||
databricks_access_connector_name = "tftstdbac001" | ||
diagnostics_configurations = [] | ||
} | ||
|
||
assert { | ||
condition = azurerm_databricks_access_connector.databricks_access_connector.resource_group_name == "tfmodule-test-rg" | ||
error_message = "Failed to deploy." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# General variables | ||
variable "location" { | ||
description = "Specifies the location of all resources." | ||
type = string | ||
sensitive = false | ||
nullable = false | ||
} | ||
|
||
variable "resource_group_name" { | ||
description = "Specifies the resource group name in which all resources will get deployed." | ||
type = string | ||
sensitive = false | ||
nullable = false | ||
validation { | ||
condition = length(var.resource_group_name) >= 2 | ||
error_message = "Please specify a valid resource group name." | ||
} | ||
} | ||
|
||
variable "tags" { | ||
description = "Specifies a key value map of tags to set on every taggable resources." | ||
type = map(string) | ||
sensitive = false | ||
nullable = false | ||
default = {} | ||
} | ||
|
||
# Service variables | ||
variable "databricks_access_connector_name" { | ||
description = "Specifies the name of the Azure Databricks workspace." | ||
type = string | ||
sensitive = false | ||
nullable = false | ||
validation { | ||
condition = length(var.databricks_access_connector_name) >= 2 | ||
error_message = "Please specify a valid name." | ||
} | ||
} | ||
|
||
# Diagnostics variables | ||
variable "diagnostics_configurations" { | ||
description = "Specifies the diagnostic configuration for the service." | ||
type = list(object({ | ||
log_analytics_workspace_id = optional(string, ""), | ||
storage_account_id = optional(string, "") | ||
})) | ||
sensitive = false | ||
nullable = false | ||
default = [] | ||
validation { | ||
condition = alltrue([ | ||
length([for diagnostics_configuration in toset(var.diagnostics_configurations) : diagnostics_configuration if diagnostics_configuration.log_analytics_workspace_id == "" && diagnostics_configuration.storage_account_id == ""]) <= 0 | ||
]) | ||
error_message = "Please specify a valid resource ID." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.