pulumi-azure-native
pulumi-azure-native copied to clipboard
All Example Go SDK Code for Azure Insights do not Work
Hello!
- 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)
Issue details
When copying the code from the azure-native
Insights resources, for Go, all examples are broken. Specifically, the Alerts
and Criteria
properties report the error "Missing Method ElementType".
More info:
- In the examples,
[]insights.MetricAlertActionArgs
is used for theAlerts
property, however, the type ofAlerts
is insights.MetricAlertActionArray`. - In the examples,
insights.MetricAlert.........Criteria
is used for theCriteria
property, however, the type ofCriteria
ispulumi.Input
.
Steps to reproduce
- Create a new pulumi go program with
pulumi new azure-go
- Go to https://www.pulumi.com/registry/packages/azure-native/api-docs/insights/metricalert/
- Copy any one of the Go SDK examples and paste it into your newly created Pulumi Azure program (main.go).
- View errors
Expected: Code copied from Pulumi examples to work Actual: Code copied from Pulumi examples does now work/compile.
This is due to pulumi/pulumi#7735, point 4. As a codegen issue, it should be fixed in pulumi/pulumi. Marking as upstream
.
Current status: the MetricAlertActionArgs
vs MetricAlertActionArray
is fixed. The Criteria
issue is not.