published on Wednesday, Apr 29, 2026 by pulumiverse
published on Wednesday, Apr 29, 2026 by pulumiverse
Manages Grafana Inhibition Rules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumiverse/grafana";
const example = new grafana.index.AppsNotificationsInhibitionruleV0alpha1("example", {
metadata: [{
uid: "example-inhibition-rule",
}],
spec: [{
sourceMatchers: [{
type: "=",
label: "alertname",
value: "TargetDown",
}],
targetMatchers: [{
type: "=",
label: "severity",
value: "warning",
}],
equal: [
"namespace",
"pod",
],
}],
});
import pulumi
import pulumi_grafana as grafana
example = grafana.index.AppsNotificationsInhibitionruleV0alpha1("example",
metadata=[{
uid: example-inhibition-rule,
}],
spec=[{
sourceMatchers: [{
type: =,
label: alertname,
value: TargetDown,
}],
targetMatchers: [{
type: =,
label: severity,
value: warning,
}],
equal: [
namespace,
pod,
],
}])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := grafana.NewAppsNotificationsInhibitionruleV0alpha1(ctx, "example", &grafana.AppsNotificationsInhibitionruleV0alpha1Args{
Metadata: []map[string]interface{}{
map[string]interface{}{
"uid": "example-inhibition-rule",
},
},
Spec: []map[string]interface{}{
map[string]interface{}{
"sourceMatchers": []map[string]interface{}{
map[string]interface{}{
"type": "=",
"label": "alertname",
"value": "TargetDown",
},
},
"targetMatchers": []map[string]interface{}{
map[string]interface{}{
"type": "=",
"label": "severity",
"value": "warning",
},
},
"equal": []string{
"namespace",
"pod",
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumiverse.Grafana;
return await Deployment.RunAsync(() =>
{
var example = new Grafana.Index.AppsNotificationsInhibitionruleV0alpha1("example", new()
{
Metadata = new[]
{
{
{ "uid", "example-inhibition-rule" },
},
},
Spec = new[]
{
{
{ "sourceMatchers", new[]
{
{
{ "type", "=" },
{ "label", "alertname" },
{ "value", "TargetDown" },
},
} },
{ "targetMatchers", new[]
{
{
{ "type", "=" },
{ "label", "severity" },
{ "value", "warning" },
},
} },
{ "equal", new[]
{
"namespace",
"pod",
} },
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.AppsNotificationsInhibitionruleV0alpha1;
import com.pulumi.grafana.AppsNotificationsInhibitionruleV0alpha1Args;
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 AppsNotificationsInhibitionruleV0alpha1("example", AppsNotificationsInhibitionruleV0alpha1Args.builder()
.metadata(List.of(Map.of("uid", "example-inhibition-rule")))
.spec(List.of(Map.ofEntries(
Map.entry("sourceMatchers", List.of(Map.ofEntries(
Map.entry("type", "="),
Map.entry("label", "alertname"),
Map.entry("value", "TargetDown")
))),
Map.entry("targetMatchers", List.of(Map.ofEntries(
Map.entry("type", "="),
Map.entry("label", "severity"),
Map.entry("value", "warning")
))),
Map.entry("equal", List.of(
"namespace",
"pod"))
)))
.build());
}
}
resources:
example:
type: grafana:AppsNotificationsInhibitionruleV0alpha1
properties:
metadata:
- uid: example-inhibition-rule
spec:
- sourceMatchers:
- type: =
label: alertname
value: TargetDown
targetMatchers:
- type: =
label: severity
value: warning
equal:
- namespace
- pod
Create NotificationsInhibitionRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationsInhibitionRule(name: string, args?: NotificationsInhibitionRuleArgs, opts?: CustomResourceOptions);@overload
def NotificationsInhibitionRule(resource_name: str,
args: Optional[NotificationsInhibitionRuleArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationsInhibitionRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
metadata: Optional[NotificationsInhibitionRuleMetadataArgs] = None,
options: Optional[NotificationsInhibitionRuleOptionsArgs] = None,
spec: Optional[NotificationsInhibitionRuleSpecArgs] = None)func NewNotificationsInhibitionRule(ctx *Context, name string, args *NotificationsInhibitionRuleArgs, opts ...ResourceOption) (*NotificationsInhibitionRule, error)public NotificationsInhibitionRule(string name, NotificationsInhibitionRuleArgs? args = null, CustomResourceOptions? opts = null)
public NotificationsInhibitionRule(String name, NotificationsInhibitionRuleArgs args)
public NotificationsInhibitionRule(String name, NotificationsInhibitionRuleArgs args, CustomResourceOptions options)
type: grafana:alerting/v1beta1/notificationsInhibitionRule:NotificationsInhibitionRule
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 NotificationsInhibitionRuleArgs
- 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 NotificationsInhibitionRuleArgs
- 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 NotificationsInhibitionRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationsInhibitionRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationsInhibitionRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
NotificationsInhibitionRule 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 NotificationsInhibitionRule resource accepts the following input properties:
- Metadata
Pulumiverse.
Grafana. Alerting. V1Beta1. Inputs. Notifications Inhibition Rule Metadata - The metadata of the resource.
- Options
Pulumiverse.
Grafana. Alerting. V1Beta1. Inputs. Notifications Inhibition Rule Options - Options for applying the resource.
- Spec
Pulumiverse.
Grafana. Alerting. V1Beta1. Inputs. Notifications Inhibition Rule Spec - The spec of the resource.
- Metadata
Notifications
Inhibition Rule Metadata Args - The metadata of the resource.
- Options
Notifications
Inhibition Rule Options Args - Options for applying the resource.
- Spec
Notifications
Inhibition Rule Spec Args - The spec of the resource.
- metadata
Notifications
Inhibition Rule Metadata - The metadata of the resource.
- options
Notifications
Inhibition Rule Options - Options for applying the resource.
- spec
Notifications
Inhibition Rule Spec - The spec of the resource.
- metadata
Notifications
Inhibition Rule Metadata - The metadata of the resource.
- options
Notifications
Inhibition Rule Options - Options for applying the resource.
- spec
Notifications
Inhibition Rule Spec - The spec of the resource.
- metadata
Notifications
Inhibition Rule Metadata Args - The metadata of the resource.
- options
Notifications
Inhibition Rule Options Args - Options for applying the resource.
- spec
Notifications
Inhibition Rule Spec Args - The spec of the resource.
- metadata Property Map
- The metadata of the resource.
- options Property Map
- Options for applying the resource.
- spec Property Map
- The spec of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationsInhibitionRule 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 NotificationsInhibitionRule Resource
Get an existing NotificationsInhibitionRule 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?: NotificationsInhibitionRuleState, opts?: CustomResourceOptions): NotificationsInhibitionRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
metadata: Optional[NotificationsInhibitionRuleMetadataArgs] = None,
options: Optional[NotificationsInhibitionRuleOptionsArgs] = None,
spec: Optional[NotificationsInhibitionRuleSpecArgs] = None) -> NotificationsInhibitionRulefunc GetNotificationsInhibitionRule(ctx *Context, name string, id IDInput, state *NotificationsInhibitionRuleState, opts ...ResourceOption) (*NotificationsInhibitionRule, error)public static NotificationsInhibitionRule Get(string name, Input<string> id, NotificationsInhibitionRuleState? state, CustomResourceOptions? opts = null)public static NotificationsInhibitionRule get(String name, Output<String> id, NotificationsInhibitionRuleState state, CustomResourceOptions options)resources: _: type: grafana:alerting/v1beta1/notificationsInhibitionRule:NotificationsInhibitionRule 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.
- Metadata
Pulumiverse.
Grafana. Alerting. V1Beta1. Inputs. Notifications Inhibition Rule Metadata - The metadata of the resource.
- Options
Pulumiverse.
Grafana. Alerting. V1Beta1. Inputs. Notifications Inhibition Rule Options - Options for applying the resource.
- Spec
Pulumiverse.
Grafana. Alerting. V1Beta1. Inputs. Notifications Inhibition Rule Spec - The spec of the resource.
- Metadata
Notifications
Inhibition Rule Metadata Args - The metadata of the resource.
- Options
Notifications
Inhibition Rule Options Args - Options for applying the resource.
- Spec
Notifications
Inhibition Rule Spec Args - The spec of the resource.
- metadata
Notifications
Inhibition Rule Metadata - The metadata of the resource.
- options
Notifications
Inhibition Rule Options - Options for applying the resource.
- spec
Notifications
Inhibition Rule Spec - The spec of the resource.
- metadata
Notifications
Inhibition Rule Metadata - The metadata of the resource.
- options
Notifications
Inhibition Rule Options - Options for applying the resource.
- spec
Notifications
Inhibition Rule Spec - The spec of the resource.
- metadata
Notifications
Inhibition Rule Metadata Args - The metadata of the resource.
- options
Notifications
Inhibition Rule Options Args - Options for applying the resource.
- spec
Notifications
Inhibition Rule Spec Args - The spec of the resource.
- metadata Property Map
- The metadata of the resource.
- options Property Map
- Options for applying the resource.
- spec Property Map
- The spec of the resource.
Supporting Types
NotificationsInhibitionRuleMetadata, NotificationsInhibitionRuleMetadataArgs
- Uid string
- The unique identifier of the resource.
- Annotations Dictionary<string, string>
- Annotations of the resource.
- Folder
Uid string - The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
- Url string
- The full URL of the resource.
- Uuid string
- The globally unique identifier of a resource, used by the API for tracking.
- Version string
- The version of the resource.
- Uid string
- The unique identifier of the resource.
- Annotations map[string]string
- Annotations of the resource.
- Folder
Uid string - The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
- Url string
- The full URL of the resource.
- Uuid string
- The globally unique identifier of a resource, used by the API for tracking.
- Version string
- The version of the resource.
- uid String
- The unique identifier of the resource.
- annotations Map<String,String>
- Annotations of the resource.
- folder
Uid String - The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
- url String
- The full URL of the resource.
- uuid String
- The globally unique identifier of a resource, used by the API for tracking.
- version String
- The version of the resource.
- uid string
- The unique identifier of the resource.
- annotations {[key: string]: string}
- Annotations of the resource.
- folder
Uid string - The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
- url string
- The full URL of the resource.
- uuid string
- The globally unique identifier of a resource, used by the API for tracking.
- version string
- The version of the resource.
- uid str
- The unique identifier of the resource.
- annotations Mapping[str, str]
- Annotations of the resource.
- folder_
uid str - The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
- url str
- The full URL of the resource.
- uuid str
- The globally unique identifier of a resource, used by the API for tracking.
- version str
- The version of the resource.
- uid String
- The unique identifier of the resource.
- annotations Map<String>
- Annotations of the resource.
- folder
Uid String - The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
- url String
- The full URL of the resource.
- uuid String
- The globally unique identifier of a resource, used by the API for tracking.
- version String
- The version of the resource.
NotificationsInhibitionRuleOptions, NotificationsInhibitionRuleOptionsArgs
- Manager
Identity string - Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
- Overwrite bool
- Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
- Manager
Identity string - Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
- Overwrite bool
- Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
- manager
Identity String - Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
- overwrite Boolean
- Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
- manager
Identity string - Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
- overwrite boolean
- Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
- manager_
identity str - Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
- overwrite bool
- Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
- manager
Identity String - Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
- overwrite Boolean
- Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
NotificationsInhibitionRuleSpec, NotificationsInhibitionRuleSpecArgs
- Equals List<string>
- Labels that must have equal values in source and target alerts for the inhibition to take effect.
- Source
Matchers List<Pulumiverse.Grafana. Alerting. V1Beta1. Inputs. Notifications Inhibition Rule Spec Source Matcher> - Matchers that must be satisfied for an alert to be a source of inhibition.
- Target
Matchers List<Pulumiverse.Grafana. Alerting. V1Beta1. Inputs. Notifications Inhibition Rule Spec Target Matcher> - Matchers that must be satisfied for an alert to be inhibited.
- Equals []string
- Labels that must have equal values in source and target alerts for the inhibition to take effect.
- Source
Matchers []NotificationsInhibition Rule Spec Source Matcher - Matchers that must be satisfied for an alert to be a source of inhibition.
- Target
Matchers []NotificationsInhibition Rule Spec Target Matcher - Matchers that must be satisfied for an alert to be inhibited.
- equals_ List<String>
- Labels that must have equal values in source and target alerts for the inhibition to take effect.
- source
Matchers List<NotificationsInhibition Rule Spec Source Matcher> - Matchers that must be satisfied for an alert to be a source of inhibition.
- target
Matchers List<NotificationsInhibition Rule Spec Target Matcher> - Matchers that must be satisfied for an alert to be inhibited.
- equals string[]
- Labels that must have equal values in source and target alerts for the inhibition to take effect.
- source
Matchers NotificationsInhibition Rule Spec Source Matcher[] - Matchers that must be satisfied for an alert to be a source of inhibition.
- target
Matchers NotificationsInhibition Rule Spec Target Matcher[] - Matchers that must be satisfied for an alert to be inhibited.
- equals Sequence[str]
- Labels that must have equal values in source and target alerts for the inhibition to take effect.
- source_
matchers Sequence[NotificationsInhibition Rule Spec Source Matcher] - Matchers that must be satisfied for an alert to be a source of inhibition.
- target_
matchers Sequence[NotificationsInhibition Rule Spec Target Matcher] - Matchers that must be satisfied for an alert to be inhibited.
- equals List<String>
- Labels that must have equal values in source and target alerts for the inhibition to take effect.
- source
Matchers List<Property Map> - Matchers that must be satisfied for an alert to be a source of inhibition.
- target
Matchers List<Property Map> - Matchers that must be satisfied for an alert to be inhibited.
NotificationsInhibitionRuleSpecSourceMatcher, NotificationsInhibitionRuleSpecSourceMatcherArgs
NotificationsInhibitionRuleSpecTargetMatcher, NotificationsInhibitionRuleSpecTargetMatcherArgs
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafanaTerraform Provider.
published on Wednesday, Apr 29, 2026 by pulumiverse
