From c70fbe29305afa2402fa6ad95783d04d4cd04469 Mon Sep 17 00:00:00 2001 From: VenelinMartinov Date: Thu, 9 May 2024 13:09:01 +0100 Subject: [PATCH] Patch frontdoor permadiff (#2014) fixes https://github.com/pulumi/pulumi-azure/issues/1421 by patching the upstream resource to be computed as the provider sets a value for it. This is needed for https://github.com/pulumi/pulumi-terraform-bridge/pull/1936 works around https://github.com/hashicorp/terraform-provider-azurerm/issues/25911 issue for patch: https://github.com/pulumi/pulumi-azure/issues/2015 upstream PR: https://github.com/hashicorp/terraform-provider-azurerm/pull/25912 --- ...oor-backend-pool-settings-to-computed.patch | 18 ++++++++++++++++++ provider/cmd/pulumi-resource-azure/schema.json | 1 + .../com/pulumi/azure/frontdoor/Frontdoor.java | 6 +++--- sdk/nodejs/frontdoor/frontdoor.ts | 2 +- sdk/python/pulumi_azure/frontdoor/frontdoor.py | 2 +- 5 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 patches/0011-set-frontdoor-backend-pool-settings-to-computed.patch diff --git a/patches/0011-set-frontdoor-backend-pool-settings-to-computed.patch b/patches/0011-set-frontdoor-backend-pool-settings-to-computed.patch new file mode 100644 index 0000000000..6b73c3a525 --- /dev/null +++ b/patches/0011-set-frontdoor-backend-pool-settings-to-computed.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Venelin +Date: Wed, 8 May 2024 18:25:30 +0100 +Subject: [PATCH] set frontdoor backend pool settings to computed + + +diff --git a/internal/services/frontdoor/frontdoor_resource.go b/internal/services/frontdoor/frontdoor_resource.go +index 8beaebb89e..23519eaa45 100644 +--- a/internal/services/frontdoor/frontdoor_resource.go ++++ b/internal/services/frontdoor/frontdoor_resource.go +@@ -2072,6 +2072,7 @@ func resourceFrontDoorSchema() map[string]*pluginsdk.Schema { + "backend_pool_settings": { + Type: pluginsdk.TypeList, + Optional: true, ++ Computed: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "enforce_backend_pools_certificate_name_check": { diff --git a/provider/cmd/pulumi-resource-azure/schema.json b/provider/cmd/pulumi-resource-azure/schema.json index 1d030470e6..a8efd104c7 100644 --- a/provider/cmd/pulumi-resource-azure/schema.json +++ b/provider/cmd/pulumi-resource-azure/schema.json @@ -185951,6 +185951,7 @@ "backendPoolHealthProbesMap", "backendPoolLoadBalancings", "backendPoolLoadBalancingSettingsMap", + "backendPoolSettings", "backendPoolsMap", "cname", "explicitResourceOrders", diff --git a/sdk/java/src/main/java/com/pulumi/azure/frontdoor/Frontdoor.java b/sdk/java/src/main/java/com/pulumi/azure/frontdoor/Frontdoor.java index 7caecfc44d..b3122e5c3c 100644 --- a/sdk/java/src/main/java/com/pulumi/azure/frontdoor/Frontdoor.java +++ b/sdk/java/src/main/java/com/pulumi/azure/frontdoor/Frontdoor.java @@ -189,14 +189,14 @@ public Output> backendPoolLoadBalancings * */ @Export(name="backendPoolSettings", refs={List.class,FrontdoorBackendPoolSetting.class}, tree="[0,1]") - private Output> backendPoolSettings; + private Output> backendPoolSettings; /** * @return A `backend_pool_settings` block as defined below. * */ - public Output>> backendPoolSettings() { - return Codegen.optional(this.backendPoolSettings); + public Output> backendPoolSettings() { + return this.backendPoolSettings; } /** * A `backend_pool` block as defined below. diff --git a/sdk/nodejs/frontdoor/frontdoor.ts b/sdk/nodejs/frontdoor/frontdoor.ts index b570e11ddf..439e792183 100644 --- a/sdk/nodejs/frontdoor/frontdoor.ts +++ b/sdk/nodejs/frontdoor/frontdoor.ts @@ -124,7 +124,7 @@ export class Frontdoor extends pulumi.CustomResource { /** * A `backendPoolSettings` block as defined below. */ - public readonly backendPoolSettings!: pulumi.Output; + public readonly backendPoolSettings!: pulumi.Output; /** * A `backendPool` block as defined below. * diff --git a/sdk/python/pulumi_azure/frontdoor/frontdoor.py b/sdk/python/pulumi_azure/frontdoor/frontdoor.py index 0e2277b13c..c414802596 100644 --- a/sdk/python/pulumi_azure/frontdoor/frontdoor.py +++ b/sdk/python/pulumi_azure/frontdoor/frontdoor.py @@ -866,7 +866,7 @@ def backend_pool_load_balancings(self) -> pulumi.Output[Sequence['outputs.Frontd @property @pulumi.getter(name="backendPoolSettings") - def backend_pool_settings(self) -> pulumi.Output[Optional[Sequence['outputs.FrontdoorBackendPoolSetting']]]: + def backend_pool_settings(self) -> pulumi.Output[Sequence['outputs.FrontdoorBackendPoolSetting']]: """ A `backend_pool_settings` block as defined below. """