Im trying to create a `MetricAlert`that is connect...
# azure
Im trying to create a `MetricAlert`that is connected to a
- according to it looks like it doesn't need a
-property, but Pulumi requires that
is not empty. Settings scopes to ApplicationInsightsId failes with:
Copy code
Alert scope is invalid
Not settings Scopes failes with:
Copy code
Pulumi.Azure.Monitoring.MetricAlertArgs._scopes is required but was not given a value (Parameter '_scopes')
Any ideas? Sample code in thread.
Copy code
var insightsId = "<id to azure resource>";
var testname = "mywebtestalert";
var webtest = new WebTest(...);
_ = new MetricAlert(testname, new MetricAlertArgs()
    ResourceGroupName = ResourceGroupName,
    Name = testname,
    Scopes =
    Description = $"Use {testname} to monitor {name}",
    ApplicationInsightsWebTestLocationAvailabilityCriteria =
        new MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs()
            ComponentId = insightsId,
            FailedLocationCount = 2,
            WebTestId = webtest.Id,
is it just that you've used {} instead of [] for scopes?
looks like it takes an array of strings not an object
oh sorry i'm thinking of typescript 😄
😀 1