Last active
November 15, 2022 10:20
-
-
Save devops-adeel/9f4d73924308fc623fe98d3e2f86c2e1 to your computer and use it in GitHub Desktop.
Vault Baseline Configuration
This file contains hidden or 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
resource "vault_audit" "file" { | |
type = "file" | |
description = "Vault Audit to File" | |
options = { | |
file_path = "/var/log/vault_audit.log" | |
format = "json" | |
mode = "0000" | |
prefix = "vault" | |
} | |
} | |
resource "vault_audit" "syslog" { | |
type = "syslog" | |
description = "Vault Audit to syslog" | |
options = { | |
tag = "vault" | |
facility = "AUTH" | |
format = "json" | |
prefix = "vault" | |
} | |
} |
This file contains hidden or 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
#https://developer.hashicorp.com/vault/api-docs/system/storage/raftautopilot#set-configuration | |
#https://developer.hashicorp.com/vault/tutorials/raft/raft-autopilot#autopilot-configuration | |
resource "vault_raft_autopilot" "default" { | |
cleanup_dead_servers = true | |
dead_server_last_contact_threshold = "10s" | |
last_contact_threshold = "10s" | |
max_trailing_logs = 1000 | |
min_quorum = 3 | |
server_stabilization_time = "10s" | |
} |
This file contains hidden or 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
resource "vault_raft_snapshot_agent_config" "local" { | |
name = "local" | |
interval_seconds = 86400 | |
retain = 7 | |
path_prefix = "/opt/vault/snapshots/" | |
storage_type = "local" | |
local_max_space = 10000000 | |
} | |
#AWS | |
data "aws_region" "default" {} | |
resource "vault_raft_snapshot_agent_config" "aws" { | |
name = "s3" | |
interval_seconds = 86400 | |
retain = 7 | |
path_prefix = "/vault/snapshots/" | |
storage_type = "aws-s3" | |
aws_s3_bucket = "vault_snapshots" | |
aws_s3_region = data.aws_region.default.name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment