Standard Web Test
Manages a Application Insights Standard WebTest.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "rg-example",
location: "West Europe",
});
const exampleInsights = new azure.appinsights.Insights("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
applicationType: "web",
});
const exampleStandardWebTest = new azure.appinsights.StandardWebTest("example", {
name: "example-test",
resourceGroupName: example.name,
location: "West Europe",
applicationInsightsId: exampleInsights.id,
geoLocations: ["example"],
request: {
url: "http://www.example.com",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="rg-example",
location="West Europe")
example_insights = azure.appinsights.Insights("example",
name="example",
location=example.location,
resource_group_name=example.name,
application_type="web")
example_standard_web_test = azure.appinsights.StandardWebTest("example",
name="example-test",
resource_group_name=example.name,
location="West Europe",
application_insights_id=example_insights.id,
geo_locations=["example"],
request={
"url": "http://www.example.com",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "rg-example",
Location = "West Europe",
});
var exampleInsights = new Azure.AppInsights.Insights("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
ApplicationType = "web",
});
var exampleStandardWebTest = new Azure.AppInsights.StandardWebTest("example", new()
{
Name = "example-test",
ResourceGroupName = example.Name,
Location = "West Europe",
ApplicationInsightsId = exampleInsights.Id,
GeoLocations = new[]
{
"example",
},
Request = new Azure.AppInsights.Inputs.StandardWebTestRequestArgs
{
Url = "http://www.example.com",
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("rg-example"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
_, err = appinsights.NewStandardWebTest(ctx, "example", &appinsights.StandardWebTestArgs{
Name: pulumi.String("example-test"),
ResourceGroupName: example.Name,
Location: pulumi.String("West Europe"),
ApplicationInsightsId: exampleInsights.ID(),
GeoLocations: pulumi.StringArray{
pulumi.String("example"),
},
Request: &appinsights.StandardWebTestRequestArgs{
Url: pulumi.String("http://www.example.com"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appinsights.Insights;
import com.pulumi.azure.appinsights.InsightsArgs;
import com.pulumi.azure.appinsights.StandardWebTest;
import com.pulumi.azure.appinsights.StandardWebTestArgs;
import com.pulumi.azure.appinsights.inputs.StandardWebTestRequestArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("rg-example")
.location("West Europe")
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.applicationType("web")
.build());
var exampleStandardWebTest = new StandardWebTest("exampleStandardWebTest", StandardWebTestArgs.builder()
.name("example-test")
.resourceGroupName(example.name())
.location("West Europe")
.applicationInsightsId(exampleInsights.id())
.geoLocations("example")
.request(StandardWebTestRequestArgs.builder()
.url("http://www.example.com")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: rg-example
location: West Europe
exampleInsights:
type: azure:appinsights:Insights
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
applicationType: web
exampleStandardWebTest:
type: azure:appinsights:StandardWebTest
name: example
properties:
name: example-test
resourceGroupName: ${example.name}
location: West Europe
applicationInsightsId: ${exampleInsights.id}
geoLocations:
- example
request:
url: http://www.example.com
Import
Application Insights Standard WebTests can be imported using the resource id
, e.g.
$ pulumi import azure:appinsights/standardWebTest:StandardWebTest example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Insights/webTests/appinsightswebtest
Properties
The ID of the Application Insights instance on which the WebTest operates. Changing this forces a new Application Insights Standard WebTest to be created.
Purpose/user defined descriptive test for this WebTest.
Specifies a list of where to physically run the tests from to give global coverage for accessibility of your application.
A request
block as defined below.
The name of the Resource Group where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created.
Should the retry on WebTest failure be enabled?
Unique ID of this WebTest. This is typically the same value as the Name field.
A validation_rules
block as defined below.