Skip to content

Add API Center deployment ID properties to resource ID validation exceptions#798

Merged
psah434 merged 2 commits intomasterfrom
copilot/add-to-exclusion-list
Feb 13, 2026
Merged

Add API Center deployment ID properties to resource ID validation exceptions#798
psah434 merged 2 commits intomasterfrom
copilot/add-to-exclusion-list

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

definitionId and environmentId in Microsoft.ApiCenter/services/workspaces/apis/deployments are relative paths within the API Center service structure, not Azure resource IDs.

Changes

  • Added definitionId and environmentId to the exceptions list in IDs-Should-Be-Derived-From-ResourceIDs.test.ps1
  • Added test case validating API Center deployments with these properties

Example

{
  "type": "Microsoft.ApiCenter/services/workspaces/apis/deployments",
  "properties": {
    "definitionId": "/workspaces/testWorkspace/apis/testApi/versions/v1/definitions/openapi",
    "environmentId": "/workspaces/testWorkspace/environments/production"
  }
}

These properties now pass validation without requiring resourceId() functions, consistent with Azure template reference.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /usr/bin/pwsh pwsh -Command Import-Module ./arm-ttk/arm-ttk.psd1 -Force; Test-AzTemplate -TemplatePath ./unit-tests/IDs-Should-Be-Derived-From-ResourceIDs/Pass/api-center-deployment-with-definitionId-and-environmentId-should-pass.json -Test IDs-Should-Be-Derived-From-ResourceIDs (dns block)
    • Triggering command: /usr/bin/pwsh pwsh -Command Import-Module ../../arm-ttk/arm-ttk.psd1 -Force; Invoke-Pester -Path ./IDs-Should-Be-Derived-From-ResourceIDs.tests.ps1 (dns block)
    • Triggering command: /usr/bin/pwsh pwsh -Command Import-Module ./arm-ttk/arm-ttk.psd1 -Force; Test-AzTemplate -TemplatePath ./unit-tests/IDs-Should-Be-Derived-From-ResourceIDs/Pass/ -Test IDs-Should-Be-Derived-From-ResourceIDs | Where-Object { -not $_.Passed } | Select-Object -Property File, Errors (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>False failure in API Center deployment in IDs-Should-Be-Derived-From-ResourceIDs.test.ps1</issue_title>
<issue_description>Properties definitionId and environmentId in Microsoft.ApiCenter/services/workspaces/apis/deployments are not true resource IDs and should be added to the exceptions.

https://github.com/Azure/arm-ttk/blob/69d43855513c91846b7f4852e8768eee8c97327e/arm-ttk/testcases/deploymentTemplate/IDs-Should-Be-Derived-From-ResourceIDs.test.ps1

https://learn.microsoft.com/en-us/azure/templates/microsoft.apicenter/services/workspaces/apis/deployments?pivots=deployment-language-arm-template</issue_description>

<agent_instructions>Add it to the exclusion list</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: psah434 <114955590+psah434@users.noreply.github.com>
Copilot AI changed the title [WIP] Add exceptions for definitionId and environmentId in API Center deployment Add API Center deployment ID properties to resource ID validation exceptions Feb 13, 2026
Copilot AI requested a review from psah434 February 13, 2026 22:03
@psah434 psah434 marked this pull request as ready for review February 13, 2026 22:08
@psah434 psah434 merged commit 0cbe2b9 into master Feb 13, 2026
3 checks passed
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.

False failure in API Center deployment in IDs-Should-Be-Derived-From-ResourceIDs.test.ps1

2 participants