From 97ffe05728e7129f279441c1b4b18ab567d1d45c Mon Sep 17 00:00:00 2001 From: Hemal Shah Date: Wed, 16 Sep 2026 14:06:36 +0100 Subject: [PATCH 1/2] fix(azure): preserve APIM backend base policy --- .changeset/preserve-apim-backend-base.md | 6 ++++++ packages/azure/src/construct/rest-api-function/main.ts | 3 ++- packages/azure/test/constructs/rest-api-function.test.ts | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/preserve-apim-backend-base.md diff --git a/.changeset/preserve-apim-backend-base.md b/.changeset/preserve-apim-backend-base.md new file mode 100644 index 00000000..69b4e96b --- /dev/null +++ b/.changeset/preserve-apim-backend-base.md @@ -0,0 +1,6 @@ +--- +'@gradientedge/cdk-utils-azure': patch +'@gradientedge/cdk-utils': patch +--- + +Preserve inherited API Management backend policies when custom backend policy content is configured. diff --git a/packages/azure/src/construct/rest-api-function/main.ts b/packages/azure/src/construct/rest-api-function/main.ts index c02ffd0a..6304e635 100644 --- a/packages/azure/src/construct/rest-api-function/main.ts +++ b/packages/azure/src/construct/rest-api-function/main.ts @@ -360,7 +360,8 @@ export class AzureRestApiFunction extends AzureFunctionApp { - ${this.api.backendPolicyXmlContent ?? ''} + + ${this.api.backendPolicyXmlContent ?? ''} diff --git a/packages/azure/test/constructs/rest-api-function.test.ts b/packages/azure/test/constructs/rest-api-function.test.ts index d48ec90e..8678a74d 100644 --- a/packages/azure/test/constructs/rest-api-function.test.ts +++ b/packages/azure/test/constructs/rest-api-function.test.ts @@ -632,6 +632,7 @@ describe('TestAzureRestApiFunctionWithPolicyConstruct', () => { expect(stackWithPolicy.construct).toBeDefined() expect(stackWithPolicy.construct.api).toBeDefined() await expect(customApiPolicyValue).resolves.toContain('') + await expect(customApiPolicyValue).resolves.toContain('') }) test('dashboardVariables returns expected variables', () => { From cac8ed2c7ef91262ba018680f82d0103d4d2341a Mon Sep 17 00:00:00 2001 From: Hemal Shah Date: Wed, 16 Sep 2026 16:15:36 +0100 Subject: [PATCH 2/2] fix(azure): preserve APIM backend base policy --- .changeset/preserve-apim-backend-base.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.changeset/preserve-apim-backend-base.md b/.changeset/preserve-apim-backend-base.md index 69b4e96b..471f5a8b 100644 --- a/.changeset/preserve-apim-backend-base.md +++ b/.changeset/preserve-apim-backend-base.md @@ -1,6 +1,5 @@ --- '@gradientedge/cdk-utils-azure': patch -'@gradientedge/cdk-utils': patch --- Preserve inherited API Management backend policies when custom backend policy content is configured.