1. Packages
  2. stackit
  3. API Docs
  4. ObservabilityLogalertgroup
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud

    Observability log alert group resource schema. Used to create alerts based on logs (Loki). Must have a region specified in the provider configuration.

    Example Usage

    resource "stackit_observability_logalertgroup" "example" {
      project_id  = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      name        = "example-log-alert-group"
      interval    = "60m"
      rules = [
        {
          alert      = "example-log-alert-name"
          expression = "sum(rate({namespace=\"example\", pod=\"logger\"} |= \"Simulated error message\" [1m])) > 0"
          for        = "60s"
          labels = {
            severity = "critical"
          },
          annotations = {
            summary : "example summary"
            description : "example description"
          }
        },
        {
          alert      = "example-log-alert-name-2"
          expression = "sum(rate({namespace=\"example\", pod=\"logger\"} |= \"Another error message\" [1m])) > 0"
          for        = "60s"
          labels = {
            severity = "critical"
          },
          annotations = {
            summary : "example summary"
            description : "example description"
          }
        },
      ]
    }
    
    # Only use the import statement, if you want to import an existing observability logalertgroup
    import {
      to = stackit_observability_logalertgroup.import-example
      id = "${var.project_id},${var.observability_instance_id},${var.observability_logalertgroup_name}"
    }
    

    Create ObservabilityLogalertgroup Resource

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

    Constructor syntax

    new ObservabilityLogalertgroup(name: string, args: ObservabilityLogalertgroupArgs, opts?: CustomResourceOptions);
    @overload
    def ObservabilityLogalertgroup(resource_name: str,
                                   args: ObservabilityLogalertgroupArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ObservabilityLogalertgroup(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   instance_id: Optional[str] = None,
                                   project_id: Optional[str] = None,
                                   rules: Optional[Sequence[ObservabilityLogalertgroupRuleArgs]] = None,
                                   interval: Optional[str] = None,
                                   name: Optional[str] = None)
    func NewObservabilityLogalertgroup(ctx *Context, name string, args ObservabilityLogalertgroupArgs, opts ...ResourceOption) (*ObservabilityLogalertgroup, error)
    public ObservabilityLogalertgroup(string name, ObservabilityLogalertgroupArgs args, CustomResourceOptions? opts = null)
    public ObservabilityLogalertgroup(String name, ObservabilityLogalertgroupArgs args)
    public ObservabilityLogalertgroup(String name, ObservabilityLogalertgroupArgs args, CustomResourceOptions options)
    
    type: stackit:ObservabilityLogalertgroup
    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 ObservabilityLogalertgroupArgs
    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 ObservabilityLogalertgroupArgs
    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 ObservabilityLogalertgroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ObservabilityLogalertgroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ObservabilityLogalertgroupArgs
    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 observabilityLogalertgroupResource = new Stackit.ObservabilityLogalertgroup("observabilityLogalertgroupResource", new()
    {
        InstanceId = "string",
        ProjectId = "string",
        Rules = new[]
        {
            new Stackit.Inputs.ObservabilityLogalertgroupRuleArgs
            {
                Alert = "string",
                Expression = "string",
                Annotations = 
                {
                    { "string", "string" },
                },
                For = "string",
                Labels = 
                {
                    { "string", "string" },
                },
            },
        },
        Interval = "string",
        Name = "string",
    });
    
    example, err := stackit.NewObservabilityLogalertgroup(ctx, "observabilityLogalertgroupResource", &stackit.ObservabilityLogalertgroupArgs{
    	InstanceId: pulumi.String("string"),
    	ProjectId:  pulumi.String("string"),
    	Rules: stackit.ObservabilityLogalertgroupRuleArray{
    		&stackit.ObservabilityLogalertgroupRuleArgs{
    			Alert:      pulumi.String("string"),
    			Expression: pulumi.String("string"),
    			Annotations: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			For: pulumi.String("string"),
    			Labels: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    		},
    	},
    	Interval: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    })
    
    var observabilityLogalertgroupResource = new ObservabilityLogalertgroup("observabilityLogalertgroupResource", ObservabilityLogalertgroupArgs.builder()
        .instanceId("string")
        .projectId("string")
        .rules(ObservabilityLogalertgroupRuleArgs.builder()
            .alert("string")
            .expression("string")
            .annotations(Map.of("string", "string"))
            .for_("string")
            .labels(Map.of("string", "string"))
            .build())
        .interval("string")
        .name("string")
        .build());
    
    observability_logalertgroup_resource = stackit.ObservabilityLogalertgroup("observabilityLogalertgroupResource",
        instance_id="string",
        project_id="string",
        rules=[{
            "alert": "string",
            "expression": "string",
            "annotations": {
                "string": "string",
            },
            "for_": "string",
            "labels": {
                "string": "string",
            },
        }],
        interval="string",
        name="string")
    
    const observabilityLogalertgroupResource = new stackit.ObservabilityLogalertgroup("observabilityLogalertgroupResource", {
        instanceId: "string",
        projectId: "string",
        rules: [{
            alert: "string",
            expression: "string",
            annotations: {
                string: "string",
            },
            "for": "string",
            labels: {
                string: "string",
            },
        }],
        interval: "string",
        name: "string",
    });
    
    type: stackit:ObservabilityLogalertgroup
    properties:
        instanceId: string
        interval: string
        name: string
        projectId: string
        rules:
            - alert: string
              annotations:
                string: string
              expression: string
              for: string
              labels:
                string: string
    

    ObservabilityLogalertgroup 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 ObservabilityLogalertgroup resource accepts the following input properties:

    InstanceId string
    Observability instance ID to which the log alert group is associated.
    ProjectId string
    STACKIT project ID to which the log alert group is associated.
    Rules List<ObservabilityLogalertgroupRule>
    Rules for the log alert group
    Interval string
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    Name string
    The name of the log alert group. Is the identifier and must be unique in the group.
    InstanceId string
    Observability instance ID to which the log alert group is associated.
    ProjectId string
    STACKIT project ID to which the log alert group is associated.
    Rules []ObservabilityLogalertgroupRuleArgs
    Rules for the log alert group
    Interval string
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    Name string
    The name of the log alert group. Is the identifier and must be unique in the group.
    instanceId String
    Observability instance ID to which the log alert group is associated.
    projectId String
    STACKIT project ID to which the log alert group is associated.
    rules List<ObservabilityLogalertgroupRule>
    Rules for the log alert group
    interval String
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    name String
    The name of the log alert group. Is the identifier and must be unique in the group.
    instanceId string
    Observability instance ID to which the log alert group is associated.
    projectId string
    STACKIT project ID to which the log alert group is associated.
    rules ObservabilityLogalertgroupRule[]
    Rules for the log alert group
    interval string
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    name string
    The name of the log alert group. Is the identifier and must be unique in the group.
    instance_id str
    Observability instance ID to which the log alert group is associated.
    project_id str
    STACKIT project ID to which the log alert group is associated.
    rules Sequence[ObservabilityLogalertgroupRuleArgs]
    Rules for the log alert group
    interval str
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    name str
    The name of the log alert group. Is the identifier and must be unique in the group.
    instanceId String
    Observability instance ID to which the log alert group is associated.
    projectId String
    STACKIT project ID to which the log alert group is associated.
    rules List<Property Map>
    Rules for the log alert group
    interval String
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    name String
    The name of the log alert group. Is the identifier and must be unique in the group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ObservabilityLogalertgroup 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 ObservabilityLogalertgroup Resource

    Get an existing ObservabilityLogalertgroup 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?: ObservabilityLogalertgroupState, opts?: CustomResourceOptions): ObservabilityLogalertgroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            instance_id: Optional[str] = None,
            interval: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            rules: Optional[Sequence[ObservabilityLogalertgroupRuleArgs]] = None) -> ObservabilityLogalertgroup
    func GetObservabilityLogalertgroup(ctx *Context, name string, id IDInput, state *ObservabilityLogalertgroupState, opts ...ResourceOption) (*ObservabilityLogalertgroup, error)
    public static ObservabilityLogalertgroup Get(string name, Input<string> id, ObservabilityLogalertgroupState? state, CustomResourceOptions? opts = null)
    public static ObservabilityLogalertgroup get(String name, Output<String> id, ObservabilityLogalertgroupState state, CustomResourceOptions options)
    resources:  _:    type: stackit:ObservabilityLogalertgroup    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:
    InstanceId string
    Observability instance ID to which the log alert group is associated.
    Interval string
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    Name string
    The name of the log alert group. Is the identifier and must be unique in the group.
    ProjectId string
    STACKIT project ID to which the log alert group is associated.
    Rules List<ObservabilityLogalertgroupRule>
    Rules for the log alert group
    InstanceId string
    Observability instance ID to which the log alert group is associated.
    Interval string
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    Name string
    The name of the log alert group. Is the identifier and must be unique in the group.
    ProjectId string
    STACKIT project ID to which the log alert group is associated.
    Rules []ObservabilityLogalertgroupRuleArgs
    Rules for the log alert group
    instanceId String
    Observability instance ID to which the log alert group is associated.
    interval String
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    name String
    The name of the log alert group. Is the identifier and must be unique in the group.
    projectId String
    STACKIT project ID to which the log alert group is associated.
    rules List<ObservabilityLogalertgroupRule>
    Rules for the log alert group
    instanceId string
    Observability instance ID to which the log alert group is associated.
    interval string
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    name string
    The name of the log alert group. Is the identifier and must be unique in the group.
    projectId string
    STACKIT project ID to which the log alert group is associated.
    rules ObservabilityLogalertgroupRule[]
    Rules for the log alert group
    instance_id str
    Observability instance ID to which the log alert group is associated.
    interval str
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    name str
    The name of the log alert group. Is the identifier and must be unique in the group.
    project_id str
    STACKIT project ID to which the log alert group is associated.
    rules Sequence[ObservabilityLogalertgroupRuleArgs]
    Rules for the log alert group
    instanceId String
    Observability instance ID to which the log alert group is associated.
    interval String
    Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
    name String
    The name of the log alert group. Is the identifier and must be unique in the group.
    projectId String
    STACKIT project ID to which the log alert group is associated.
    rules List<Property Map>
    Rules for the log alert group

    Supporting Types

    ObservabilityLogalertgroupRule, ObservabilityLogalertgroupRuleArgs

    Alert string
    The name of the alert rule. Is the identifier and must be unique in the group.
    Expression string
    The LogQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending/firing alerts.
    Annotations Dictionary<string, string>
    A map of key:value. Annotations to add or overwrite for each alert
    For string
    Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending. Default is 0s
    Labels Dictionary<string, string>
    A map of key:value. Labels to add or overwrite for each alert
    Alert string
    The name of the alert rule. Is the identifier and must be unique in the group.
    Expression string
    The LogQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending/firing alerts.
    Annotations map[string]string
    A map of key:value. Annotations to add or overwrite for each alert
    For string
    Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending. Default is 0s
    Labels map[string]string
    A map of key:value. Labels to add or overwrite for each alert
    alert String
    The name of the alert rule. Is the identifier and must be unique in the group.
    expression String
    The LogQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending/firing alerts.
    annotations Map<String,String>
    A map of key:value. Annotations to add or overwrite for each alert
    for_ String
    Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending. Default is 0s
    labels Map<String,String>
    A map of key:value. Labels to add or overwrite for each alert
    alert string
    The name of the alert rule. Is the identifier and must be unique in the group.
    expression string
    The LogQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending/firing alerts.
    annotations {[key: string]: string}
    A map of key:value. Annotations to add or overwrite for each alert
    for string
    Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending. Default is 0s
    labels {[key: string]: string}
    A map of key:value. Labels to add or overwrite for each alert
    alert str
    The name of the alert rule. Is the identifier and must be unique in the group.
    expression str
    The LogQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending/firing alerts.
    annotations Mapping[str, str]
    A map of key:value. Annotations to add or overwrite for each alert
    for_ str
    Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending. Default is 0s
    labels Mapping[str, str]
    A map of key:value. Labels to add or overwrite for each alert
    alert String
    The name of the alert rule. Is the identifier and must be unique in the group.
    expression String
    The LogQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending/firing alerts.
    annotations Map<String>
    A map of key:value. Annotations to add or overwrite for each alert
    for String
    Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending. Default is 0s
    labels Map<String>
    A map of key:value. Labels to add or overwrite for each alert

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.4
    published on Friday, Feb 20, 2026 by stackitcloud
      Try Pulumi Cloud free. Your team will thank you.