Skip to content

Commit

Permalink
var naming clean up for splunk
Browse files Browse the repository at this point in the history
  • Loading branch information
hwang-db committed Jun 29, 2022
1 parent 7e53ac5 commit abcc9ac
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 36 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ Azure Databricks deployment patterns:
3. `adb-private-links`, Azure Databricks workspace with multiple private links and firewall: Data Plane - Control Plane PL, Data Plane - DBFS PL.
4. `adb-with-squid-proxy`, Azure Databricks workspace, with squid proxy to filter outbound traffic, decoupling data exfiltration costs from data volume.
5. `adb-service-endpoint-policy-experiment`, an experimental setup with service endpoint policy, this setup is just for reference and trial using SEP. Granular egress outbound control through SEP is not directly supported.
6. `adb-trino-delta-connector`, a POC setup to show Trino-Delta Connector.
6. `adb-trino-delta-connector`, a POC setup to show Trino-Delta Connector.
7. `adb-splunk`, a POC setup to show Splunk-Databricks connector, referring to https://github.com/databrickslabs/splunk-integration.
9 changes: 8 additions & 1 deletion adb-splunk/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion adb-splunk/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
### Splunk quick demo

on macOS
find ./ -type f -exec sed -i '' -e 's/file2/splunk_setup_file/' {} \;
http://20.212.33.56:8000
Empty file.
Empty file.
Empty file.
8 changes: 4 additions & 4 deletions adb-splunk/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ resource "azurerm_resource_group" "this" {
tags = local.tags
}

// step 1 create storage account and container
// step 1 create storage account and container from module
module "adls_content" {
source = "./modules/adls_content"
rg = azurerm_resource_group.this.name
storage_account_location = var.rglocation
}

// step 2 create local file of scripts
// step 2 create local file of bootstrap scripts, explicitly depends_on adls container
resource "local_file" "setupscript" {
content = <<EOT
#! /bin/bash
Expand All @@ -63,8 +63,8 @@ resource "local_file" "setupscript" {
]
}

// step 3 upload scripts and artifacts onto container
resource "azurerm_storage_blob" "file1" {
// step 3 upload scripts and artifacts onto container, explicitly depends_on script to be generated first at local
resource "azurerm_storage_blob" "splunk_setup_file" {
name = "splunk_setup.sh"
storage_account_name = module.adls_content.storage_name
storage_container_name = module.adls_content.container_name
Expand Down
24 changes: 2 additions & 22 deletions adb-splunk/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
output "public_key" {
value = tls_private_key.splunk_ssh.public_key_openssh
}

output "arm_client_id" {
value = data.azurerm_client_config.current.client_id
}

output "arm_subscription_id" {
value = data.azurerm_client_config.current.subscription_id
}

output "arm_tenant_id" {
value = data.azurerm_client_config.current.tenant_id
}

output "azure_region" {
value = local.location
}

output "resource_group" {
value = azurerm_resource_group.this.name
output "splunk_public_ip" {
value = azurerm_public_ip.splunk-nic-pubip.ip_address
}
5 changes: 0 additions & 5 deletions adb-splunk/splunk_setup.sh

This file was deleted.

4 changes: 2 additions & 2 deletions adb-splunk/splunkvm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ resource "azurerm_linux_virtual_machine" "example" {
local_file.private_key,
local_file.setupscript,
module.adls_content,
azurerm_storage_blob.file1,
azurerm_storage_blob.splunk_setup_file,
azurerm_storage_blob.splunk_databricks_app_file
]
}
Expand All @@ -83,7 +83,7 @@ resource "azurerm_virtual_machine_extension" "splunksetupagent" {

depends_on = [
azurerm_linux_virtual_machine.example,
azurerm_storage_blob.file1,
azurerm_storage_blob.splunk_setup_file,
azurerm_storage_blob.splunk_databricks_app_file
]
}

0 comments on commit abcc9ac

Please sign in to comment.