Guest User

Splunk Terraform Provider with Cloud SQL Setup

a guest
Oct 20th, 2025
222
0
Never
11
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.19 KB | None | 0 0
  1. # Define the required providers
  2. terraform {
  3. required_providers {
  4. splunk = {
  5. source = "splunk/splunk"
  6. version = "1.4.32"
  7. }
  8. google = {
  9. source = "hashicorp/google"
  10. version = "7.7.0"
  11. }
  12. }
  13. }
  14.  
  15. # Configure the Google provider
  16. provider "google" {
  17. project = "my-project-id"
  18. region = "us-central1"
  19. }
  20. # Configure the Splunk provider
  21. provider "splunk" {
  22. url = "https://your-splunk-instance.com:8089" # Replace with your Splunk management port URL
  23. username = "admin" # Replace with your Splunk username
  24. password = "your_password" # Replace with your Splunk password or use environment variables
  25. insecure_skip_verify = true # Set to false in production for certificate verification
  26. }
  27.  
  28. # Example resource: Create or manage a stanza in a configuration file
  29. resource "splunk_configs_conf" "my_custom_stanza" {
  30. name = "props/my_custom_stanza" # Format: {conf_file_name}/{stanza_name}
  31. variables = {
  32. "FIELDALIAS-my_field" = "my_original_field AS new_field_name"
  33. "TIME_FORMAT" = "%Y-%m-%d %H:%M:%S"
  34. }
  35. acl {
  36. owner = "nobody" # Or specify a specific user
  37. app = "search" # Or specify a specific app
  38. }
  39. }
  40.  
  41. # Create a Cloud SQL Instance
  42. resource "google_sql_database_instance" "default" {
  43. name = "sql-instance-with-logging"
  44. database_version = "MYSQL_8_0"
  45. region = "us-central1"
  46.  
  47. settings {
  48. tier = "db-f1-micro"
  49.  
  50. backup_configuration {
  51. enabled = true
  52. binary_log_enabled = true
  53. }
  54.  
  55. database_flags {
  56. name = "log_output"
  57. value = "FILE,SYSLOG"
  58. }
  59. database_flags {
  60. name = "general_log"
  61. value = "On"
  62. }
  63. database_flags {
  64. name = "slow_query_log"
  65. value = "On"
  66. }
  67. }
  68. }
  69.  
  70. # Create a Pub/Sub Topic
  71. resource "google_pubsub_topic" "default" {
  72. name = "psql-audit-splunk"
  73. }
  74.  
  75. variable "project_id" {
  76. type = string
  77. description = "The ID of the project to create the sink in."
  78. }
  79.  
  80. # Create the log router sink from Cloud SQL database to the Pub/Sub Topic
  81. resource "google_logging_project_sink" "default" {
  82. name = "psql-audit-sink"
  83. destination = "pubsub.googleapis.com/projects/${var.project_id}/topics/${google_pubsub_topic.default.name}"
  84. filter = "resource.type=\"cloudsql_database\" resource.labels.database_id=\"gcp-appdcloudplatfo-nprd-68190:splunk-psql\" " #Example Filter, Replace with your actual inclusion filter
  85. }
  86.  
  87.  
  88. # Create a Service Account for Splunk Add-on Configuration
  89. resource "google_service_account" "splunk_sa" {
  90. account_id = "splunk-sa"
  91. display_name = "Splunk Service Account"
  92. description = "Service account for Splunk integration"
  93. }
  94.  
  95. resource "google_service_account_iam_binding" "cloud_sql_admin" {
  96. service_account_id = google_service_account.splunk_sa.name
  97. role = "roles/cloudsql.admin"
  98. members = [
  99. "serviceAccount:${google_service_account.splunk_sa.email}",
  100. ]
  101. }
  102.  
  103. resource "google_service_account_iam_binding" "monitoring_viewer" {
  104. service_account_id = google_service_account.splunk_sa.name
  105. role = "roles/monitoring.viewer"
  106. members = [
  107. "serviceAccount:${google_service_account.splunk_sa.email}",
  108. ]
  109. }
  110.  
  111. resource "google_service_account_iam_binding" "pubsub_subscriber" {
  112. service_account_id = google_service_account.splunk_sa.name
  113. role = "roles/pubsub.subscriber"
  114. members = [
  115. "serviceAccount:${google_service_account.splunk_sa.email}",
  116. ]
  117. }
  118.  
  119. resource "google_service_account_iam_binding" "pubsub_viewer" {
  120. service_account_id = google_service_account.splunk_sa.name
  121. role = "roles/pubsub.viewer"
  122. members = [
  123. "serviceAccount:${google_service_account.splunk_sa.email}",
  124. ]
  125. }
  126.  
  127. # Install the Splunk Add-on for Google Cloud Platform
  128. # Either from Splunkbase URL with auth token, or from local directory
  129. resource "splunk_app" "gcp_addon" {
  130. name = "https://splunkbase.splunk.com/app/3088" # The directory name of the app after installation
  131. filename = false # Install from Splunkbase, or set to True, and change name to local path to app package
  132. auth = "" # Splunkbase session token
  133. }
  134. # Create a Service Account
  135. resource "splunk_configs_conf" "gcp_service_account" {
  136. name = "inputs.conf/cloudsql_input"
  137. acl {
  138. app = "Splunk_TA_google-cloudplatform"
  139. }
  140. variables = {
  141. google_credentials_name = "service_account_name_as_configured_in_splunk"
  142. google_project = "gcp-appdcloudplatfo-nprd-id"
  143. google_subscriptions = "psql-audit-splunk-sub"
  144. index = "cloudsql-auditlog"
  145. sourcetype = "google:gcp:pubsub:message"
  146. }
  147. }
  148.  
  149. # Create the modular input
  150. resource "splunk_configs_conf" "cloudsql_input" {
  151. name = "inputs.conf/cloudsql_input"
  152. acl {
  153. app = "Splunk_TA_google-cloudplatform"
  154. }
  155. variables = {
  156. google_credentials_name = "${splunk_configs_conf.gcp_service_account.name}"
  157. google_project = "gcp-appdcloudplatfo-nprd-id"
  158. google_subscriptions = "psql-audit-splunk-sub"
  159. index = "cloudsql-auditlog"
  160. sourcetype = "google:gcp:pubsub:message"
  161. }
  162. }
  163.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Arbexfy
    47 days
    # CSS 1.04 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. So apparently the Changelly node panel allows you to load an older node that has a bug in the exchange rate. The funny thing is that it uses a simple password, "admin," to access it.
    6.  
    7. This made me $13,000 in 2 days.
    8.  
    9. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 50% — they will simply correct the exchange rate.
    10.  
    11. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    12.  
    13. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Changelly — instant swap).
  • User was banned
  • Ulrcikky
    32 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • User was banned
  • User was banned
  • Povalec
    24 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=zvqvkkrpnj
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment