This is the error I get when deploying my resource...
# azure
a
This is the error I get when deploying my resources:
Copy code
error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="WorkspaceResourceId is not in valid format" InnerError={"trace":["System.ArgumentException"]}
b
šŸ‘‹ I did face issues while trying to do the same as you are doing and I ended using the `@pulumi/azure-native/insights/v20200202`version using JS/TS. In that API version, the support for adding a workspace is there. Here is an example of what Iā€™m doing:
Copy code
new Component(
    `${name}-app-insights-component`,
    {
      applicationType: type ?? DEFAULT_APPLICATION_TYPE,
      flowType: FlowType.Bluefield,
      kind: kind ?? DEFAULT_KIND,
      resourceGroupName: resourceGroup,
      resourceName: `${name}-logs`,
      ingestionMode: mode ?? DEFAULT_INGESTION_MODE,
      workspaceResourceId:
        workspaceId ||
        createLogAnalyticWorkspace({ name, resourceGroup, resourceOptions: resourceOptions?.workspace }, tags).id,
      tags,
    },
    resourceOptions?.component
  );
a
All the resources in C# have the latest version in the "regular" namespace. This is the first one that has the versioned namespace as the latest version. I was a little confused. But after trying a bunch I learned the right namespace. Thanks for sharing the info here!