azurerm_monitor_alert_prometheus_rule_group

package
v0.0.0-...-4deecce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	// ClusterName: string, optional
	ClusterName terra.StringValue `hcl:"cluster_name,attr"`
	// Description: string, optional
	Description terra.StringValue `hcl:"description,attr"`
	// Id: string, optional
	Id terra.StringValue `hcl:"id,attr"`
	// Interval: string, optional
	Interval terra.StringValue `hcl:"interval,attr"`
	// Location: string, required
	Location terra.StringValue `hcl:"location,attr" validate:"required"`
	// Name: string, required
	Name terra.StringValue `hcl:"name,attr" validate:"required"`
	// ResourceGroupName: string, required
	ResourceGroupName terra.StringValue `hcl:"resource_group_name,attr" validate:"required"`
	// RuleGroupEnabled: bool, optional
	RuleGroupEnabled terra.BoolValue `hcl:"rule_group_enabled,attr"`
	// Scopes: list of string, required
	Scopes terra.ListValue[terra.StringValue] `hcl:"scopes,attr" validate:"required"`
	// Tags: map of string, optional
	Tags terra.MapValue[terra.StringValue] `hcl:"tags,attr"`
	// Rule: min=1
	Rule []Rule `hcl:"rule,block" validate:"min=1"`
	// Timeouts: optional
	Timeouts *Timeouts `hcl:"timeouts,block"`
}

Args contains the configurations for azurerm_monitor_alert_prometheus_rule_group.

type Resource

type Resource struct {
	Name string
	Args Args

	DependsOn terra.Dependencies
	Lifecycle *terra.Lifecycle
	// contains filtered or unexported fields
}

Resource represents the Terraform resource azurerm_monitor_alert_prometheus_rule_group.

func New

func New(name string, args Args) *Resource

New creates a new instance of Resource.

func (*Resource) Attributes

func (amaprg *Resource) Attributes() azurermMonitorAlertPrometheusRuleGroupAttributes

Attributes returns the attributes for Resource.

func (*Resource) Configuration

func (amaprg *Resource) Configuration() interface{}

Configuration returns the configuration (args) for Resource.

func (*Resource) DependOn

func (amaprg *Resource) DependOn() terra.Reference

DependOn is used for other resources to depend on Resource.

func (*Resource) Dependencies

func (amaprg *Resource) Dependencies() terra.Dependencies

Dependencies returns the list of resources Resource depends_on.

func (*Resource) ImportState

func (amaprg *Resource) ImportState(state io.Reader) error

ImportState imports the given attribute values into Resource's state.

func (*Resource) LifecycleManagement

func (amaprg *Resource) LifecycleManagement() *terra.Lifecycle

LifecycleManagement returns the lifecycle block for Resource.

func (*Resource) LocalName

func (amaprg *Resource) LocalName() string

LocalName returns the local name for Resource.

func (*Resource) State

func (amaprg *Resource) State() (*azurermMonitorAlertPrometheusRuleGroupState, bool)

State returns the state and a bool indicating if Resource has state.

func (*Resource) StateMust

func (amaprg *Resource) StateMust() *azurermMonitorAlertPrometheusRuleGroupState

StateMust returns the state for Resource. Panics if the state is nil.

func (*Resource) Type

func (amaprg *Resource) Type() string

Type returns the Terraform object type for Resource.

type Rule

type Rule struct {
	// Alert: string, optional
	Alert terra.StringValue `hcl:"alert,attr"`
	// Annotations: map of string, optional
	Annotations terra.MapValue[terra.StringValue] `hcl:"annotations,attr"`
	// Enabled: bool, optional
	Enabled terra.BoolValue `hcl:"enabled,attr"`
	// Expression: string, required
	Expression terra.StringValue `hcl:"expression,attr" validate:"required"`
	// For: string, optional
	For terra.StringValue `hcl:"for,attr"`
	// Labels: map of string, optional
	Labels terra.MapValue[terra.StringValue] `hcl:"labels,attr"`
	// Record: string, optional
	Record terra.StringValue `hcl:"record,attr"`
	// Severity: number, optional
	Severity terra.NumberValue `hcl:"severity,attr"`
	// RuleAction: min=0,max=5
	Action []RuleAction `hcl:"action,block" validate:"min=0,max=5"`
	// RuleAlertResolution: optional
	AlertResolution *RuleAlertResolution `hcl:"alert_resolution,block"`
}

type RuleAction

type RuleAction struct {
	// ActionGroupId: string, required
	ActionGroupId terra.StringValue `hcl:"action_group_id,attr" validate:"required"`
	// ActionProperties: map of string, optional
	ActionProperties terra.MapValue[terra.StringValue] `hcl:"action_properties,attr"`
}

type RuleActionAttributes

type RuleActionAttributes struct {
	// contains filtered or unexported fields
}

func (RuleActionAttributes) ActionGroupId

func (a RuleActionAttributes) ActionGroupId() terra.StringValue

