forked from asean-rssa/tf_azure_deployment
-
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.
- Loading branch information
Showing
12 changed files
with
142 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 @@ | ||
### Splunk quick demo | ||
|
||
http://20.212.33.56:8000 |
Binary file not shown.
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,5 @@ | ||
### adls_content module | ||
|
||
This module will create a storage account in specified rg, and create a container, and put a designated local file into the container. | ||
|
||
Ouput will be URL to that file in the container. |
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,48 @@ | ||
terraform { | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">=3.0.0" | ||
} | ||
random = { | ||
source = "hashicorp/random" | ||
version = ">=3.3.2" | ||
} | ||
local = { | ||
source = "hashicorp/local" | ||
version = ">=2.2.3" | ||
} | ||
} | ||
} | ||
|
||
resource "random_string" "naming" { | ||
special = false | ||
upper = false | ||
length = 6 | ||
} | ||
|
||
locals { | ||
storage_account_name = join("", ["adls", "${random_string.naming.result}"]) // must not have special chars | ||
} | ||
|
||
resource "azurerm_storage_account" "personaldropbox" { | ||
name = local.storage_account_name | ||
resource_group_name = var.rg | ||
location = var.storage_account_location | ||
account_tier = "Standard" | ||
account_replication_type = "LRS" | ||
} | ||
|
||
resource "azurerm_storage_container" "container1" { | ||
name = "cnt1" | ||
storage_account_name = azurerm_storage_account.personaldropbox.name | ||
container_access_type = "container" // for anonymous read container from public | ||
} | ||
|
||
resource "azurerm_storage_blob" "file1" { | ||
name = "splunk_setup.sh" | ||
storage_account_name = azurerm_storage_account.personaldropbox.name | ||
storage_container_name = azurerm_storage_container.container1.name | ||
type = "Block" | ||
source = var.local_file_path | ||
} |
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,3 @@ | ||
output "file_url" { | ||
value = azurerm_storage_blob.file1.url | ||
} |
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,13 @@ | ||
variable "rg" { | ||
type = string | ||
} | ||
|
||
variable "local_file_path" { | ||
type = string | ||
default = "" | ||
} | ||
|
||
variable "storage_account_location" { | ||
type = string | ||
default = "southeastasia" | ||
} |
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,4 @@ | ||
sudo apt update | ||
sudo apt install docker.io -y | ||
sudo apt install docker-compose -y | ||
sudo docker run -d -p 8000:8000 -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_PASSWORD=password" -e "SPLUNK_APPS_URL=https://jlaw-public-db.s3.ap-southeast-1.amazonaws.com/databricks-add-on-for-splunk_110.tgz" --name splunk splunk/splunk:latest |
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