Skip to content

Record Phase 4 deployment findings; resolve prod image placeholders - #1

Merged
Affan2900 merged 2 commits into
mainfrom
docs/phase4-deploy-findings
Jul 26, 2026
Merged

Record Phase 4 deployment findings; resolve prod image placeholders#1
Affan2900 merged 2 commits into
mainfrom
docs/phase4-deploy-findings

Conversation

@Affan2900

@Affan2900 Affan2900 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

What

Documents the constraints uncovered while getting CD (dev) green, and clears two placeholders that would have broken the prod path later.

  • docs/decisions.md — six new Phase 4 entries. Notably corrects a factually wrong claim: the existing entry stated the federated credentials trust repo:Affan2900/cogniLens:ref:refs/heads/main. They don't — GitHub asserts an immutable-ID subject (repo:Affan2900@123811141/cognilens@1312175714:...), and the readable form fails every login with AADSTS700213.
  • infra/params/prod.bicepparam — replaces REPLACE_WITH_GH_OWNER with the real GHCR owner.
  • .github/workflows/cd.yml — corrects the stale :environment:production subject in the deploy-prod placeholder comment.

Other findings recorded: per-subscription SQL region gating (and why sqlServerName is salted with sqlLocation), SID-based contained DB users, go-sqlcmd over mssql-tools18, the containerapp extension shadowing core azure-cli, and one-way Key Vault purge protection.

Why this PR exists

ci.yml has never executed — every change so far went straight to main, and it only triggers on pull_request. This is the first run of build / format check / tests / Trivy / what-if, and the first use of the :pull_request federated credential. Expect the CI result here to be informative regardless of whether it passes.

Verification

az bicep build-params --file infra/params/prod.bicepparam compiles clean (the two no-hardcoded-env-urls warnings in sql.bicep are pre-existing).

No behavioural change to the dev deploy path — the what-if plan on this PR should show no diff.

🤖 Generated with Claude Code

https://claude.ai/code/session_019UnusAvj1QtPwNnd28udLm

Summary by CodeRabbit

  • Deployment

    • Updated production deployment configuration to reference the correct container images.
    • Clarified prerequisites for enabling production deployments, including required environment approvals and secure authentication setup.
    • Improved deployment guidance for database provisioning, traffic shifting, and secret protection.
  • Documentation

    • Added operational notes covering production readiness, deployment configuration, and infrastructure constraints.

Nine CD failures surfaced constraints that existed nowhere in the repo. Documents
them in docs/decisions.md so the next deploy doesn't rediscover them:

- Federated credential subjects must use GitHub's immutable-ID form
  (repo:OWNER@id/REPO@id:...); the readable form fails with AADSTS700213. The
  Phase 4 entry claimed the readable form was registered, which was wrong.
- SQL logical-server creation is gated per-region *per-subscription*; hence the
  separate sqlLocation param and the location-salted server name (a failed
  create tombstones the name-to-region pairing).
- Contained DB users use WITH SID/TYPE = E to avoid a Directory Readers
  dependency this tenant can't grant.
- The deployment-script image is Azure Linux, so go-sqlcmd replaces mssql-tools18.
- The containerapp CLI extension shadows core and rejects valid revision names.
- Key Vault purge protection cannot be set back to false.

Also replaces the REPLACE_WITH_GH_OWNER placeholders in prod.bicepparam with the
real GHCR owner, and corrects the stale production subject in cd.yml's
deploy-prod placeholder comment.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019UnusAvj1QtPwNnd28udLm
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Affan2900, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c4c45d1-0e70-4706-8fdc-d15d086b08f1

📥 Commits

Reviewing files that changed from the base of the PR and between ded7309 and d0946bd.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📝 Walkthrough

Walkthrough

The changes document production deployment prerequisites and infrastructure constraints, and replace production GHCR image placeholders with the configured repository owner.

Changes

Deployment operations

