Skip to content

Commit 7ca43f4

Browse files
committed
fix: expand environment variables in AWS account ID validation
- AWS account ID field now properly expands before validating format - Validation now shows both raw config value and expanded value for transparency - Fixes validation error when using env vars for account_id in axon.config.yml
1 parent 1a53690 commit 7ca43f4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/validate-config.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,15 @@ validate_aws_account_id() {
185185
return 1
186186
fi
187187

188+
# Expand environment variables if present (e.g., ${AWS_ACCOUNT_ID})
189+
local expanded_value=$(expand_env_vars "$value")
190+
188191
# AWS account IDs are 12 digits
189-
if ! [[ "$value" =~ ^[0-9]{12}$ ]]; then
190-
report_error "Invalid AWS account ID format: ${value} (must be 12 digits)"
192+
if ! [[ "$expanded_value" =~ ^[0-9]{12}$ ]]; then
193+
report_error "Invalid AWS account ID format: ${value} (expanded: ${expanded_value}, must be 12 digits)"
191194
return 1
192195
else
193-
report_success "AWS Account ID: ${value}"
196+
report_success "AWS Account ID: ${value} (expanded: ${expanded_value})"
194197
return 0
195198
fi
196199
}

0 commit comments

Comments
 (0)