test(e2e): Add test for vault oidc provider (#5384)
* test(e2e): Simplify vault address in docker network * test(e2e): Add oidc test using vault * Update enos/modules/docker_vault/main.tf Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> --------- Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
This commit is contained in:
1 parent
20f11ab01b
commit
6ed077c69e
6 files changed
+334
-16
No files matched your search
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"api_addr": "https://127.0.0.1:8300",
|
||||
"storage": {
|
||||
"file": {
|
||||
"path": "/vault/file"
|
||||
@@ -7,7 +8,7 @@
|
||||
"listener": [
|
||||
{
|
||||
"tcp": {
|
||||
"address": "0.0.0.0:8200",
|
||||
"address": "0.0.0.0:8300",
|
||||
"tls_disable": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,11 @@ variable "vault_port" {
|
||||
type = string
|
||||
default = "8300"
|
||||
}
|
||||
variable "vault_port_internal" {
|
||||
description = "Internal Port to use"
|
||||
type = string
|
||||
default = "8300"
|
||||
}
|
||||
|
||||
resource "docker_image" "vault" {
|
||||
name = var.image_name
|
||||
@@ -48,7 +53,7 @@ resource "docker_container" "vault" {
|
||||
name = var.container_name
|
||||
command = ["vault", "server", "-config", "/vault/config.d/config.json"]
|
||||
ports {
|
||||
internal = 8200
|
||||
internal = var.vault_port_internal
|
||||
external = var.vault_port
|
||||
}
|
||||
mounts {
|
||||
@@ -128,11 +133,11 @@ resource "enos_local_exec" "check_health" {
|
||||
}
|
||||
|
||||
output "address" {
|
||||
value = "0.0.0.0"
|
||||
value = "http://${var.container_name}:${var.vault_port}"
|
||||
}
|
||||
|
||||
output "address_internal" {
|
||||
value = var.container_name
|
||||
value = "http://${var.container_name}:${var.vault_port_internal}"
|
||||
}
|
||||
|
||||
output "token" {
|
||||
|
||||
Reference in new issue
Block a user