Skip to content

Commit

Permalink
fix(setup): importing log fields
Browse files Browse the repository at this point in the history
Bash arrays are hard.
  • Loading branch information
swiatekm committed Jun 20, 2024
1 parent 26a44b2 commit 2468cd0
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 15 deletions.
3 changes: 2 additions & 1 deletion deploy/helm/sumologic/conf/setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ function should_create_fields() {
cp /etc/terraform/* /terraform/
cd /terraform || exit 1

declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")

# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
3 changes: 2 additions & 1 deletion tests/helm/testdata/goldenfile/terraform/custom.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
3 changes: 2 additions & 1 deletion tests/helm/testdata/goldenfile/terraform/default.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
3 changes: 2 additions & 1 deletion tests/helm/testdata/goldenfile/terraform/traces.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ data:
cp /etc/terraform/* /terraform/
cd /terraform || exit 1
declare -ra FIELDS=("$(jq -r '.fields[]' terraform.tfvars.json)")
FIELDS_STRING=$(jq -r '.fields[]' terraform.tfvars.json)
mapfile -t FIELDS < <(echo "${FIELDS_STRING}")
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
Expand Down

0 comments on commit 2468cd0

Please sign in to comment.