-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from companieshouse/feature/logging
Incorporate Vault authentication methods
- Loading branch information
Showing
6 changed files
with
52 additions
and
9 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
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,20 @@ | ||
variable "hashicorp_vault_role_id" { | ||
description = "The role identifier used when retrieving configuration from Hashicorp Vault" | ||
type = string | ||
} | ||
|
||
variable "hashicorp_vault_secret_id" { | ||
description = "The secret identifier used when retrieving configuration from Hashicorp Vault" | ||
type = string | ||
} | ||
|
||
provider "vault" { | ||
auth_login { | ||
path = "auth/approle/login" | ||
|
||
parameters = { | ||
role_id = var.hashicorp_vault_role_id | ||
secret_id = var.hashicorp_vault_secret_id | ||
} | ||
} | ||
} |
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 @@ | ||
provider "vault" { | ||
# Credentials read from the environment variables: | ||
# ${VAULT_ADDR} | ||
# ${VAULT_TOKEN} | ||
} |
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,19 @@ | ||
variable "hashicorp_vault_username" { | ||
description = "The username used when retrieving configuration from Hashicorp Vault" | ||
type = string | ||
} | ||
|
||
variable "hashicorp_vault_password" { | ||
description = "The password used when retrieving configuration from Hashicorp Vault" | ||
type = string | ||
} | ||
|
||
provider "vault" { | ||
auth_login { | ||
path = "auth/userpass/login/${var.hashicorp_vault_username}" | ||
|
||
parameters = { | ||
password = var.hashicorp_vault_password | ||
} | ||
} | ||
} |
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 @@ | ||
vault-providers/userpass |