1. Packages
  2. Grafana Cloud
  3. API Docs
  4. assert
  5. SuppressedAssertionsConfig
Grafana v2.13.0 published on Friday, Oct 24, 2025 by pulumiverse

grafana.assert.SuppressedAssertionsConfig

Get Started
grafana logo
Grafana v2.13.0 published on Friday, Oct 24, 2025 by pulumiverse

    Manages Asserts Disabled Alert Configurations through Grafana API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    // Basic suppressed alert configuration for maintenance
    const maintenanceWindow = new grafana.assert.SuppressedAssertionsConfig("maintenance_window", {
        name: "MaintenanceWindow",
        matchLabels: {
            service: "api-service",
            maintenance: "true",
        },
    });
    // Suppress specific alertname during deployment
    const deploymentSuppression = new grafana.assert.SuppressedAssertionsConfig("deployment_suppression", {
        name: "DeploymentSuppression",
        matchLabels: {
            alertname: "HighLatency",
            job: "web-service",
            env: "staging",
        },
    });
    // Suppress alerts for specific test environment
    const testEnvironmentSuppression = new grafana.assert.SuppressedAssertionsConfig("test_environment_suppression", {
        name: "TestEnvironmentSuppression",
        matchLabels: {
            alertgroup: "test.alerts",
            environment: "test",
        },
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    # Basic suppressed alert configuration for maintenance
    maintenance_window = grafana.assert_.SuppressedAssertionsConfig("maintenance_window",
        name="MaintenanceWindow",
        match_labels={
            "service": "api-service",
            "maintenance": "true",
        })
    # Suppress specific alertname during deployment
    deployment_suppression = grafana.assert_.SuppressedAssertionsConfig("deployment_suppression",
        name="DeploymentSuppression",
        match_labels={
            "alertname": "HighLatency",
            "job": "web-service",
            "env": "staging",
        })
    # Suppress alerts for specific test environment
    test_environment_suppression = grafana.assert_.SuppressedAssertionsConfig("test_environment_suppression",
        name="TestEnvironmentSuppression",
        match_labels={
            "alertgroup": "test.alerts",
            "environment": "test",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana/assert"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Basic suppressed alert configuration for maintenance
    		_, err := assert.NewSuppressedAssertionsConfig(ctx, "maintenance_window", &assert.SuppressedAssertionsConfigArgs{
    			Name: pulumi.String("MaintenanceWindow"),
    			MatchLabels: pulumi.StringMap{
    				"service":     pulumi.String("api-service"),
    				"maintenance": pulumi.String("true"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Suppress specific alertname during deployment
    		_, err = assert.NewSuppressedAssertionsConfig(ctx, "deployment_suppression", &assert.SuppressedAssertionsConfigArgs{
    			Name: pulumi.String("DeploymentSuppression"),
    			MatchLabels: pulumi.StringMap{
    				"alertname": pulumi.String("HighLatency"),
    				"job":       pulumi.String("web-service"),
    				"env":       pulumi.String("staging"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Suppress alerts for specific test environment
    		_, err = assert.NewSuppressedAssertionsConfig(ctx, "test_environment_suppression", &assert.SuppressedAssertionsConfigArgs{
    			Name: pulumi.String("TestEnvironmentSuppression"),
    			MatchLabels: pulumi.StringMap{
    				"alertgroup":  pulumi.String("test.alerts"),
    				"environment": pulumi.String("test"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        // Basic suppressed alert configuration for maintenance
        var maintenanceWindow = new Grafana.Assert.SuppressedAssertionsConfig("maintenance_window", new()
        {
            Name = "MaintenanceWindow",
            MatchLabels = 
            {
                { "service", "api-service" },
                { "maintenance", "true" },
            },
        });
    
        // Suppress specific alertname during deployment
        var deploymentSuppression = new Grafana.Assert.SuppressedAssertionsConfig("deployment_suppression", new()
        {
            Name = "DeploymentSuppression",
            MatchLabels = 
            {
                { "alertname", "HighLatency" },
                { "job", "web-service" },
                { "env", "staging" },
            },
        });
    
        // Suppress alerts for specific test environment
        var testEnvironmentSuppression = new Grafana.Assert.SuppressedAssertionsConfig("test_environment_suppression", new()
        {
            Name = "TestEnvironmentSuppression",
            MatchLabels = 
            {
                { "alertgroup", "test.alerts" },
                { "environment", "test" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.assert.SuppressedAssertionsConfig;
    import com.pulumi.grafana.assert.SuppressedAssertionsConfigArgs;
    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) {
            // Basic suppressed alert configuration for maintenance
            var maintenanceWindow = new SuppressedAssertionsConfig("maintenanceWindow", SuppressedAssertionsConfigArgs.builder()
                .name("MaintenanceWindow")
                .matchLabels(Map.ofEntries(
                    Map.entry("service", "api-service"),
                    Map.entry("maintenance", "true")
                ))
                .build());
    
            // Suppress specific alertname during deployment
            var deploymentSuppression = new SuppressedAssertionsConfig("deploymentSuppression", SuppressedAssertionsConfigArgs.builder()
                .name("DeploymentSuppression")
                .matchLabels(Map.ofEntries(
                    Map.entry("alertname", "HighLatency"),
                    Map.entry("job", "web-service"),
                    Map.entry("env", "staging")
                ))
                .build());
    
            // Suppress alerts for specific test environment
            var testEnvironmentSuppression = new SuppressedAssertionsConfig("testEnvironmentSuppression", SuppressedAssertionsConfigArgs.builder()
                .name("TestEnvironmentSuppression")
                .matchLabels(Map.ofEntries(
                    Map.entry("alertgroup", "test.alerts"),
                    Map.entry("environment", "test")
                ))
                .build());
    
        }
    }
    
    resources:
      # Basic suppressed alert configuration for maintenance
      maintenanceWindow:
        type: grafana:assert:SuppressedAssertionsConfig
        name: maintenance_window
        properties:
          name: MaintenanceWindow
          matchLabels:
            service: api-service
            maintenance: 'true'
      # Suppress specific alertname during deployment
      deploymentSuppression:
        type: grafana:assert:SuppressedAssertionsConfig
        name: deployment_suppression
        properties:
          name: DeploymentSuppression
          matchLabels:
            alertname: HighLatency
            job: web-service
            env: staging
      # Suppress alerts for specific test environment
      testEnvironmentSuppression:
        type: grafana:assert:SuppressedAssertionsConfig
        name: test_environment_suppression
        properties:
          name: TestEnvironmentSuppression
          matchLabels:
            alertgroup: test.alerts
            environment: test
    

    Create SuppressedAssertionsConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SuppressedAssertionsConfig(name: string, args?: SuppressedAssertionsConfigArgs, opts?: CustomResourceOptions);
    @overload
    def SuppressedAssertionsConfig(resource_name: str,
                                   args: Optional[SuppressedAssertionsConfigArgs] = None,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SuppressedAssertionsConfig(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   match_labels: Optional[Mapping[str, str]] = None,
                                   name: Optional[str] = None)
    func NewSuppressedAssertionsConfig(ctx *Context, name string, args *SuppressedAssertionsConfigArgs, opts ...ResourceOption) (*SuppressedAssertionsConfig, error)
    public SuppressedAssertionsConfig(string name, SuppressedAssertionsConfigArgs? args = null, CustomResourceOptions? opts = null)
    public SuppressedAssertionsConfig(String name, SuppressedAssertionsConfigArgs args)
    public SuppressedAssertionsConfig(String name, SuppressedAssertionsConfigArgs args, CustomResourceOptions options)
    
    type: grafana:assert:SuppressedAssertionsConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SuppressedAssertionsConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SuppressedAssertionsConfigArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SuppressedAssertionsConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SuppressedAssertionsConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SuppressedAssertionsConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var suppressedAssertionsConfigResource = new Grafana.Assert.SuppressedAssertionsConfig("suppressedAssertionsConfigResource", new()
    {
        MatchLabels = 
        {
            { "string", "string" },
        },
        Name = "string",
    });
    
    example, err := assert.NewSuppressedAssertionsConfig(ctx, "suppressedAssertionsConfigResource", &assert.SuppressedAssertionsConfigArgs{
    	MatchLabels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var suppressedAssertionsConfigResource = new SuppressedAssertionsConfig("suppressedAssertionsConfigResource", SuppressedAssertionsConfigArgs.builder()
        .matchLabels(Map.of("string", "string"))
        .name("string")
        .build());
    
    suppressed_assertions_config_resource = grafana.assert_.SuppressedAssertionsConfig("suppressedAssertionsConfigResource",
        match_labels={
            "string": "string",
        },
        name="string")
    
    const suppressedAssertionsConfigResource = new grafana.assert.SuppressedAssertionsConfig("suppressedAssertionsConfigResource", {
        matchLabels: {
            string: "string",
        },
        name: "string",
    });
    
    type: grafana:assert:SuppressedAssertionsConfig
    properties:
        matchLabels:
            string: string
        name: string
    

    SuppressedAssertionsConfig Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SuppressedAssertionsConfig resource accepts the following input properties:

    MatchLabels Dictionary<string, string>
    Labels to match for this disabled alert configuration.
    Name string
    The name of the disabled alert configuration.
    MatchLabels map[string]string
    Labels to match for this disabled alert configuration.
    Name string
    The name of the disabled alert configuration.
    matchLabels Map<String,String>
    Labels to match for this disabled alert configuration.
    name String
    The name of the disabled alert configuration.
    matchLabels {[key: string]: string}
    Labels to match for this disabled alert configuration.
    name string
    The name of the disabled alert configuration.
    match_labels Mapping[str, str]
    Labels to match for this disabled alert configuration.
    name str
    The name of the disabled alert configuration.
    matchLabels Map<String>
    Labels to match for this disabled alert configuration.
    name String
    The name of the disabled alert configuration.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SuppressedAssertionsConfig resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SuppressedAssertionsConfig Resource

    Get an existing SuppressedAssertionsConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SuppressedAssertionsConfigState, opts?: CustomResourceOptions): SuppressedAssertionsConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            match_labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None) -> SuppressedAssertionsConfig
    func GetSuppressedAssertionsConfig(ctx *Context, name string, id IDInput, state *SuppressedAssertionsConfigState, opts ...ResourceOption) (*SuppressedAssertionsConfig, error)
    public static SuppressedAssertionsConfig Get(string name, Input<string> id, SuppressedAssertionsConfigState? state, CustomResourceOptions? opts = null)
    public static SuppressedAssertionsConfig get(String name, Output<String> id, SuppressedAssertionsConfigState state, CustomResourceOptions options)
    resources:  _:    type: grafana:assert:SuppressedAssertionsConfig    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    MatchLabels Dictionary<string, string>
    Labels to match for this disabled alert configuration.
    Name string
    The name of the disabled alert configuration.
    MatchLabels map[string]string
    Labels to match for this disabled alert configuration.
    Name string
    The name of the disabled alert configuration.
    matchLabels Map<String,String>
    Labels to match for this disabled alert configuration.
    name String
    The name of the disabled alert configuration.
    matchLabels {[key: string]: string}
    Labels to match for this disabled alert configuration.
    name string
    The name of the disabled alert configuration.
    match_labels Mapping[str, str]
    Labels to match for this disabled alert configuration.
    name str
    The name of the disabled alert configuration.
    matchLabels Map<String>
    Labels to match for this disabled alert configuration.
    name String
    The name of the disabled alert configuration.

    Import

    $ pulumi import grafana:assert/suppressedAssertionsConfig:SuppressedAssertionsConfig name "{{ name }}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v2.13.0 published on Friday, Oct 24, 2025 by pulumiverse
      Meet Neo: Your AI Platform Teammate