PANIC in documentation
t0yv0 opened this issue · comments
What happened?
There are panics rendered into documentation.
Similarly to pulumi/pulumi-random#890 these could be fixable by upgrading aux provider deps in .ci-mgmt.yml
Example
Running git grep panic
produces output but should not:
provider/cmd/pulumi-resource-azure/schema.json: "description": "Manages a KeyVault Managed Hardware Security Module Role Definition. This resource works together with Managed hardware security module resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azure.keyvault.ManagedHardwareSecurityModule;\nimport com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleArgs;\nimport com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinition;\nimport com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinitionArgs;\nimport com.pulumi.azure.keyvault.inputs.ManagedHardwareSecurityModuleRoleDefinitionPermissionArgs;\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 example = new ManagedHardwareSecurityModule(\"example\", ManagedHardwareSecurityModuleArgs.builder() \n .name(\"example\")\n .resourceGroupName(exampleAzurermResourceGroup.name())\n .location(exampleAzurermResourceGroup.location())\n .skuName(\"Standard_B1\")\n .tenantId(current.tenantId())\n .adminObjectIds(current.objectId())\n .purgeProtectionEnabled(false)\n .activeConfig(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))\n .build());\n\n var exampleManagedHardwareSecurityModuleRoleDefinition = new ManagedHardwareSecurityModuleRoleDefinition(\"exampleManagedHardwareSecurityModuleRoleDefinition\", ManagedHardwareSecurityModuleRoleDefinitionArgs.builder() \n .name(\"7d206142-bf01-11ed-80bc-00155d61ee9e\")\n .vaultBaseUrl(example.hsmUri())\n .description(\"desc foo\")\n .permissions(ManagedHardwareSecurityModuleRoleDefinitionPermissionArgs.builder()\n .dataActions(\"Microsoft.KeyVault/managedHsm/keys/read/action\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: azure:keyvault:ManagedHardwareSecurityModule\n properties:\n name: example\n resourceGroupName: ${exampleAzurermResourceGroup.name}\n location: ${exampleAzurermResourceGroup.location}\n skuName: Standard_B1\n tenantId: ${current.tenantId}\n adminObjectIds:\n - ${current.objectId}\n purgeProtectionEnabled: false\n activeConfig:\n - securityDomainCertificate:\n - ${cert[0].id}\n - ${cert[1].id}\n - ${cert[2].id}\n securityDomainQuorum: 2\n exampleManagedHardwareSecurityModuleRoleDefinition:\n type: azure:keyvault:ManagedHardwareSecurityModuleRoleDefinition\n name: example\n properties:\n name: 7d206142-bf01-11ed-80bc-00155d61ee9e\n vaultBaseUrl: ${example.hsmUri}\n description: desc foo\n permissions:\n - dataActions:\n - Microsoft.KeyVault/managedHsm/keys/read/action\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nKeyVaults can be imported using the `resource id`, e.g.\n\n```sh\n$ pulumi import azure:keyvault/managedHardwareSecurityModuleRoleDefinition:ManagedHardwareSecurityModuleRoleDefinition example https://0000.managedhsm.azure.net///RoleDefinition/00000000-0000-0000-0000-000000000000\n```\n\n",
provider/cmd/pulumi-resource-azure/schema.json: "description": "Manages an Azure Web PubSub Custom Certificate.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure from \"@pulumi/azure\";\nimport * as azurerm from \"@pulumi/azurerm\";\nimport * as std from \"@pulumi/std\";\n\nconst current = azure.core.getClientConfig({});\nconst example = new azure.core.ResourceGroup(\"example\", {\n name: \"example-resources\",\n location: \"West Europe\",\n});\nconst exampleWebPubsubService = new azurerm.index.WebPubsubService(\"example\", {\n name: \"example-webpubsub\",\n location: testAzurermResourceGroup.location,\n resourceGroupName: testAzurermResourceGroup.name,\n sku: [{\n name: \"Premium_P1\",\n capacity: 1,\n }],\n identity: [{\n type: \"SystemAssigned\",\n }],\n});\nconst exampleKeyVault = new azure.keyvault.KeyVault(\"example\", {\n name: \"examplekeyvault\",\n location: example.location,\n resourceGroupName: example.name,\n tenantId: current.then(current =\u003e current.tenantId),\n skuName: \"premium\",\n accessPolicies: [\n {\n tenantId: current.then(current =\u003e current.tenantId),\n objectId: current.then(current =\u003e current.objectId),\n certificatePermissions: [\n \"Create\",\n \"Get\",\n \"List\",\n ],\n secretPermissions: [\n \"Get\",\n \"List\",\n ],\n },\n {\n tenantId: current.then(current =\u003e current.tenantId),\n objectId: testAzurermWebPubsubService.identity[0].principalId,\n certificatePermissions: [\n \"Create\",\n \"Get\",\n \"List\",\n ],\n secretPermissions: [\n \"Get\",\n \"List\",\n ],\n },\n ],\n});\nconst exampleCertificate = new azure.keyvault.Certificate(\"example\", {\n name: \"imported-cert\",\n keyVaultId: exampleKeyVault.id,\n certificate: {\n contents: std.filebase64({\n input: \"certificate-to-import.pfx\",\n }).then(invoke =\u003e invoke.result),\n password: \"\",\n },\n});\nconst test = new azure.webpubsub.CustomCertificate(\"test\", {\n name: \"example-cert\",\n webPubsubId: exampleWebPubsubService.id,\n customCertificateId: exampleCertificate.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_azure as azure\nimport pulumi_azurerm as azurerm\nimport pulumi_std as std\n\ncurrent = azure.core.get_client_config()\nexample = azure.core.ResourceGroup(\"example\",\n name=\"example-resources\",\n location=\"West Europe\")\nexample_web_pubsub_service = azurerm.index.WebPubsubService(\"example\",\n name=example-webpubsub,\n location=test_azurerm_resource_group.location,\n resource_group_name=test_azurerm_resource_group.name,\n sku=[{\n name: Premium_P1,\n capacity: 1,\n }],\n identity=[{\n type: SystemAssigned,\n }])\nexample_key_vault = azure.keyvault.KeyVault(\"example\",\n name=\"examplekeyvault\",\n location=example.location,\n resource_group_name=example.name,\n tenant_id=current.tenant_id,\n sku_name=\"premium\",\n access_policies=[\n azure.keyvault.KeyVaultAccessPolicyArgs(\n tenant_id=current.tenant_id,\n object_id=current.object_id,\n certificate_permissions=[\n \"Create\",\n \"Get\",\n \"List\",\n ],\n secret_permissions=[\n \"Get\",\n \"List\",\n ],\n ),\n azure.keyvault.KeyVaultAccessPolicyArgs(\n tenant_id=current.tenant_id,\n object_id=test_azurerm_web_pubsub_service[\"identity\"][0][\"principalId\"],\n certificate_permissions=[\n \"Create\",\n \"Get\",\n \"List\",\n ],\n secret_permissions=[\n \"Get\",\n \"List\",\n ],\n ),\n ])\nexample_certificate = azure.keyvault.Certificate(\"example\",\n name=\"imported-cert\",\n key_vault_id=example_key_vault.id,\n certificate=azure.keyvault.CertificateCertificateArgs(\n contents=std.filebase64(input=\"certificate-to-import.pfx\").result,\n password=\"\",\n ))\ntest = azure.webpubsub.CustomCertificate(\"test\",\n name=\"example-cert\",\n web_pubsub_id=example_web_pubsub_service[\"id\"],\n custom_certificate_id=example_certificate.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Azure = Pulumi.Azure;\nusing Azurerm = Pulumi.Azurerm;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Azure.Core.GetClientConfig.Invoke();\n\n var example = new Azure.Core.ResourceGroup(\"example\", new()\n {\n Name = \"example-resources\",\n Location = \"West Europe\",\n });\n\n var exampleWebPubsubService = new Azurerm.Index.WebPubsubService(\"example\", new()\n {\n Name = \"example-webpubsub\",\n Location = testAzurermResourceGroup.Location,\n ResourceGroupName = testAzurermResourceGroup.Name,\n Sku = new[]\n {\n \n {\n { \"name\", \"Premium_P1\" },\n { \"capacity\", 1 },\n },\n },\n Identity = new[]\n {\n \n {\n { \"type\", \"SystemAssigned\" },\n },\n },\n });\n\n var exampleKeyVault = new Azure.KeyVault.KeyVault(\"example\", new()\n {\n Name = \"examplekeyvault\",\n Location = example.Location,\n ResourceGroupName = example.Name,\n TenantId = current.Apply(getClientConfigResult =\u003e getClientConfigResult.TenantId),\n SkuName = \"premium\",\n AccessPolicies = new[]\n {\n new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs\n {\n TenantId = current.Apply(getClientConfigResult =\u003e getClientConfigResult.TenantId),\n ObjectId = current.Apply(getClientConfigResult =\u003e getClientConfigResult.ObjectId),\n CertificatePermissions = new[]\n {\n \"Create\",\n \"Get\",\n \"List\",\n },\n SecretPermissions = new[]\n {\n \"Get\",\n \"List\",\n },\n },\n new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs\n {\n TenantId = current.Apply(getClientConfigResult =\u003e getClientConfigResult.TenantId),\n ObjectId = testAzurermWebPubsubService.Identity[0].PrincipalId,\n CertificatePermissions = new[]\n {\n \"Create\",\n \"Get\",\n \"List\",\n },\n SecretPermissions = new[]\n {\n \"Get\",\n \"List\",\n },\n },\n },\n });\n\n var exampleCertificate = new Azure.KeyVault.Certificate(\"example\", new()\n {\n Name = \"imported-cert\",\n KeyVaultId = exampleKeyVault.Id,\n KeyVaultCertificate = new Azure.KeyVault.Inputs.CertificateCertificateArgs\n {\n Contents = Std.Filebase64.Invoke(new()\n {\n Input = \"certificate-to-import.pfx\",\n }).Apply(invoke =\u003e invoke.Result),\n Password = \"\",\n },\n });\n\n var test = new Azure.WebPubSub.CustomCertificate(\"test\", new()\n {\n Name = \"example-cert\",\n WebPubsubId = exampleWebPubsubService.Id,\n CustomCertificateId = exampleCertificate.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core\"\n\t\"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault\"\n\t\"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/webpubsub\"\n\t\"github.com/pulumi/pulumi-azurerm/sdk/v1/go/azurerm\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := core.GetClientConfig(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := core.NewResourceGroup(ctx, \"example\", \u0026core.ResourceGroupArgs{\n\t\t\tName: pulumi.String(\"example-resources\"),\n\t\t\tLocation: pulumi.String(\"West Europe\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleWebPubsubService, err := index.NewWebPubsubService(ctx, \"example\", \u0026index.WebPubsubServiceArgs{\n\t\t\tName: \"example-webpubsub\",\n\t\t\tLocation: testAzurermResourceGroup.Location,\n\t\t\tResourceGroupName: testAzurermResourceGroup.Name,\n\t\t\tSku: []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"name\": \"Premium_P1\",\n\t\t\t\t\t\"capacity\": 1,\n\t\t\t\t},\n\t\t\t},\n\t\t\tIdentity: []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"type\": \"SystemAssigned\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKeyVault, err := keyvault.NewKeyVault(ctx, \"example\", \u0026keyvault.KeyVaultArgs{\n\t\t\tName: pulumi.String(\"examplekeyvault\"),\n\t\t\tLocation: example.Location,\n\t\t\tResourceGroupName: example.Name,\n\t\t\tTenantId: pulumi.String(current.TenantId),\n\t\t\tSkuName: pulumi.String(\"premium\"),\n\t\t\tAccessPolicies: keyvault.KeyVaultAccessPolicyArray{\n\t\t\t\t\u0026keyvault.KeyVaultAccessPolicyArgs{\n\t\t\t\t\tTenantId: pulumi.String(current.TenantId),\n\t\t\t\t\tObjectId: pulumi.String(current.ObjectId),\n\t\t\t\t\tCertificatePermissions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"Create\"),\n\t\t\t\t\t\tpulumi.String(\"Get\"),\n\t\t\t\t\t\tpulumi.String(\"List\"),\n\t\t\t\t\t},\n\t\t\t\t\tSecretPermissions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"Get\"),\n\t\t\t\t\t\tpulumi.String(\"List\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026keyvault.KeyVaultAccessPolicyArgs{\n\t\t\t\t\tTenantId: pulumi.String(current.TenantId),\n\t\t\t\t\tObjectId: pulumi.Any(testAzurermWebPubsubService.Identity[0].PrincipalId),\n\t\t\t\t\tCertificatePermissions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"Create\"),\n\t\t\t\t\t\tpulumi.String(\"Get\"),\n\t\t\t\t\t\tpulumi.String(\"List\"),\n\t\t\t\t\t},\n\t\t\t\t\tSecretPermissions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"Get\"),\n\t\t\t\t\t\tpulumi.String(\"List\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeFilebase64, err := std.Filebase64(ctx, \u0026std.Filebase64Args{\n\t\t\tInput: \"certificate-to-import.pfx\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleCertificate, err := keyvault.NewCertificate(ctx, \"example\", \u0026keyvault.CertificateArgs{\n\t\t\tName: pulumi.String(\"imported-cert\"),\n\t\t\tKeyVaultId: exampleKeyVault.ID(),\n\t\t\tCertificate: \u0026keyvault.CertificateCertificateArgs{\n\t\t\t\tContents: invokeFilebase64.Result,\n\t\t\t\tPassword: pulumi.String(\"\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = webpubsub.NewCustomCertificate(ctx, \"test\", \u0026webpubsub.CustomCertificateArgs{\n\t\t\tName: pulumi.String(\"example-cert\"),\n\t\t\tWebPubsubId: exampleWebPubsubService.Id,\n\t\t\tCustomCertificateId: exampleCertificate.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azure.core.CoreFunctions;\nimport com.pulumi.azure.core.ResourceGroup;\nimport com.pulumi.azure.core.ResourceGroupArgs;\nimport com.pulumi.azurerm.webPubsubService;\nimport com.pulumi.azurerm.WebPubsubServiceArgs;\nimport com.pulumi.azure.keyvault.KeyVault;\nimport com.pulumi.azure.keyvault.KeyVaultArgs;\nimport com.pulumi.azure.keyvault.inputs.KeyVaultAccessPolicyArgs;\nimport com.pulumi.azure.keyvault.Certificate;\nimport com.pulumi.azure.keyvault.CertificateArgs;\nimport com.pulumi.azure.keyvault.inputs.CertificateCertificateArgs;\nimport com.pulumi.azure.webpubsub.CustomCertificate;\nimport com.pulumi.azure.webpubsub.CustomCertificateArgs;\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 final var current = CoreFunctions.getClientConfig();\n\n var example = new ResourceGroup(\"example\", ResourceGroupArgs.builder() \n .name(\"example-resources\")\n .location(\"West Europe\")\n .build());\n\n var exampleWebPubsubService = new WebPubsubService(\"exampleWebPubsubService\", WebPubsubServiceArgs.builder() \n .name(\"example-webpubsub\")\n .location(testAzurermResourceGroup.location())\n .resourceGroupName(testAzurermResourceGroup.name())\n .sku(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))\n .identity(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))\n .build());\n\n var exampleKeyVault = new KeyVault(\"exampleKeyVault\", KeyVaultArgs.builder() \n .name(\"examplekeyvault\")\n .location(example.location())\n .resourceGroupName(example.name())\n .tenantId(current.applyValue(getClientConfigResult -\u003e getClientConfigResult.tenantId()))\n .skuName(\"premium\")\n .accessPolicies( \n KeyVaultAccessPolicyArgs.builder()\n .tenantId(current.applyValue(getClientConfigResult -\u003e getClientConfigResult.tenantId()))\n .objectId(current.applyValue(getClientConfigResult -\u003e getClientConfigResult.objectId()))\n .certificatePermissions( \n \"Create\",\n \"Get\",\n \"List\")\n .secretPermissions( \n \"Get\",\n \"List\")\n .build(),\n KeyVaultAccessPolicyArgs.builder()\n .tenantId(current.applyValue(getClientConfigResult -\u003e getClientConfigResult.tenantId()))\n .objectId(testAzurermWebPubsubService.identity()[0].principalId())\n .certificatePermissions( \n \"Create\",\n \"Get\",\n \"List\")\n .secretPermissions( \n \"Get\",\n \"List\")\n .build())\n .build());\n\n var exampleCertificate = new Certificate(\"exampleCertificate\", CertificateArgs.builder() \n .name(\"imported-cert\")\n .keyVaultId(exampleKeyVault.id())\n .certificate(CertificateCertificateArgs.builder()\n .contents(StdFunctions.filebase64(Filebase64Args.builder()\n .input(\"certificate-to-import.pfx\")\n .build()).result())\n .password(\"\")\n .build())\n .build());\n\n var test = new CustomCertificate(\"test\", CustomCertificateArgs.builder() \n .name(\"example-cert\")\n .webPubsubId(exampleWebPubsubService.id())\n .customCertificateId(exampleCertificate.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: azure:core:ResourceGroup\n properties:\n name: example-resources\n location: West Europe\n exampleWebPubsubService:\n type: azurerm:webPubsubService\n name: example\n properties:\n name: example-webpubsub\n location: ${testAzurermResourceGroup.location}\n resourceGroupName: ${testAzurermResourceGroup.name}\n sku:\n - name: Premium_P1\n capacity: 1\n identity:\n - type: SystemAssigned\n exampleKeyVault:\n type: azure:keyvault:KeyVault\n name: example\n properties:\n name: examplekeyvault\n location: ${example.location}\n resourceGroupName: ${example.name}\n tenantId: ${current.tenantId}\n skuName: premium\n accessPolicies:\n - tenantId: ${current.tenantId}\n objectId: ${current.objectId}\n certificatePermissions:\n - Create\n - Get\n - List\n secretPermissions:\n - Get\n - List\n - tenantId: ${current.tenantId}\n objectId: ${testAzurermWebPubsubService.identity[0].principalId}\n certificatePermissions:\n - Create\n - Get\n - List\n secretPermissions:\n - Get\n - List\n exampleCertificate:\n type: azure:keyvault:Certificate\n name: example\n properties:\n name: imported-cert\n keyVaultId: ${exampleKeyVault.id}\n certificate:\n contents:\n fn::invoke:\n Function: std:filebase64\n Arguments:\n input: certificate-to-import.pfx\n Return: result\n password:\n test:\n type: azure:webpubsub:CustomCertificate\n properties:\n name: example-cert\n webPubsubId: ${exampleWebPubsubService.id}\n customCertificateId: ${exampleCertificate.id}\nvariables:\n current:\n fn::invoke:\n Function: azure:core:getClientConfig\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nCustom Certificate for a Web PubSub service can be imported using the `resource id`, e.g.\n\n```sh\n$ pulumi import azure:webpubsub/customCertificate:CustomCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/WebPubsub1/customCertificates/cert1\n```\n\n",
sdk/java/src/main/java/com/pulumi/azure/keyvault/ManagedHardwareSecurityModuleRoleDefinition.java: * .activeConfig(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
sdk/java/src/main/java/com/pulumi/azure/webpubsub/CustomCertificate.java: * .sku(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
sdk/java/src/main/java/com/pulumi/azure/webpubsub/CustomCertificate.java: * .identity(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
Output of pulumi about
N/A
Additional context
N/A
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
AWS example: pulumi/pulumi-aws#3885 - it can be not so trivial to completely eliminate.