-
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.
currently finishing gcs configurations (potentially)
- Loading branch information
Showing
4 changed files
with
139 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
provider "google" { | ||
project = "<YOUR_PROJECT_ID>" | ||
region = "us-central1" | ||
} | ||
resource "google_storage_bucket" "elk_backup" { | ||
name = "elk-backups-bucket" | ||
location = "US" | ||
force_destroy = true | ||
} | ||
|
||
resource "google_storage_bucket_object" "logstash_logs" { | ||
name = "logstash_logs/latest_logstash_logs.tar.gz" | ||
source = "/path/to/local/logstash/logs/latest_logstash_logs.tar.gz" # Path on your local machine where logs are stored | ||
bucket = google_storage_bucket.elk_backup.name | ||
content_type = "application/gzip" | ||
} | ||
|
||
resource "google_storage_bucket_object" "es_snapshots" { | ||
name = "es_snapshots/latest_es_snapshot.tar.gz" | ||
source = "/path/to/local/elasticsearch/snapshots/latest_es_snapshot.tar.gz" # Path on your local machine where snapshots are stored | ||
bucket = google_storage_bucket.elk_backup.name | ||
content_type = "application/gzip" | ||
} | ||
|
||
resource "google_storage_bucket_object" "kibana_dashboards" { | ||
name = "kibana_dashboards/latest_kibana_dashboards.json" | ||
source = "/path/to/local/kibana/dashboards/latest_kibana_dashboards.json" # Path on your local machine where dashboards are exported | ||
bucket = google_storage_bucket.elk_backup.name | ||
content_type = "application/json" | ||
} | ||
|
||
output "bucket_url" { | ||
value = google_storage_bucket.elk_backup.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,42 @@ | ||
resource "google_storage_bucket" "validator_backup" { | ||
name = "aleo-backup" # Replace with a unique bucket name | ||
location = "US" # Replace with your desired location | ||
|
||
versioning { | ||
enabled = true # Enable versioning for backups | ||
} | ||
|
||
lifecycle { | ||
prevent_destroy = true # Prevent accidental deletion of the bucket | ||
} | ||
} | ||
|
||
# Create a folder for Validator Keys | ||
resource "google_storage_bucket_object" "validator_keys" { | ||
name = "validator_keys/" # Folder for validator keys | ||
bucket = google_storage_bucket.validator_backup.name | ||
} | ||
|
||
# Create a folder for Configuration Files | ||
resource "google_storage_bucket_object" "config_files" { | ||
name = "configuration_files/" # Folder for configuration files | ||
bucket = google_storage_bucket.validator_backup.name | ||
} | ||
|
||
# Create a folder for Blockchain Data | ||
resource "google_storage_bucket_object" "blockchain_data" { | ||
name = "blockchain_data/" # Folder for blockchain data | ||
bucket = google_storage_bucket.validator_backup.name | ||
} | ||
|
||
# Create a folder for Wallet Data | ||
resource "google_storage_bucket_object" "wallet_data" { | ||
name = "wallet_data/" # Folder for wallet data | ||
bucket = google_storage_bucket.validator_backup.name | ||
} | ||
|
||
# Create a folder for Recovery Information | ||
resource "google_storage_bucket_object" "recovery_info" { | ||
name = "recovery_information/" # Folder for recovery information | ||
bucket = google_storage_bucket.validator_backup.name | ||
} |
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,21 @@ | ||
resource "google_storage_bucket" "static" { | ||
name = "mina-monitoring" | ||
location = "US" | ||
storage_class = "STANDARD" | ||
|
||
uniform_bucket_level_access = true | ||
} | ||
|
||
resource "google_storage_bucket_object" "prometheus_snapshot" { | ||
name = "prometheus-snapshot.tar.gz" | ||
source = "/path/to/snapshot.tar.gz" | ||
content_type = "application/gzip" | ||
bucket = "mina-monioring" | ||
} | ||
|
||
resource "google_storage_bucket_object" "grafana_dashboard" { | ||
name = "grafana-dashboard.json" | ||
source = "/path/to/dashboard.json" | ||
content_type = "application/json" | ||
bucket = "mina-monitoring" | ||
} |
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,42 @@ | ||
resource "google_storage_bucket" "validator_backup" { | ||
name = "mina-backup" # Replace with a unique bucket name | ||
location = "US" # Replace with your desired location | ||
|
||
versioning { | ||
enabled = true # Enable versioning for backups | ||
} | ||
|
||
lifecycle { | ||
prevent_destroy = true # Prevent accidental deletion of the bucket | ||
} | ||
} | ||
|
||
# Create a folder for Validator Keys | ||
resource "google_storage_bucket_object" "validator_keys" { | ||
name = "validator_keys/" # Folder for validator keys | ||
bucket = google_storage_bucket.validator_backup.name | ||
} | ||
|
||
# Create a folder for Configuration Files | ||
resource "google_storage_bucket_object" "config_files" { | ||
name = "configuration_files/" # Folder for configuration files | ||
bucket = google_storage_bucket.validator_backup.name | ||
} | ||
|
||
# Create a folder for Blockchain Data | ||
resource "google_storage_bucket_object" "blockchain_data" { | ||
name = "blockchain_data/" # Folder for blockchain data | ||
bucket = google_storage_bucket.validator_backup.name | ||
} | ||
|
||
# Create a folder for Wallet Data | ||
resource "google_storage_bucket_object" "wallet_data" { | ||
name = "wallet_data/" # Folder for wallet data | ||
bucket = google_storage_bucket.validator_backup.name | ||
} | ||
|
||
# Create a folder for Recovery Information | ||
resource "google_storage_bucket_object" "recovery_info" { | ||
name = "recovery_information/" # Folder for recovery information | ||
bucket = google_storage_bucket.validator_backup.name | ||
} |