File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2025 Intel Corporation
2+ #
3+ # SPDX-License-Identifier: Apache-2.0
4+
5+ output "s3_prefix_used" {
6+ description = " The actual S3 prefix used in bucket names (either provided or randomly generated)"
7+ value = var. s3_prefix == " " ? tostring (random_integer. random_prefix . result ) : var. s3_prefix
8+ }
Original file line number Diff line number Diff line change @@ -41,9 +41,15 @@ output "efs_file_system_id" {
4141}
4242
4343output "s3_prefix" {
44+ description = " The configured S3 prefix input variable (may be empty if not explicitly set)"
4445 value = var. s3_prefix
4546}
4647
48+ output "s3_prefix_used" {
49+ description = " The actual S3 prefix used in bucket names (either provided or randomly generated)"
50+ value = module. s3 . s3_prefix_used
51+ }
52+
4753output "sre_basic_auth_username" {
4854 value = var. sre_basic_auth_username
4955 sensitive = true
Original file line number Diff line number Diff line change @@ -1103,8 +1103,8 @@ EOF
11031103 echo " FILE_SYSTEM_ID=${efs_file_system_id} " >> ~ /.env
11041104 fi
11051105
1106- # export S3 prefix to .env
1107- s3_prefix=$( terraform show -json | jq -r ' .values.outputs.s3_prefix .value' )
1106+ # export S3 prefix to .env (use s3_prefix_used which returns the actual prefix)
1107+ s3_prefix=$( terraform show -json | jq -r ' .values.outputs.s3_prefix_used .value' )
11081108 if [[ -n " $s3_prefix " && " $s3_prefix " != " null" ]]; then
11091109 echo " S3_PREFIX=${s3_prefix} " >> ~ /.env
11101110 fi
You can’t perform that action at this time.
0 commit comments