func (RuleActionAttributes) ActionProperties

func (a RuleActionAttributes) ActionProperties() terra.MapValue[terra.StringValue]

func (RuleActionAttributes) InternalRef

func (a RuleActionAttributes) InternalRef() (terra.Reference, error)

func (RuleActionAttributes) InternalTokens

func (a RuleActionAttributes) InternalTokens() (hclwrite.Tokens, error)

func (RuleActionAttributes) InternalWithRef

type RuleActionState

type RuleActionState struct {
	ActionGroupId    string            `json:"action_group_id"`
	ActionProperties map[string]string `json:"action_properties"`
}

type RuleAlertResolution

type RuleAlertResolution struct {
	// AutoResolved: bool, optional
	AutoResolved terra.BoolValue `hcl:"auto_resolved,attr"`
	// TimeToResolve: string, optional
	TimeToResolve terra.StringValue `hcl:"time_to_resolve,attr"`
}

type RuleAlertResolutionAttributes

type RuleAlertResolutionAttributes struct {
	// contains filtered or unexported fields
}

func (RuleAlertResolutionAttributes) AutoResolved

func (ar RuleAlertResolutionAttributes) AutoResolved() terra.BoolValue

func (RuleAlertResolutionAttributes) InternalRef

func (ar RuleAlertResolutionAttributes) InternalRef() (terra.Reference, error)

func (RuleAlertResolutionAttributes) InternalTokens

func (ar RuleAlertResolutionAttributes) InternalTokens() (hclwrite.Tokens, error)

func (RuleAlertResolutionAttributes) InternalWithRef

func (RuleAlertResolutionAttributes) TimeToResolve

func (ar RuleAlertResolutionAttributes) TimeToResolve() terra.StringValue

type RuleAlertResolutionState

type RuleAlertResolutionState struct {
	AutoResolved  bool   `json:"auto_resolved"`
	TimeToResolve string `json:"time_to_resolve"`
}

type RuleAttributes

type RuleAttributes struct {
	// contains filtered or unexported fields
}

func (RuleAttributes) Action

func (RuleAttributes) Alert

func (r RuleAttributes) Alert() terra.StringValue

func (RuleAttributes) AlertResolution

func (RuleAttributes) Annotations

func (r RuleAttributes) Annotations() terra.MapValue[terra.StringValue]

func (RuleAttributes) Enabled

func (r RuleAttributes) Enabled() terra.BoolValue

func (RuleAttributes) Expression

func (r RuleAttributes) Expression() terra.StringValue

func (RuleAttributes) For

func (RuleAttributes) InternalRef

func (r RuleAttributes) InternalRef() (terra.Reference, error)

func (RuleAttributes) InternalTokens

func (r RuleAttributes) InternalTokens() (hclwrite.Tokens, error)

func (RuleAttributes) InternalWithRef

func (r RuleAttributes) InternalWithRef(ref terra.Reference) RuleAttributes

func (RuleAttributes) Labels

func (RuleAttributes) Record

func (r RuleAttributes) Record() terra.StringValue

func (RuleAttributes) Severity

func (r RuleAttributes) Severity() terra.NumberValue

type RuleState

type RuleState struct {
	Alert           string                     `json:"alert"`
	Annotations     map[string]string          `json:"annotations"`
	Enabled         bool                       `json:"enabled"`
	Expression      string                     `json:"expression"`
	For             string                     `json:"for"`
	Labels          map[string]string          `json:"labels"`
	Record          string                     `json:"record"`
	Severity        float64                    `json:"severity"`
	Action          []RuleActionState          `json:"action"`
	AlertResolution []RuleAlertResolutionState `json:"alert_resolution"`
}

type Timeouts

type Timeouts struct {
	// Create: string, optional
	Create terra.StringValue `hcl:"create,attr"`
	// Delete: string, optional
	Delete terra.StringValue `hcl:"delete,attr"`
	// Read: string, optional
	Read terra.StringValue `hcl:"read,attr"`
	// Update: string, optional
	Update terra.StringValue `hcl:"update,attr"`
}

type TimeoutsAttributes

type TimeoutsAttributes struct {
	// contains filtered or unexported fields
}

func (TimeoutsAttributes) Create

func (TimeoutsAttributes) Delete

func (TimeoutsAttributes) InternalRef

func (t TimeoutsAttributes) InternalRef() (terra.Reference, error)

func (TimeoutsAttributes) InternalTokens

func (t TimeoutsAttributes) InternalTokens() (hclwrite.Tokens, error)

func (TimeoutsAttributes) InternalWithRef

func (t TimeoutsAttributes) InternalWithRef(ref terra.Reference) TimeoutsAttributes

func (TimeoutsAttributes) Read

func (TimeoutsAttributes) Update

type TimeoutsState

type TimeoutsState struct {
	Create string `json:"create"`
	Delete string `json:"delete"`
	Read   string `json:"read"`
	Update string `json:"update"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL