Skip to content

feat(infra): authentication through github is here. Need to be tested… - #133

Merged
yaylymov merged 23 commits into
mainfrom
27-implement-home-page-and-login-authentication-user-registration
Jul 17, 2026
Merged

feat(infra): authentication through github is here. Need to be tested…#133
yaylymov merged 23 commits into
mainfrom
27-implement-home-page-and-login-authentication-user-registration

Conversation

@yaylymov

@yaylymov yaylymov commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

GitHub OAuth sign-in + per-user accounts

Replaces the hardcoded admin/admin login with a real GitHub OAuth flow, persists users in a new users table, and gives each signed-in user their own aggregate account with seeded starter transactions on first login.

Backend (orchestrator-service)

  • New AuthController: login, callback, me, logout. In-memory session map (no JWT infra); state param TTL-bounded to prevent CSRF/replay.
  • New UserRepository (JdbcClient, no JPA). On first sign-in: upserts the user, creates their accounts row, links users.account_id, seeds 1 bank + ~15 transactions. Idempotent on later logins.
  • Added spring-boot-starter-jdbc + postgresql; datasource wired via SPRING_DATASOURCE_*.
  • New env: GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, GITHUB_REDIRECT_URI (default https://localhost/login/oauth2/code/github).
  • Minor genai/main.py fix — AccountSummary.totalCreditLimit/utilizationRate made optional so /summarize and /chat stop 422-ing.

Frontend (client)

  • "Sign in with GitHub" button replaces the admin form; header shows the user's name + avatar.
  • Token + user JSON in localStorage; every /api/* call sends Authorization: Bearer; SPA revalidates via /api/auth/me on mount.
  • Live mode now uses the signed-in user's accountId. Demo mode stays on the shared 1111… aggregate.
  • Tests updated (GitHub button test, testUser.accountId).

Database

  • New users table + migration infra/docker/migrate-users.sql for existing volumes.
  • New scripts/seed-demo-data.sql: 4 banks, ~€16k, 48 transactions over 6 months on the demo account. Idempotent, doesn't touch the Live aggregate.

Dev workflow

  • PowerShell equivalents of the .sh scripts: scripts/dev-up.ps1 / scripts/dev-down.ps1.
    • -Sequential for small Docker Desktop VMs, -SeedDemo to apply the demo seed.
  • client/Dockerfile now just serves a pre-built dist/; the npm build runs on the host (documented in the Dockerfile — Cloudflare rejects registry.npmjs.org from containers inside Docker Desktop's WSL 2 VM).

How to test

  1. Set GitHub OAuth callback to https://localhost/login/oauth2/code/github.
  2. .\scripts\dev-up.ps1 -Sequential -SeedDemo
  3. Open https://localhost/, click Sign in with GitHub.
  4. If your bankdb volume predates this PR, apply the migrations once (see infra/docker/migrate-users.sql + infra/docker/migrate-multibank.sql).
  5. Toggle DEMOLIVE — Demo shows the shared seed, Live shows your own auto-provisioned account.

Summary by CodeRabbit

  • New Features
    • Added GitHub OAuth sign-in/sign-out with authenticated dashboard, banking, and chat flows.
    • Signed-in identity now appears in the dashboard header with a standardized avatar.
    • Automatic GitHub user provisioning, including account setup and session-backed “current user”.
    • Added deterministic demo data seeding for development.
  • Bug Fixes
    • Improved handling of missing credit-limit/utilization fields to prevent request validation errors.
  • Chores
    • Updated Docker/CI/Helm/Ansible and dev scripts for GitHub OAuth, Postgres connectivity, and added user/account database migrations.
  • Tests
    • Refreshed auth/dashboard tests for the new GitHub login flow.

@yaylymov yaylymov self-assigned this Jul 15, 2026
@yaylymov yaylymov added the feature New feature label Jul 15, 2026
@yaylymov yaylymov linked an issue Jul 15, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds GitHub OAuth authentication across the orchestrator and client, persists GitHub users with provisioned accounts, sends bearer tokens to protected APIs, changes frontend image packaging, wires PostgreSQL and OAuth configuration, and adds Windows development and demo-data tooling.

Changes

GitHub OAuth authentication

Layer / File(s) Summary
Authentication contracts and user storage
server/orchestrator-service/src/main/java/com/team/bank/orchestrator/AuthModels.java, server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java, infra/docker/*, infra/helm/..., server/orchestrator-service/src/main/resources/application.yml
Adds OAuth/session DTOs, a users schema and migration, JDBC configuration, expanded account-summary fields, and GitHub user upsert with account provisioning.
GitHub OAuth controller flow
server/orchestrator-service/src/main/java/com/team/bank/orchestrator/AuthController.java, server/orchestrator-service/src/main/java/com/team/bank/orchestrator/DashboardController.java
Adds GitHub authorization, callback exchange, profile and email retrieval, in-memory sessions, /me, logout, OAuth state validation, and session-aware dashboard naming.
Client authentication and dashboard integration
client/src/api.ts, client/src/App.tsx, client/src/App.test.tsx, client/src/api.test.ts, client/src/styles/app.css
Adds client auth persistence and bearer headers, GitHub sign-in and callback handling, session revalidation, logout, signed-in identity display, avatar styling, and updated tests.

Runtime and development tooling

Layer / File(s) Summary
Container and deployment runtime wiring
docker-compose*.yml, .github/workflows/*, infra/ansible/*, infra/helm/*
Adds orchestrator PostgreSQL and GitHub OAuth configuration, database readiness handling, and frontend build steps before deployment image packaging.
Pre-built frontend image packaging
client/Dockerfile, client/.dockerignore
Changes the client image to serve host-built dist/ assets through nginx and narrows the Docker build context.
Windows development workflow
scripts/dev-up.ps1, scripts/dev-down.ps1, scripts/seed-demo-data.sql
Adds validated PowerShell startup/shutdown commands, sequential build support, optional health-gated demo seeding, and deterministic demo account data.

GenAI payload defaults

Layer / File(s) Summary
Account summary validation defaults
genai/main.py, server/orchestrator-service/src/main/java/com/team/bank/orchestrator/DashboardModels.java
Adds default values and shared model fields for omitted credit-limit and utilization values.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant ClientApp
  participant AuthController
  participant GitHub
  participant UserRepository
  Browser->>ClientApp: Click GitHub sign-in
  ClientApp->>AuthController: Request authorization URL
  AuthController-->>ClientApp: Return authorization URL and state
  ClientApp->>GitHub: Authorize application
  GitHub-->>ClientApp: Return code and state
  ClientApp->>AuthController: Submit callback
  AuthController->>GitHub: Exchange code and fetch profile
  AuthController->>UserRepository: Upsert user and provision account
  AuthController-->>ClientApp: Return session token and user
Loading

Possibly related issues

Possibly related PRs

Suggested reviewers: azzabaatout, wardstonex

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.32% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: replacing hardcoded login with GitHub authentication, though it is a bit informal.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 27-implement-home-page-and-login-authentication-user-registration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yaylymov
yaylymov marked this pull request as ready for review July 16, 2026 21:18

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🧹 Nitpick comments (1)
scripts/seed-demo-data.sql (1)

14-15: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Update stale comment regarding idempotency mechanism.

The comment indicates that idempotency relies on ON CONFLICT (id) DO UPDATE, but the script successfully achieves this by explicitly issuing DELETE FROM followed by INSERT.

💡 Proposed update to documentation
 -- Fixed IDs for the seeded connections. Keeping them stable makes the script idempotent
--- (ON CONFLICT (id) DO UPDATE) and lets us wipe just our seeded transactions.
+-- (by explicitly wiping and recreating the rows) and lets us wipe just our seeded transactions.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/seed-demo-data.sql` around lines 14 - 15, Update the comment above
the seeded connection IDs to describe the actual idempotency mechanism: the
script explicitly deletes existing seeded rows before inserting them. Remove the
inaccurate reference to ON CONFLICT (id) DO UPDATE while retaining the
explanation that stable IDs enable targeted cleanup of seeded transactions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@client/src/api.ts`:
- Around line 94-137: Remove bearer-token persistence from localStorage in
getAuthToken, saveAuth, and clearAuth, and rely on a server-set Secure,
HttpOnly, SameSite cookie for authentication instead. Update authHeaders and API
request handling to use cookie credentials without emitting an Authorization
bearer token, and add CSRF protection for state-changing requests using the
project’s existing conventions.
- Around line 167-174: Update signOut to capture authHeaders() first, call
clearAuth() synchronously before awaiting the logout request, then send the
captured headers for best-effort server invalidation. Preserve the existing
error suppression and avoid relying on current authentication state after the
request begins.

In `@client/src/App.tsx`:
- Around line 1224-1271: Prevent the mount-time revalidation effect from running
while the current URL is the GitHub OAuth callback, so fetchCurrentUser cannot
race with completeGithubLogin. Update the early guard in the revalidation
useEffect, while preserving normal stored-token validation and the existing
callback flow.

In `@docker-compose.dev.yml`:
- Around line 110-115: Update the orchestrator service’s depends_on
configuration to map syntax and set the postgres dependency condition to
service_healthy, while preserving the existing dependencies and their startup
behavior.

In
`@server/orchestrator-service/src/main/java/com/team/bank/orchestrator/AuthController.java`:
- Around line 315-322: Update pruneStates() so exceeding MAX_PENDING_STATES
evicts only expired or excess individual entries rather than clearing
pendingStates globally. Preserve active OAuth states, and add rate limiting to
the unauthenticated login flow to prevent repeated requests from forcing
unbounded state creation.
- Around line 64-65: Update the session handling around the sessions map and its
token creation and lookup paths to store issuance/expiry metadata, enforce a
fixed TTL by rejecting and removing expired tokens, and enforce a maximum
session capacity by evicting or rejecting entries when full. Prefer an existing
shared session-store abstraction if available, while preserving
authenticated-user and logout behavior.
- Around line 62-63: Bind each OAuth state to the initiating browser in the
authorization flow around pendingStates and the callback handling at lines 81-95
and 108-112. Set a Secure, HttpOnly, SameSite cookie containing the issued state
when login begins, then require and strictly compare that cookie with the
returned callback state before exchanging the code; reject mismatches and clear
the cookie after consumption.
- Around line 146-152: Update the sign-in log in AuthController to remove direct
user profile fields, including firstName, lastName, and email, from the INFO
message and its arguments. Retain only the non-PII identifiers or event
information needed to record the successful sign-in.
- Around line 178-185: Update DashboardController and BankingController to call
AuthController.lookupSession for every user-scoped dashboard, banking, sync, and
banking/chat proxy route, requiring a valid signed-in session before processing
requests. Enforce that each path or body accountId matches the authenticated
AppUser.accountId, rejecting mismatches; preserve only explicitly designated
demo/read-only exceptions.

In
`@server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java`:
- Around line 122-172: Restrict seedStarterData so it never runs for Live
accounts; only invoke it for the shared demo account or another explicitly
identified demo context. Preserve the existing synthetic connection, balance,
and transaction inserts for that demo path, and ensure first-time Live accounts
retain the intended empty state.

---

Nitpick comments:
In `@scripts/seed-demo-data.sql`:
- Around line 14-15: Update the comment above the seeded connection IDs to
describe the actual idempotency mechanism: the script explicitly deletes
existing seeded rows before inserting them. Remove the inaccurate reference to
ON CONFLICT (id) DO UPDATE while retaining the explanation that stable IDs
enable targeted cleanup of seeded transactions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9431d146-8cca-4886-932e-6e80d52fcde2

📥 Commits

Reviewing files that changed from the base of the PR and between eb4b45d and 0b36baa.

📒 Files selected for processing (20)
  • client/.dockerignore
  • client/Dockerfile
  • client/src/App.test.tsx
  • client/src/App.tsx
  • client/src/api.ts
  • client/src/styles/app.css
  • docker-compose.dev.yml
  • docker-compose.yml
  • genai/main.py
  • infra/docker/init.sql
  • infra/docker/migrate-users.sql
  • scripts/dev-down.ps1
  • scripts/dev-up.ps1
  • scripts/seed-demo-data.sql
  • server/gradle/libs.versions.toml
  • server/orchestrator-service/build.gradle.kts
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/AuthController.java
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/AuthModels.java
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java
  • server/orchestrator-service/src/main/resources/application.yml

Comment thread client/src/api.ts
Comment thread client/src/api.ts
Comment thread client/src/App.tsx
Comment thread docker-compose.dev.yml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub OAuth-based sign-in flow with persisted per-user accounts (plus first-login provisioning/seed data), updates the SPA to use authenticated sessions and per-user accountId in Live mode, and adjusts dev/CI tooling to support the new build + seed workflows.

Changes:

  • Introduces orchestrator GitHub OAuth endpoints and a JDBC-backed users persistence layer with per-user account provisioning.
  • Updates the client to sign in via GitHub, store a bearer token + user in localStorage, and send Authorization: Bearer on /api/* calls.
  • Adds demo data seeding and Windows PowerShell dev scripts; updates Dockerfiles/CI workflows to build client/dist on the host.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
server/orchestrator-service/src/main/resources/application.yml Adds datasource + GitHub OAuth config wiring.
server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java New JDBC repository to upsert users and provision per-user aggregate accounts + starter data.
server/orchestrator-service/src/main/java/com/team/bank/orchestrator/AuthModels.java New auth-related DTOs/records for the OAuth flow.
server/orchestrator-service/src/main/java/com/team/bank/orchestrator/AuthController.java New GitHub OAuth login/callback/me/logout endpoints with in-memory sessions/state.
server/orchestrator-service/build.gradle.kts Adds JDBC starter + Postgres driver.
server/gradle/libs.versions.toml Adds version catalog entry for Spring JDBC starter.
scripts/seed-demo-data.sql Adds demo aggregate seed dataset for dev/public demo usage.
scripts/dev-up.ps1 Adds PowerShell dev stack bring-up script with optional sequential build + seeding.
scripts/dev-down.ps1 Adds PowerShell dev stack tear-down script.
infra/docker/migrate-users.sql Adds idempotent migration for the new users table.
infra/docker/init.sql Adds users table creation to DB init.
genai/main.py Makes some AccountSummary fields optional-by-default to avoid 422s.
docker-compose.yml Wires orchestrator datasource + GitHub OAuth env vars and DB dependency.
docker-compose.dev.yml Wires orchestrator datasource + GitHub OAuth env vars for dev compose.
client/src/styles/app.css Adds avatar styling in header status bar.
client/src/App.tsx Replaces admin/admin login with GitHub OAuth, stores session, and uses per-user accountId for Live mode.
client/src/App.test.tsx Updates tests for GitHub sign-in button and per-user accountId flow.
client/src/api.ts Adds auth helpers + GitHub auth API calls; attaches Authorization headers to API calls.
client/src/api.test.ts Updates fetch expectations to allow options bags for auth headers.
client/Dockerfile Switches to serving pre-built dist/ via nginx only.
client/.dockerignore Narrows client build context to only required runtime assets.
.github/workflows/docker.yaml Builds client bundle on the runner before building/pushing client image.
.github/workflows/cd.yml Builds client bundle on the runner before building/pushing client image.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/seed-demo-data.sql Outdated
Comment thread client/src/api.ts Outdated
Comment thread client/src/api.ts
Comment thread client/src/api.ts
yaylymov and others added 5 commits July 16, 2026 23:47
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "52.161.178.97/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "172.185.47.210/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - description                                = "MDC JIT Network Access rule created by an initiation request for policy 'default' of VM 'TEAM-TEAM-DEV-VM'."
              - destination_address_prefix                 = "10.30.1.4"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "MicrosoftDefenderForCloud-JITRule-1031896714-41F244D728474EF2B0195742B15E7A20"
              - priority                                   = 100
              - protocol                                   = "*"
              - source_address_prefix                      = "172.201.77.43"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
            },
          - {
              - access                                     = "Allow"
              - description                                = "MDC JIT Network Access rule created by an initiation request for policy 'default' of VM 'TEAM-TEAM-DEV-VM'."
              - destination_address_prefix                 = "10.30.1.4"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "MicrosoftDefenderForCloud-JITRule-1031896714-99B474C0B02D4700802A73476B93CD3D"
              - priority                                   = 101
              - protocol                                   = "*"
              - source_address_prefix                      = "20.107.5.167"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
            },
          - {
              - access                                     = "Deny"
              - description                                = "MDC JIT Network Access rule for policy 'default' of VM 'TEAM-TEAM-DEV-VM'."
              - destination_address_prefix                 = "10.30.1.4"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "MicrosoftDefenderForCloud-JITRule_1031896714_EE897649F005498392F43D367848874D"
              - priority                                   = 4096
              - protocol                                   = "*"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "20.119.102.70/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # azurerm_subnet.subnet will be updated in-place
  ~ resource "azurerm_subnet" "subnet" {
      ~ default_outbound_access_enabled               = false -> true
        id                                            = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet"
        name                                          = "team-team-dev-subnet"
        # (8 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 2 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@client/src/api.test.ts`:
- Around line 74-78: Update both authenticated request assertions in
client/src/api.test.ts:74-78 and client/src/api.test.ts:97-97 to match the
expected headers object containing the bearer authorization value instead of
accepting any options object. Apply this to the dashboard request assertion and
the bank request assertion, preserving their existing URL checks.

In `@infra/ansible/playbook.yml`:
- Around line 189-202: Add a task immediately after the “Build client bundle”
task to recursively restore ownership of client/dist and client/node_modules to
the deployment user and group used by the playbook. Use the existing app_dir and
ansible_user-related variables rather than hardcoding values, ensuring the
subsequent synchronize task can delete or replace generated files without
permission errors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e60e34b1-e21b-454e-a328-e4c292e1f6fe

📥 Commits

Reviewing files that changed from the base of the PR and between 0b36baa and 1fb48c7.

📒 Files selected for processing (14)
  • .github/workflows/cd.yml
  • .github/workflows/docker.yaml
  • .github/workflows/infra-deploy.yml
  • client/src/App.test.tsx
  • client/src/api.test.ts
  • client/src/api.ts
  • infra/ansible/group_vars/all.yml
  • infra/ansible/playbook.yml
  • infra/helm/banking-app/templates/orchestratorService-deployment.yaml
  • infra/helm/banking-app/values.yaml
  • scripts/seed-demo-data.sql
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/AuthController.java
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/DashboardModels.java
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java
🚧 Files skipped from review as they are similar to previous changes (5)
  • client/src/App.test.tsx
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java
  • client/src/api.ts
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/AuthController.java
  • scripts/seed-demo-data.sql

Comment thread client/src/api.test.ts
Comment thread infra/ansible/playbook.yml
@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "20.127.239.247/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "172.172.87.193/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "20.55.15.1/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "130.131.55.241/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@infra/ansible/playbook.yml`:
- Around line 231-264: Update the “Wait for postgres to accept connections”,
“Apply multibank schema migration”, and “Apply users schema migration” tasks to
use the Postgres container’s populated environment variables for the username
and database instead of hardcoded bank and bankdb values. Execute the readiness
check and psql commands through sh -c inside the database container so
POSTGRES_USER and the corresponding database configuration are resolved there,
while preserving the existing retry and migration behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c475bd60-59f3-4885-8595-c90364f1edec

📥 Commits

Reviewing files that changed from the base of the PR and between 1fb48c7 and 34cd768.

📒 Files selected for processing (2)
  • client/src/App.test.tsx
  • infra/ansible/playbook.yml

Comment thread infra/ansible/playbook.yml
@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "135.232.201.65/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "52.190.140.99/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "135.232.201.65/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - description                                = "MDC JIT Network Access rule created by an initiation request for policy 'default' of VM 'TEAM-TEAM-DEV-VM'."
              - destination_address_prefix                 = "10.30.1.4"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "MicrosoftDefenderForCloud-JITRule-1031896714-41F244D728474EF2B0195742B15E7A20"
              - priority                                   = 100
              - protocol                                   = "*"
              - source_address_prefix                      = "172.201.77.43"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
            },
          - {
              - access                                     = "Allow"
              - description                                = "MDC JIT Network Access rule created by an initiation request for policy 'default' of VM 'TEAM-TEAM-DEV-VM'."
              - destination_address_prefix                 = "10.30.1.4"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "MicrosoftDefenderForCloud-JITRule-1031896714-99B474C0B02D4700802A73476B93CD3D"
              - priority                                   = 101
              - protocol                                   = "*"
              - source_address_prefix                      = "20.107.5.167"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
            },
          - {
              - access                                     = "Deny"
              - description                                = "MDC JIT Network Access rule for policy 'default' of VM 'TEAM-TEAM-DEV-VM'."
              - destination_address_prefix                 = "10.30.1.4"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "MicrosoftDefenderForCloud-JITRule_1031896714_EE897649F005498392F43D367848874D"
              - priority                                   = 4096
              - protocol                                   = "*"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "64.236.146.114/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java (1)

89-92: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Update the upsert Javadoc to match the empty-account behavior.

Lines 27-28 still claim that a starter transaction set is provisioned. Remove that phrase so the documented contract matches this change and does not imply synthetic data belongs in Live accounts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java`
around lines 89 - 92, Update the Javadoc for UserRepository.upsert to remove the
claim that a starter transaction set is provisioned, documenting only the
empty-account creation and linking behavior for live accounts.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@infra/helm/banking-app/templates/init-sql-configmap.yaml`:
- Around line 76-78: Ensure Helm upgrades execute the users migration for
existing PVCs by adding or updating a Helm hook/job that runs
infra/docker/migrate-users.sql, rather than relying solely on the
init-sql-configmap.yaml initialization script. Keep the migration idempotent and
ensure it runs during upgrade without disrupting fresh database initialization.

---

Nitpick comments:
In
`@server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java`:
- Around line 89-92: Update the Javadoc for UserRepository.upsert to remove the
claim that a starter transaction set is provisioned, documenting only the
empty-account creation and linking behavior for live accounts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c5533582-4be3-4f56-8f93-031287341229

📥 Commits

Reviewing files that changed from the base of the PR and between 34cd768 and d6f34a3.

📒 Files selected for processing (9)
  • client/src/App.test.tsx
  • client/src/App.tsx
  • client/src/api.test.ts
  • client/src/api.ts
  • client/src/styles/app.css
  • docker-compose.yml
  • infra/helm/banking-app/templates/init-sql-configmap.yaml
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/DashboardModels.java
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/UserRepository.java
💤 Files with no reviewable changes (1)
  • client/src/api.test.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • client/src/styles/app.css
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/DashboardModels.java
  • docker-compose.yml
  • client/src/api.ts
  • client/src/App.test.tsx
  • client/src/App.tsx

Comment thread infra/helm/banking-app/templates/init-sql-configmap.yaml
@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "20.83.158.242/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "52.159.247.178/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "20.83.158.242/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "20.161.78.74/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
server/orchestrator-service/src/main/java/com/team/bank/orchestrator/DashboardController.java (1)

52-54: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove redundant WebClient clone.

The webClient.mutate().build() call creates an exact copy of the injected WebClient without applying any configuration changes. Since WebClient instances are immutable and thread-safe, you can safely assign the injected instance directly.

(Note: If the intent was to forward the incoming Authorization header to downstream services, an exchange filter should be added here, or the header must be explicitly passed in each retrieve() call.)

♻️ Proposed refactor
   public DashboardController(WebClient webClient, AuthController authController) {
-    this.webClient = webClient.mutate().build();
+    this.webClient = webClient;
     this.authController = authController;
   }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@server/orchestrator-service/src/main/java/com/team/bank/orchestrator/DashboardController.java`
around lines 52 - 54, Update the DashboardController constructor to assign the
injected WebClient directly to the webClient field instead of calling
mutate().build(). Keep the existing authController assignment and downstream
request behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@server/orchestrator-service/src/main/java/com/team/bank/orchestrator/DashboardController.java`:
- Around line 52-54: Update the DashboardController constructor to assign the
injected WebClient directly to the webClient field instead of calling
mutate().build(). Keep the existing authController assignment and downstream
request behavior unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 70e9049d-590f-4a71-b193-c3f8c5d918ef

📥 Commits

Reviewing files that changed from the base of the PR and between d6f34a3 and 9a5f6dc.

📒 Files selected for processing (1)
  • server/orchestrator-service/src/main/java/com/team/bank/orchestrator/DashboardController.java

@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "20.83.158.242/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "64.236.144.105/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.

Comment thread genai/main.py Outdated
Comment thread .github/workflows/infra-deploy.yml
@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "20.83.158.242/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "172.183.131.64/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are 2 ways of doing this, either hard code like you did, or we could have put the data in a json file and uploaded it to enablebanking in the mock asps profile. both are okay, even though, this variant is a lot of overhead

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "20.83.158.242/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "20.186.238.1/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@azzabaatout azzabaatout left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i left some comments, some are observations - there's however one with the secrets that i think you should have a look on @yaylymov

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "20.83.158.242/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "20.80.109.83/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Terraform plan success

Show plan
Acquiring state lock. This may take a few moments...
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg]
azurerm_public_ip.pip: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/publicIPAddresses/team-team-dev-pip]
azurerm_virtual_network.vnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet]
azurerm_network_security_group.nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
local_file.ansible_inventory: Refreshing state... [id=e07e19ada10122df8e9e5e5493f25fcf36ed97a6]
azurerm_subnet.subnet: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/virtualNetworks/team-team-dev-vnet/subnets/team-team-dev-subnet]
azurerm_network_interface.nic: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic]
azurerm_network_interface_security_group_association.nic_nsg: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkInterfaces/team-team-dev-nic|/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg]
azurerm_linux_virtual_machine.vm: Refreshing state... [id=/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Compute/virtualMachines/team-team-dev-vm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_network_security_group.nsg will be updated in-place
  ~ resource "azurerm_network_security_group" "nsg" {
        id                  = "/subscriptions/37846a99-b4f2-427d-b619-0b92987a5370/resourceGroups/team-team-dev-rg/providers/Microsoft.Network/networkSecurityGroups/team-team-dev-nsg"
        name                = "team-team-dev-nsg"
      ~ security_rule       = [
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "22"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "SSH"
              - priority                                   = 1000
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "20.83.158.242/32"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "443"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTPS"
              - priority                                   = 1020
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          - {
              - access                                     = "Allow"
              - destination_address_prefix                 = "*"
              - destination_address_prefixes               = []
              - destination_application_security_group_ids = []
              - destination_port_range                     = "80"
              - destination_port_ranges                    = []
              - direction                                  = "Inbound"
              - name                                       = "HTTP"
              - priority                                   = 1010
              - protocol                                   = "Tcp"
              - source_address_prefix                      = "*"
              - source_address_prefixes                    = []
              - source_application_security_group_ids      = []
              - source_port_range                          = "*"
              - source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1000
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "20.80.108.162/32"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTPS"
              + priority                                   = 1020
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "80"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "HTTP"
              + priority                                   = 1010
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
        tags                = {
            "environment" = "dev"
            "managed"     = "terraform"
            "project"     = "team-team"
        }
        # (2 unchanged attributes hidden)
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = <<-EOT
            [app]
            74.248.37.27 ansible_user=azureuser ansible_ssh_private_key_file=ssh/id_rsa
            
            [app:vars]
            ansible_python_interpreter=/usr/bin/python3
            ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
            app_fqdn=team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com
            app_public_ip=74.248.37.27
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../ansible/inventory.ini"
      + id                   = (known after apply)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...

@yaylymov
yaylymov merged commit 8788ccc into main Jul 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement home page and login, authentication, user registration

3 participants