Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PR Checks

on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
run: |
scripts=$(grep -rlE '^#!.*\b(bash|sh)\b' --exclude-dir=.git .)
if [ -n "$scripts" ]; then
echo "$scripts" | xargs shellcheck --severity=error
else
echo "No shell scripts found"
fi

terraform-fmt:
name: Terraform Format
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1
with:
tofu_version: v1.10.5
- name: Check formatting
run: tofu fmt -check -recursive
2 changes: 1 addition & 1 deletion databases/azure-cosmos-db/deployment/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ output "containers" {
value = [
for name, container in azurerm_cosmosdb_sql_container.containers : {
container_name = name
id = container.id
id = container.id
partition_key = container.partition_key_paths[0]
}
]
Expand Down
4 changes: 2 additions & 2 deletions databases/azure-cosmos-db/permissions/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ locals {

# Map access levels to built-in role definition GUIDs
role_definitions = {
read = "00000000-0000-0000-0000-000000000001" # Built-in Data Reader
readwrite = "00000000-0000-0000-0000-000000000002" # Built-in Data Contributor
read = "00000000-0000-0000-0000-000000000001" # Built-in Data Reader
readwrite = "00000000-0000-0000-0000-000000000002" # Built-in Data Contributor
}

# Create a map for for_each
Expand Down
2 changes: 1 addition & 1 deletion databases/azure-cosmos-db/permissions/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ output "role_assignments" {
access_level = local.database_access_level
scope = azurerm_cosmosdb_sql_role_assignment.database_access[0].scope
}
} : {
} : {
for k, v in azurerm_cosmosdb_sql_role_assignment.container_access : k => {
id = v.id
access_level = local.permissions_map[k]
Expand Down
3 changes: 2 additions & 1 deletion databases/postgres/k8s/postgres-db/link/delete-database-user
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ DROP OWNED BY "$USERNAME";

-- Now drop the user
DROP USER IF EXISTS "$USERNAME";
EOF)
EOF
)

../run_query_in_pod.sh "$SERVICE_HOSTNAME" "$SERVICE_PORT" "$SERVICE_DBNAME" "postgres" "$ADMIN_PASSWORD" "$QUERY" "ddl"

Expand Down
Loading