Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tvo0813 committed Dec 20, 2024
1 parent 8904e2e commit 34043eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 30 deletions.
1 change: 1 addition & 0 deletions enos/modules/verify_secrets_engines/modules/create/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ output "state" {
auth = local.auth_output
identity = local.identity_output
kv = local.kv_output
pki = local.pki_output
}
}
7 changes: 4 additions & 3 deletions enos/modules/verify_secrets_engines/modules/create/pki.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ locals {
pki_issuer_name = "issuer"
pki_common_name = "common"
pki_default_ttl = "72h"
pki_test_data_path_prefix = "smoke"
pki_test_dir = "tmp-test-results"

// Output
pki_output = {
mount = local.pki_mount
common_name = local.pki_common_name
test_results = local.pki_test_dir
issuer_name = local.pki_issuer_name
mount = local.pki_mount
ttl = local.pki_default_ttl
test_dir = local.pki_test_dir
}

}
Expand Down
32 changes: 5 additions & 27 deletions enos/modules/verify_secrets_engines/modules/read/pki.tf
Original file line number Diff line number Diff line change
@@ -1,41 +1,19 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1

locals {
// Variables
pki_mount = "pki" # secret
pki_issuer_name = "issuer"
pki_common_name = "common"
pki_default_ttl = "72h"
pki_test_data_path_prefix = "smoke"
pki_test_dir = "tmp-test-results"

// Output
pki_output = {
mount = local.pki_mount
common_name = local.pki_common_name
test_results = local.pki_test_dir
}

}

output "pki" {
value = local.pki_output
}

# Verify PKI Certificate
resource "enos_remote_exec" "pki_verify_certificates" {
for_each = var.hosts

environment = {
MOUNT = local.pki_mount
MOUNT = var.create_state.pki.mount
VAULT_ADDR = var.vault_addr
VAULT_INSTALL_DIR = var.vault_install_dir
VAULT_TOKEN = var.vault_root_token
COMMON_NAME = local.pki_common_name
ISSUER_NAME = local.pki_issuer_name
TTL = local.pki_default_ttl
TEST_DIR = local.pki_test_dir
COMMON_NAME = var.create_state.pki.common_name
ISSUER_NAME = var.create_state.pki.issuer_name
TTL = var.create_state.pki.ttl
TEST_DIR = var.create_state.pki.test_dir
}

scripts = [abspath("${path.module}/../../scripts/pki-verify-certificates.sh")]
Expand Down

0 comments on commit 34043eb

Please sign in to comment.