Skip to content

Commit

Permalink
double quote variables to prevent globbing and word splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
SaphMB committed Mar 15, 2023
1 parent 333c1d9 commit 52150ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ci/tasks/system-test-rds-encryption.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ sleep 30
aws --region "$region" s3 cp "s3://control-tower-$deployment-$region-config/terraform.tfstate" terraform.tfstate
db_identifier="$(jq -r '.resources[] | select( .type == "aws_db_instance") | .instances[0].attributes.id' < terraform.tfstate)"

storageEncypted="$(aws rds describe-db-instances --region eu-west-1 --db-instance-identifier $db_identifier --output json | jq -r ".DBInstances[0].StorageEncrypted")"
storageEncypted="$(aws rds describe-db-instances --region eu-west-1 --db-instance-identifier "$db_identifier" --output json | jq -r ".DBInstances[0].StorageEncrypted")"
if [ "$storageEncypted" != "true" ]; then
echo "RDS Disk ${db_identifier} not encrypted, StorageEncrypted is set to"
exit 1
Expand Down

0 comments on commit 52150ed

Please sign in to comment.