From 89b827856552a4df83a26aad3e9fbc03698edccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otakar=20Hir=C5=A1?= Date: Sat, 16 Nov 2024 10:18:00 +0100 Subject: [PATCH 1/2] Add force replacement for SqlResourceSqlRoleAssignment fix #3701 --- provider/pkg/gen/replacement.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/provider/pkg/gen/replacement.go b/provider/pkg/gen/replacement.go index e468dbf0667c..a8c03261e6cb 100644 --- a/provider/pkg/gen/replacement.go +++ b/provider/pkg/gen/replacement.go @@ -37,6 +37,9 @@ var forceNewMap = map[string]map[string]codegen.StringSet{ "vmSize", ), }, + "DocumentDB": { + "SqlResourceSqlRoleAssignment": codegen.NewStringSet("principalId", "scope"), + }, "Insights": { "Component": codegen.NewStringSet(), // covered by x-ms-mutability }, From 5e47f61ff8f5940474c8aaf686c0c09c1c7ae09b Mon Sep 17 00:00:00 2001 From: Thomas Kappler Date: Mon, 18 Nov 2024 09:38:11 +0100 Subject: [PATCH 2/2] Regenerate schema --- provider/cmd/pulumi-resource-azure-native/schema.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/provider/cmd/pulumi-resource-azure-native/schema.json b/provider/cmd/pulumi-resource-azure-native/schema.json index 370f1f3692eb..a6c55e2f7d32 100644 --- a/provider/cmd/pulumi-resource-azure-native/schema.json +++ b/provider/cmd/pulumi-resource-azure-native/schema.json @@ -626073,7 +626073,7 @@ ] }, "azure-native:datamigration:ServiceTask": { - "description": "A task resource\nAzure REST API version: 2021-06-30.\n\nOther available API versions: 2022-03-30-preview, 2023-07-15-preview.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Tasks_CreateOrUpdate\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var serviceTask = new AzureNative.DataMigration.ServiceTask(\"serviceTask\", new()\n {\n GroupName = \"DmsSdkRg\",\n Properties = \n {\n { \"input\", new AzureNative.DataMigration.Inputs.MongoDbConnectionInfoArgs\n {\n ServerVersion = \"NA\",\n } },\n { \"taskType\", \"Service.Check.OCI\" },\n },\n ServiceName = \"DmsSdkService\",\n TaskName = \"DmsSdkTask\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\tdatamigration \"github.com/pulumi/pulumi-azure-native-sdk/datamigration/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\n_, err := datamigration.NewServiceTask(ctx, \"serviceTask\", \u0026datamigration.ServiceTaskArgs{\nGroupName: pulumi.String(\"DmsSdkRg\"),\nProperties: interface{}{\nInput: \u0026datamigration.MigrateMySqlAzureDbForMySqlSyncTaskInputArgs{\nServerVersion: \"NA\",\n},\nTaskType: pulumi.String(\"Service.Check.OCI\"),\n},\nServiceName: pulumi.String(\"DmsSdkService\"),\nTaskName: pulumi.String(\"DmsSdkTask\"),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.datamigration.ServiceTask;\nimport com.pulumi.azurenative.datamigration.ServiceTaskArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var serviceTask = new ServiceTask(\"serviceTask\", ServiceTaskArgs.builder()\n .groupName(\"DmsSdkRg\")\n .properties(ConnectToMongoDbTaskPropertiesArgs.builder()\n .input(MongoDbConnectionInfoArgs.builder()\n .serverVersion(\"NA\")\n .build())\n .taskType(\"Service.Check.OCI\")\n .build())\n .serviceName(\"DmsSdkService\")\n .taskName(\"DmsSdkTask\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst serviceTask = new azure_native.datamigration.ServiceTask(\"serviceTask\", {\n groupName: \"DmsSdkRg\",\n properties: {\n input: {\n serverVersion: \"NA\",\n },\n taskType: \"Service.Check.OCI\",\n },\n serviceName: \"DmsSdkService\",\n taskName: \"DmsSdkTask\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nservice_task = azure_native.datamigration.ServiceTask(\"serviceTask\",\n group_name=\"DmsSdkRg\",\n properties={\n \"input\": {\n \"server_version\": \"NA\",\n },\n \"task_type\": \"Service.Check.OCI\",\n },\n service_name=\"DmsSdkService\",\n task_name=\"DmsSdkTask\")\n\n```\n\n```yaml\nresources:\n serviceTask:\n type: azure-native:datamigration:ServiceTask\n properties:\n groupName: DmsSdkRg\n properties:\n input:\n serverVersion: NA\n taskType: Service.Check.OCI\n serviceName: DmsSdkService\n taskName: DmsSdkTask\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:datamigration:ServiceTask DmsSdkTask /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName} \n```\n", + "description": "A task resource\nAzure REST API version: 2021-06-30.\n\nOther available API versions: 2022-03-30-preview, 2023-07-15-preview.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Tasks_CreateOrUpdate\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var serviceTask = new AzureNative.DataMigration.ServiceTask(\"serviceTask\", new()\n {\n GroupName = \"DmsSdkRg\",\n Properties = \n {\n { \"input\", new AzureNative.DataMigration.Inputs.MongoDbConnectionInfoArgs\n {\n ServerVersion = \"NA\",\n } },\n { \"taskType\", \"Service.Check.OCI\" },\n },\n ServiceName = \"DmsSdkService\",\n TaskName = \"DmsSdkTask\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\tdatamigration \"github.com/pulumi/pulumi-azure-native-sdk/datamigration/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\n_, err := datamigration.NewServiceTask(ctx, \"serviceTask\", \u0026datamigration.ServiceTaskArgs{\nGroupName: pulumi.String(\"DmsSdkRg\"),\nProperties: interface{}{\nInput: \u0026datamigration.MongoDbConnectionInfoArgs{\nServerVersion: \"NA\",\n},\nTaskType: pulumi.String(\"Service.Check.OCI\"),\n},\nServiceName: pulumi.String(\"DmsSdkService\"),\nTaskName: pulumi.String(\"DmsSdkTask\"),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.datamigration.ServiceTask;\nimport com.pulumi.azurenative.datamigration.ServiceTaskArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var serviceTask = new ServiceTask(\"serviceTask\", ServiceTaskArgs.builder()\n .groupName(\"DmsSdkRg\")\n .properties(ConnectToMongoDbTaskPropertiesArgs.builder()\n .input(MongoDbConnectionInfoArgs.builder()\n .serverVersion(\"NA\")\n .build())\n .taskType(\"Service.Check.OCI\")\n .build())\n .serviceName(\"DmsSdkService\")\n .taskName(\"DmsSdkTask\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst serviceTask = new azure_native.datamigration.ServiceTask(\"serviceTask\", {\n groupName: \"DmsSdkRg\",\n properties: {\n input: {\n serverVersion: \"NA\",\n },\n taskType: \"Service.Check.OCI\",\n },\n serviceName: \"DmsSdkService\",\n taskName: \"DmsSdkTask\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nservice_task = azure_native.datamigration.ServiceTask(\"serviceTask\",\n group_name=\"DmsSdkRg\",\n properties={\n \"input\": {\n \"server_version\": \"NA\",\n },\n \"task_type\": \"Service.Check.OCI\",\n },\n service_name=\"DmsSdkService\",\n task_name=\"DmsSdkTask\")\n\n```\n\n```yaml\nresources:\n serviceTask:\n type: azure-native:datamigration:ServiceTask\n properties:\n groupName: DmsSdkRg\n properties:\n input:\n serverVersion: NA\n taskType: Service.Check.OCI\n serviceName: DmsSdkService\n taskName: DmsSdkTask\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:datamigration:ServiceTask DmsSdkTask /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName} \n```\n", "properties": { "etag": { "type": "string", @@ -651181,7 +651181,8 @@ }, "principalId": { "type": "string", - "description": "The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription." + "description": "The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription.", + "willReplaceOnChanges": true }, "resourceGroupName": { "type": "string", @@ -651199,7 +651200,8 @@ }, "scope": { "type": "string", - "description": "The data plane resource path for which access is being granted through this Role Assignment." + "description": "The data plane resource path for which access is being granted through this Role Assignment.", + "willReplaceOnChanges": true } }, "requiredInputs": [