Skip to content

Commit

Permalink
fixing path error
Browse files Browse the repository at this point in the history
  • Loading branch information
shashitnak committed Jun 11, 2024
1 parent aa95a78 commit 3b80b27
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/create-tf-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ depends_on="[ local_sensitive_file.bootstrap,";
for file_path in $(find . -type f); do
echo "Path: $file_path"
name=$(basename $file_path | tr '.' '_')
config_path="${file_path/#./config}"

config_path="config"
for token in $(echo $file_path | tr '/' '\n'); do
if [ "$token" = "." ]; then
continue
else
config_path="$config_path/$token"
fi
done

resource="resource \"local_sensitive_file\" \"$name\" {\n content_base64 = filebase64(\"$file_path\") \n filename = \"$config_path\"\n }"

Expand Down

0 comments on commit 3b80b27

Please sign in to comment.