Grafana Args
data class GrafanaArgs(val identity: Output<ManagedServiceIdentityArgs>? = null, val location: Output<String>? = null, val properties: Output<ManagedGrafanaPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val sku: Output<ResourceSkuArgs>? = null, val tags: Output<Map<String, String>>? = null, val workspaceName: Output<String>? = null) : ConvertibleToJava<GrafanaArgs>
The grafana resource type. Uses Azure REST API version 2022-08-01. In version 1.x of the Azure Native provider, it used API version 2022-05-01-preview. Other available API versions: 2021-09-01-preview, 2022-10-01-preview, 2023-09-01, 2023-10-01-preview, 2024-10-01.
Example Usage
Grafana_Create
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var grafana = new AzureNative.Dashboard.Grafana("grafana", new()
{
Identity = new AzureNative.Dashboard.Inputs.ManagedServiceIdentityArgs
{
Type = AzureNative.Dashboard.ManagedServiceIdentityType.SystemAssigned,
},
Location = "West US",
Properties = new AzureNative.Dashboard.Inputs.ManagedGrafanaPropertiesArgs
{
ApiKey = AzureNative.Dashboard.ApiKey.Enabled,
DeterministicOutboundIP = AzureNative.Dashboard.DeterministicOutboundIP.Enabled,
GrafanaIntegrations = new AzureNative.Dashboard.Inputs.GrafanaIntegrationsArgs
{
AzureMonitorWorkspaceIntegrations = new[]
{
new AzureNative.Dashboard.Inputs.AzureMonitorWorkspaceIntegrationArgs
{
AzureMonitorWorkspaceResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace",
},
},
},
PublicNetworkAccess = AzureNative.Dashboard.PublicNetworkAccess.Enabled,
ZoneRedundancy = AzureNative.Dashboard.ZoneRedundancy.Enabled,
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Dashboard.Inputs.ResourceSkuArgs
{
Name = "Standard",
},
Tags =
{
{ "Environment", "Dev" },
},
WorkspaceName = "myWorkspace",
});
});
Content copied to clipboard
package main
import (
dashboard "github.com/pulumi/pulumi-azure-native-sdk/dashboard/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dashboard.NewGrafana(ctx, "grafana", &dashboard.GrafanaArgs{
Identity: &dashboard.ManagedServiceIdentityArgs{
Type: pulumi.String(dashboard.ManagedServiceIdentityTypeSystemAssigned),
},
Location: pulumi.String("West US"),
Properties: &dashboard.ManagedGrafanaPropertiesArgs{
ApiKey: pulumi.String(dashboard.ApiKeyEnabled),
DeterministicOutboundIP: pulumi.String(dashboard.DeterministicOutboundIPEnabled),
GrafanaIntegrations: &dashboard.GrafanaIntegrationsArgs{
AzureMonitorWorkspaceIntegrations: dashboard.AzureMonitorWorkspaceIntegrationArray{
&dashboard.AzureMonitorWorkspaceIntegrationArgs{
AzureMonitorWorkspaceResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
},
},
},
PublicNetworkAccess: pulumi.String(dashboard.PublicNetworkAccessEnabled),
ZoneRedundancy: pulumi.String(dashboard.ZoneRedundancyEnabled),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &dashboard.ResourceSkuArgs{
Name: pulumi.String("Standard"),
},
Tags: pulumi.StringMap{
"Environment": pulumi.String("Dev"),
},
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.dashboard.Grafana;
import com.pulumi.azurenative.dashboard.GrafanaArgs;
import com.pulumi.azurenative.dashboard.inputs.ManagedServiceIdentityArgs;
import com.pulumi.azurenative.dashboard.inputs.ManagedGrafanaPropertiesArgs;
import com.pulumi.azurenative.dashboard.inputs.GrafanaIntegrationsArgs;
import com.pulumi.azurenative.dashboard.inputs.ResourceSkuArgs;
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 grafana = new Grafana("grafana", GrafanaArgs.builder()
.identity(ManagedServiceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.location("West US")
.properties(ManagedGrafanaPropertiesArgs.builder()
.apiKey("Enabled")
.deterministicOutboundIP("Enabled")
.grafanaIntegrations(GrafanaIntegrationsArgs.builder()
.azureMonitorWorkspaceIntegrations(AzureMonitorWorkspaceIntegrationArgs.builder()
.azureMonitorWorkspaceResourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace")
.build())
.build())
.publicNetworkAccess("Enabled")
.zoneRedundancy("Enabled")
.build())
.resourceGroupName("myResourceGroup")
.sku(ResourceSkuArgs.builder()
.name("Standard")
.build())
.tags(Map.of("Environment", "Dev"))
.workspaceName("myWorkspace")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:dashboard:Grafana myWorkspace /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(identity: Output<ManagedServiceIdentityArgs>? = null, location: Output<String>? = null, properties: Output<ManagedGrafanaPropertiesArgs>? = null, resourceGroupName: Output<String>? = null, sku: Output<ResourceSkuArgs>? = null, tags: Output<Map<String, String>>? = null, workspaceName: Output<String>? = null)
Properties
Link copied to clipboard
The managed identity of the grafana resource.
Link copied to clipboard
Properties specific to the grafana resource.
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
The Sku of the grafana resource.
Link copied to clipboard
The workspace name of Azure Managed Grafana.