Layer / File(s) Summary
Production deployment prerequisites
.github/workflows/cd.yml, docs/decisions.md
Workflow comments and the Phase 4 decision log document production resource, environment, and immutable-ID federated credential requirements.
Infrastructure and deployment constraints
docs/decisions.md
The decision log records SQL location, database user creation, bootstrap tooling, Container Apps traffic shifting, and Key Vault purge-protection constraints.
Production image defaults
infra/params/prod.bicepparam
API and worker images now use ghcr.io/affan2900/...:latest, with comments describing bootstrap use and lowercase registry ownership.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: intellema

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: documenting Phase 4 deployment findings and replacing production image placeholders.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docs/phase4-deploy-findings

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.

@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/params/prod.bicepparam`:
- Around line 13-17: Update the production deployment flow around apiImage and
workerImage so deployments receive explicit Git-SHA-tagged image values rather
than relying on :latest. Before enabling production, validate both effective
image parameters and fail the deployment if either ends with :latest; remove or
replace the mutable defaults in prod.bicepparam.
🪄 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: 827b96a4-1ed9-4157-a727-1d7e30ff4262

📥 Commits

Reviewing files that changed from the base of the PR and between bfde59e and ded7309.

📒 Files selected for processing (3)
  • .github/workflows/cd.yml
  • docs/decisions.md
  • infra/params/prod.bicepparam

Comment on lines +13 to +17
// `latest` is only the bootstrap value — cd.yml overrides both with the git-SHA tag at deploy
// time so a revision is always traceable to an exact commit. GHCR owner is lowercased because
// registry paths are case-sensitive while the GitHub account name (Affan2900) is not.
param apiImage = 'ghcr.io/affan2900/cognilens-api:latest'
param workerImage = 'ghcr.io/affan2900/cognilens-worker:latest'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Do not let production deployments fall back to latest.

The comment says cd.yml overrides these values with SHA tags, but the production job is still commented out. A manual deployment using this parameter file therefore uses mutable latest, defeating traceability and allowing an unintended image to be released. Before enabling production, pass both SHA-tagged image parameters and fail if either effective image ends in :latest.

🤖 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 `@infra/params/prod.bicepparam` around lines 13 - 17, Update the production
deployment flow around apiImage and workerImage so deployments receive explicit
Git-SHA-tagged image values rather than relying on :latest. Before enabling
production, validate both effective image parameters and fail the deployment if
either ends with :latest; remove or replace the mutable defaults in
prod.bicepparam.

The what-if step succeeded but the comment step died with "Argument list too
long" (E2BIG) before its script ran. Step outputs reach the next step as
environment variables, and execve() caps a single envp string at MAX_ARG_STRLEN
(128 KB); the plan was ~250 KB. Write it to whatif.txt and read it in-process
instead, which avoids exec entirely.

Two further problems on the same path:

- GitHub caps an issue comment body at 65536 characters, so the post would have
  failed with 422 even had the env var fit. Truncate to 60000, eliding the
  middle so the trailing "Resource changes: ..." summary survives.
- `|| true` discarded the what-if exit code, so a genuinely broken template
  would post its error and still pass CI green. Capture the code and fail the
  job after the comment is posted.

Also drops --no-pretty-print (raw JSON with full before/after bodies for every
resource — larger and less readable than the default diff), silences ANSI colour
via AZURE_CORE_NO_COLOR, and bumps github-script v7 -> v9 to clear the Node 20
deprecation warning.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019UnusAvj1QtPwNnd28udLm
@github-actions

Copy link
Copy Markdown

Azure what-if (rg-cognilens-dev)

Show plan
Note: The result may contain false positive predictions (noise).
You can help us improve the accuracy of the result by opening an issue here: https://aka.ms/WhatIfIssues

Resource and property changes are indicated with these symbols:
  - Delete
  + Create
  ~ Modify
  = Nochange
  x Unsupported
  * Ignore
  x Noeffect

The deployment will update the following scopes:

Scope: /















Scope: /subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev

  + Microsoft.Resources/deploymentScripts/cognilens-dev-sql-64sgu7kbbhj5e-bootstrap-users [2023-08-01]

      apiVersion:                                                                                                                                                                                                               "2023-08-01"
      id:                                                                                                                                                                                                                       "/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Resources/deploymentScripts/cognilens-dev-sql-64sgu7kbbhj5e-bootstrap-users"
      identity.type:                                                                                                                                                                                                            "UserAssigned"
      identity.userAssignedIdentities./subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-sql-64sgu7kbbhj5e-deploy-mi: {}
      kind:                                                                                                                                                                                                                     "AzureCLI"
      location:                                                                                                                                                                                                                 "centralus"
      name:                                                                                                                                                                                                                     "cognilens-dev-sql-64sgu7kbbhj5e-bootstrap-users"
      properties.azCliVersion:                                                                                                                                                                                                  "2.65.0"
      properties.cleanupPreference:                                                                                                                                                                                             "OnSuccess"
      properties.environmentVariables: [
        0:

          name:  "SERVER"
          value: "cognilens-dev-sql-64sgu7kbbhj5e.database.windows.net"

        1:

          name:  "DATABASE"
          value: "CogniLens"

        2:

          name:  "API_IDENTITY_NAME"
          value: "cognilens-dev-api-mi"

        3:

          name:  "WORKER_IDENTITY_NAME"
          value: "cognilens-dev-worker-mi"

        4:

          name:  "API_IDENTITY_CLIENT_ID"
          value: "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-api-mi', '2024-11-30').clientId]"

        5:

          name:  "WORKER_IDENTITY_CLIENT_ID"
          value: "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').clientId]"

        6:

          name:  "DEPLOY_CLIENT_ID"
          value: "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-sql-64sgu7kbbhj5e-deploy-mi', '2024-11-30').clientId]"

      ]
      properties.retentionInterval:                                                                                                                                                                                             "PT1H"
      properties.scriptContent:                                                                                                                                                                                                 "      set -e

      # mssql-tools is NOT installed from packages.microsoft.com here: the AzureCLI
      # deployment-script image is Azure Linux, which has no apt-get, so the Debian/Ubuntu repo
      # route fails outright. go-sqlcmd ships a single statically-linked binary instead, so this
      # depends on nothing in the base image beyond curl.
      curl -sSL -o sqlcmd.tar.bz2 https://github.com/microsoft/go-sqlcmd/releases/download/v1.10.0/sqlcmd-linux-amd64.tar.bz2
      # `tar -j` shells out to a bzip2 binary that isn't guaranteed to be present; Python's
      # tarfile decompresses bz2 in-process, so it works even on a stripped-down image.
      tar -xjf sqlcmd.tar.bz2 2>/dev/null || python3 -c "import tarfile; tarfile.open('sqlcmd.tar.bz2').extractall('.')"
      chmod +x ./sqlcmd

      # CREATE USER ... FROM EXTERNAL PROVIDER is deliberately NOT used here. That form makes the
      # SQL server call Microsoft Graph to resolve the identity name, which requires the server to
      # have a managed identity holding the Directory Readers role — granting that needs Privileged
      # Role Administrator in the tenant, which isn't available on this (university-managed) tenant.
      # Creating the user from the identity's client ID converted to a binary SID is the documented
      # equivalent and needs no directory permissions at all.
      cat <<SQL > bootstrap.sql
DECLARE @apiUser sysname = N'$API_IDENTITY_NAME';
DECLARE @workerUser sysname = N'$WORKER_IDENTITY_NAME';
DECLARE @apiSid varbinary(16) = CONVERT(varbinary(16), CAST(N'$API_IDENTITY_CLIENT_ID' AS uniqueidentifier));
DECLARE @workerSid varbinary(16) = CONVERT(varbinary(16), CAST(N'$WORKER_IDENTITY_CLIENT_ID' AS uniqueidentifier));
DECLARE @cmd nvarchar(max);

IF NOT EXISTS (SELECT 1 FROM sys.database_principals WHERE name = @apiUser)
BEGIN
  SET @cmd = N'CREATE USER [' + @apiUser + N'] WITH SID = 0x' + CONVERT(varchar(100), @apiSid, 2) + N', TYPE = E;';
  EXEC(@cmd);
END
EXEC('ALTER ROLE db_datareader ADD MEMBER [' + @apiUser + ']');
EXEC('ALTER ROLE db_datawriter ADD MEMBER [' + @apiUser + ']');

IF NOT EXISTS (SELECT 1 FROM sys.database_principals WHERE name = @workerUser)
BEGIN
  SET @cmd = N'CREATE USER [' + @workerUser + N'] WITH SID = 0x' + CONVERT(varchar(100), @workerSid, 2) + N', TYPE = E;';
  EXEC(@cmd);
END
EXEC('ALTER ROLE db_datareader ADD MEMBER [' + @workerUser + ']');
EXEC('ALTER ROLE db_datawriter ADD MEMBER [' + @workerUser + ']');
SQL

      # -U carries the user-assigned identity's client ID (how go-sqlcmd disambiguates which MI to
      # use); -b makes a failed T-SQL batch exit non-zero, otherwise sqlcmd returns 0 on SQL errors
      # and a broken bootstrap would silently report success.
      ./sqlcmd -S "tcp:$SERVER,1433" -d "$DATABASE" -l 30 -b \
        --authentication-method=ActiveDirectoryManagedIdentity -U "$DEPLOY_CLIENT_ID" \
        -i bootstrap.sql
    "
      properties.timeout:                                                                                                                                                                                                       "PT15M"
      type:                                                                                                                                                                                                                     "Microsoft.Resources/deploymentScripts"

  ~ Microsoft.App/containerApps/cognilens-dev-api [2025-01-01]
    - properties.configuration.ingress.exposedPort: 0
    - properties.template.revisionSuffix:           "bfde59e"
    - properties.template.scale.cooldownPeriod:     300
    - properties.template.scale.pollingInterval:    30
    ~ properties.configuration.ingress.traffic: [
      ~ 0:

        - revisionName:   "cognilens-dev-api--bfde59e"
        + latestRevision: true

      ]
    ~ properties.template.containers: [
      ~ 0:

        ~ env: [
          ~ 2:

            ~ value: "InstrumentationKey=0bff4d9d-e3df-485a-92a1-b7a9a21d9a9a;IngestionEndpoint=https://eastus2-3.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus2.livediagnostics.monitor.azure.com/;ApplicationId=c678843e-04f4-4447-8dcb-51c6e1abd7e6" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Insights/components/cognilens-dev-appi', '2020-02-02').ConnectionString]"

          ~ 3:

            ~ value: "58ceba81-ddd9-439a-9f3e-15ec5ff32387" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-api-mi', '2024-11-30').clientId]"

          ~ 4:

            ~ value: "Server=tcp:cognilens-dev-sql-64sgu7kbbhj5e.database.windows.net,1433;Initial Catalog=CogniLens;Authentication=Active Directory Default;User Id=58ceba81-ddd9-439a-9f3e-15ec5ff32387;Encrypt=True;TrustServerCertificate=False;" => "[format('Server=tcp:{0},1433;Initial Catalog={1};Authentication=Active Directory Default;User Id={2};Encrypt=True;TrustServerCertificate=False;', 'cognilens-dev-sql-64sgu7kbbhj5e.database.windows.net', 'CogniLens', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-api-mi', '2024-11-30').clientId)]"

          ~ 5:

            ~ value: "https://cognilensdevst.blob.core.windows.net/" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', '2023-05-01').primaryEndpoints.blob]"

          ~ 6:

            ~ value: "https://cognilensdevst.queue.core.windows.net/" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', '2023-05-01').primaryEndpoints.queue]"

          ~ 10:

            ~ value: "https://cognilens-speech-dev.cognitiveservices.azure.com/" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.CognitiveServices/accounts/cognilens-speech-dev', '2024-10-01').endpoint]"

          ~ 11:

            ~ value: "https://cognilens-openai-dev.openai.azure.com/" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.CognitiveServices/accounts/cognilens-openai-dev', '2024-10-01').endpoint]"

          ]
        ~ image: "ghcr.io/affan2900/cognilens-api:bfde59e2c9b960b78eb92e7082e3c3316b1446bd" => "ghcr.io/affan2900/cognilens-api:latest"

      ]

  ~ Microsoft.App/containerApps/cognilens-dev-worker [2025-01-01]
    - properties.configuration.ingress.exposedPort: 0
    - properties.configuration.ingress.traffic: [
        0:

          latestRevision: true
          weight:         100

      ]
    - properties.template.scale.cooldownPeriod:     300
    - properties.template.scale.pollingInterval:    30
    ~ properties.template.containers: [
      ~ 0:

        ~ env: [
          ~ 2:

            ~ value: "InstrumentationKey=0bff4d9d-e3df-485a-92a1-b7a9a21d9a9a;IngestionEndpoint=https://eastus2-3.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus2.livediagnostics.monitor.azure.com/;ApplicationId=c678843e-04f4-4447-8dcb-51c6e1abd7e6" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Insights/components/cognilens-dev-appi', '2020-02-02').ConnectionString]"

          ~ 3:

            ~ value: "0d11a77c-d181-4239-ada4-c8376afe8be2" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').clientId]"

          ~ 4:

            ~ value: "Server=tcp:cognilens-dev-sql-64sgu7kbbhj5e.database.windows.net,1433;Initial Catalog=CogniLens;Authentication=Active Directory Default;User Id=0d11a77c-d181-4239-ada4-c8376afe8be2;Encrypt=True;TrustServerCertificate=False;" => "[format('Server=tcp:{0},1433;Initial Catalog={1};Authentication=Active Directory Default;User Id={2};Encrypt=True;TrustServerCertificate=False;', 'cognilens-dev-sql-64sgu7kbbhj5e.database.windows.net', 'CogniLens', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').clientId)]"

          ~ 5:

            ~ value: "https://cognilensdevst.blob.core.windows.net/" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', '2023-05-01').primaryEndpoints.blob]"

          ~ 6:

            ~ value: "https://cognilensdevst.queue.core.windows.net/" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', '2023-05-01').primaryEndpoints.queue]"

          ~ 10:

            ~ value: "https://cognilens-speech-dev.cognitiveservices.azure.com/" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.CognitiveServices/accounts/cognilens-speech-dev', '2024-10-01').endpoint]"

          ~ 11:

            ~ value: "https://cognilens-openai-dev.openai.azure.com/" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.CognitiveServices/accounts/cognilens-openai-dev', '2024-10-01').endpoint]"

          ]
        ~ image: "ghcr.io/affan2900/cognilens-worker:bfde59e2c9b960b78eb92e7082e3c3316b1446bd" => "ghcr.io/affan2900/cognilens-worker:latest"

      ]
    ~ properties.template.scale.rules: [
      ~ 0:

        - azureQueue:

            accountName: "cognilensdevst"
            identity:    "/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi"
            queueLength: 1
            queueName:   "analyze-jobs"

        + custom:

            identity:             "/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi"
            metadata.accountName: "cognilensdevst"
            metadata.queueLength: "1"
            metadata.queueName:   "analyze-jobs"
            type:                 "azure-queue"


      ]

  ~ Microsoft.App/managedEnvironments/cognilens-dev-env [2025-01-01]
    - properties.peerAuthentication:

        mtls.enabled: false

    - properties.peerTrafficConfiguration:

        encryption.enabled: false

    ~ properties.appLogsConfiguration.logAnalyticsConfiguration.customerId: "e03bc1f3-bd5d-4b68-8c5a-3bea7d5d67e2" => "[reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.OperationalInsights/workspaces/cognilens-dev-law', '2023-09-01').customerId]"

  ~ Microsoft.CognitiveServices/accounts/cognilens-openai-dev/deployments/gpt-5-mini [2024-10-01]
    - properties.currentCapacity:      10
    - properties.raiPolicyName:        "Microsoft.DefaultV2"
    - properties.versionUpgradeOption: "OnceNewDefaultVersionAvailable"

  ~ Microsoft.CognitiveServices/accounts/cognilens-openai-dev/deployments/text-embedding-3-small [2024-10-01]
    - properties.currentCapacity:      10
    - properties.raiPolicyName:        "Microsoft.DefaultV2"
    - properties.versionUpgradeOption: "OnceNewDefaultVersionAvailable"

  ~ Microsoft.Consumption/budgets/cognilens-dev-budget [2023-11-01]
    ~ properties.timePeriod.endDate:   "2036-06-28T00:00:00Z" => "[dateTimeAdd(utcNow('yyyy-MM-01''T''00:00:00Z'), 'P10Y', 'yyyy-MM-dd''T''00:00:00Z')]"
    ~ properties.timePeriod.startDate: "2026-07-01T00:00:00Z" => "[utcNow('yyyy-MM-01''T''00:00:00Z')]"

  ~ Microsoft.Insights/components/cognilens-dev-appi [2020-02-02]
    + properties.Flow_Type:      "Bluefield"
    + properties.Request_Source: "rest"

  ~ Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-api-mi [2024-11-30]
    - properties:

        isolationScope: "None"


  ~ Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-sql-64sgu7kbbhj5e-deploy-mi [2024-11-30]
    - properties:

        isolationScope: "None"


  ~ Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi [2024-11-30]
    - properties:

        isolationScope: "None"


  ~ Microsoft.Search/searchServices/cognilens-search-dev [2024-06-01-preview]
    - properties.encryptionWithCmk:

        enforcement: "Unspecified"

    - properties.networkRuleSet:

        bypass: "None"

    - properties.semanticSearch: "free"

  ~ Microsoft.Storage/storageAccounts/cognilensdevst/blobServices/default [2023-05-01]
    - properties.deleteRetentionPolicy:

        allowPermanentDelete: false
        enabled:              false


  ~ Microsoft.Storage/storageAccounts/cognilensdevst/blobServices/default/containers/call-audio [2023-05-01]
    - properties.defaultEncryptionScope:      "$account-encryption-key"
    - properties.denyEncryptionScopeOverride: false

  ~ Microsoft.Storage/storageAccounts/cognilensdevst/queueServices/default [2023-05-01]
    - properties:

        logging.delete:                  false
        logging.read:                    false
        logging.retentionPolicy.enabled: false
        logging.version:                 "1.0"
        logging.write:                   false


  = Microsoft.CognitiveServices/accounts/cognilens-openai-dev [2024-10-01]
  = Microsoft.CognitiveServices/accounts/cognilens-speech-dev [2024-10-01]
  = Microsoft.Insights/actionGroups/cognilens-dev-budget-ag [2023-01-01]
  = Microsoft.KeyVault/vaults/cognilens-dev-kv [2023-07-01]
  = Microsoft.OperationalInsights/workspaces/cognilens-dev-law [2023-09-01]
  = Microsoft.Sql/servers/cognilens-dev-sql-64sgu7kbbhj5e [2023-08-01-preview]
  = Microsoft.Sql/servers/cognilens-dev-sql-64sgu7kbbhj5e/databases/CogniLens [2023-08-01-preview]
    x properties.minCapacity: 0.5
    x sku.capacity:           1
    x sku.tier:               "GeneralPurpose"

  = Microsoft.Sql/servers/cognilens-dev-sql-64sgu7kbbhj5e/firewallRules/AllowAllWindowsAzureIps [2023-08-01-preview]
  = Microsoft.Storage/storageAccounts/cognilensdevst [2023-05-01]
  = Microsoft.Storage/storageAccounts/cognilensdevst/queueServices/default/queues/analyze-jobs [2023-05-01]
  = Microsoft.Storage/storageAccounts/cognilensdevst/queueServices/default/queues/analyze-jobs-poison [2023-05-01]
  * Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-sql-6bedkhvdnim7o-deploy-mi
  * Microsoft.Sql/servers/cognilens-dev-sql-64sgu7kbbhj5e/databases/master
  * microsoft.insights/actiongroups/Application Insights Smart Detection

Resource changes: 1 to create, 14 to modify, 11 no change, 13 unsupported, 3 to ignore.

Diagnostics (13): 
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-api-mi', '2024-11-30').principalId, 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[1].properties.template.resources[6]' on line 1 and column 10533 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').principalId, 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[1].properties.template.resources[6]' on line 1 and column 10533 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-api-mi', '2024-11-30').principalId, 'db58b8e5-c6ad-4a2a-8342-4190687cbf4a'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[1].properties.template.resources[7]' on line 1 and column 11325 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').principalId, 'db58b8e5-c6ad-4a2a-8342-4190687cbf4a'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[1].properties.template.resources[7]' on line 1 and column 11325 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-api-mi', '2024-11-30').principalId, '974c5e8b-45b9-4653-ba55-5f855dd0fb88'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[1].properties.template.resources[8]' on line 1 and column 12099 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Storage/storageAccounts/cognilensdevst', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').principalId, '974c5e8b-45b9-4653-ba55-5f855dd0fb88'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[1].properties.template.resources[8]' on line 1 and column 12099 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.KeyVault/vaults/cognilens-dev-kv', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.KeyVault/vaults/cognilens-dev-kv', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-api-mi', '2024-11-30').principalId, '4633458b-17de-408a-b874-0445c86b69e6'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[3].properties.template.resources[1]' on line 1 and column 17578 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.KeyVault/vaults/cognilens-dev-kv', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.KeyVault/vaults/cognilens-dev-kv', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').principalId, '4633458b-17de-408a-b874-0445c86b69e6'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[3].properties.template.resources[1]' on line 1 and column 17578 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.CognitiveServices/accounts/cognilens-speech-dev', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.CognitiveServices/accounts/cognilens-speech-dev', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').principalId, 'f2dc8367-1007-4938-bd23-fe263f013447'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[4].properties.template.resources[4]' on line 1 and column 22323 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.CognitiveServices/accounts/cognilens-openai-dev', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.CognitiveServices/accounts/cognilens-openai-dev', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').principalId, '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[4].properties.template.resources[5]' on line 1 and column 23017 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Search/searchServices/cognilens-search-dev', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Search/searchServices/cognilens-search-dev', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').principalId, '7ca78c08-252a-4471-8644-bb5ff32d4ba0'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[5].properties.template.resources[1]' on line 1 and column 26492 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Search/searchServices/cognilens-search-dev', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Search/searchServices/cognilens-search-dev', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-worker-mi', '2024-11-30').principalId, '8ebe5a00-799e-43f5-93ac-243d3dce84a7'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[5].properties.template.resources[2]' on line 1 and column 27165 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.
[extensionResourceId('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Search/searchServices/cognilens-search-dev', 'Microsoft.Authorization/roleAssignments', guid('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.Search/searchServices/cognilens-search-dev', reference('/subscriptions/163d0954-8f1c-442e-88f9-e11864c54b0f/resourceGroups/rg-cognilens-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cognilens-dev-api-mi', '2024-11-30').principalId, '1407120a-92aa-4202-b7e9-c0e197c71c8f'))] (Unsupported) Changes to the resource declared at 'properties.template.resources[5].properties.template.resources[3]' on line 1 and column 27842 cannot be analyzed because its resource ID or API version cannot be calculated until the deployment is under way. Please see https://aka.ms/WhatIfUnidentifiableResource for more guidance.

@Affan2900
Affan2900 merged commit 21d3718 into main Jul 26, 2026
6 checks passed
Affan2900 added a commit that referenced this pull request Jul 27, 2026
Record deployment findings; resolve prod image placeholders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant