azurerm_monitor_autoscale_setting

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 {
	// Enabled: bool, optional
	Enabled terra.BoolValue `hcl:"enabled,attr"`
	// Id: string, optional
	Id terra.StringValue `hcl:"id,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"`
	// Tags: map of string, optional
	Tags terra.MapValue[terra.StringValue] `hcl:"tags,attr"`
	// TargetResourceId: string, required
	TargetResourceId terra.StringValue `hcl:"target_resource_id,attr" validate:"required"`
	// Notification: optional
	Notification *Notification `hcl:"notification,block"`
	// Predictive: optional
	Predictive *Predictive `hcl:"predictive,block"`
	// Profile: min=1,max=20
	Profile []Profile `hcl:"profile,block" validate:"min=1,max=20"`
	// Timeouts: optional
	Timeouts *Timeouts `hcl:"timeouts,block"`
}

Args contains the configurations for azurerm_monitor_autoscale_setting.

type Notification

type Notification struct {
	// NotificationEmail: optional
	Email *NotificationEmail `hcl:"email,block"`
	// NotificationWebhook: min=0
	Webhook []NotificationWebhook `hcl:"webhook,block" validate:"min=0"`
}

type NotificationAttributes

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

func (NotificationAttributes) Email

func (NotificationAttributes) InternalRef

func (n NotificationAttributes) InternalRef() (terra.Reference, error)

func (NotificationAttributes) InternalTokens

func (n NotificationAttributes) InternalTokens() (hclwrite.Tokens, error)

func (NotificationAttributes) InternalWithRef

func (NotificationAttributes) Webhook

type NotificationEmail

type NotificationEmail struct {
	// CustomEmails: list of string, optional
	CustomEmails terra.ListValue[terra.StringValue] `hcl:"custom_emails,attr"`
	// SendToSubscriptionAdministrator: bool, optional
	SendToSubscriptionAdministrator terra.BoolValue `hcl:"send_to_subscription_administrator,attr"`
	// SendToSubscriptionCoAdministrator: bool, optional
	SendToSubscriptionCoAdministrator terra.BoolValue `hcl:"send_to_subscription_co_administrator,attr"`
}

type NotificationEmailAttributes

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

func (NotificationEmailAttributes) CustomEmails

func (NotificationEmailAttributes) InternalRef

func (e NotificationEmailAttributes) InternalRef() (terra.Reference, error)

func (NotificationEmailAttributes) InternalTokens

func (e NotificationEmailAttributes) InternalTokens() (hclwrite.Tokens, error)

func (NotificationEmailAttributes) InternalWithRef

func (NotificationEmailAttributes) SendToSubscriptionAdministrator

func (e NotificationEmailAttributes) SendToSubscriptionAdministrator() terra.BoolValue

func (NotificationEmailAttributes) SendToSubscriptionCoAdministrator

func (e NotificationEmailAttributes) SendToSubscriptionCoAdministrator() terra.BoolValue

type NotificationEmailState

type NotificationEmailState struct {
	CustomEmails                      []string `json:"custom_emails"`
	SendToSubscriptionAdministrator   bool     `json:"send_to_subscription_administrator"`
	SendToSubscriptionCoAdministrator bool     `json:"send_to_subscription_co_administrator"`
}

type NotificationState

type NotificationState struct {
	Email   []NotificationEmailState   `json:"email"`
	Webhook []NotificationWebhookState `json:"webhook"`
}

type NotificationWebhook

type NotificationWebhook struct {
	// Properties: map of string, optional
	Properties terra.MapValue[terra.StringValue] `hcl:"properties,attr"`
	// ServiceUri: string, required
	ServiceUri terra.StringValue `hcl:"service_uri,attr" validate:"required"`
}

type NotificationWebhookAttributes

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

func (NotificationWebhookAttributes) InternalRef

func (NotificationWebhookAttributes) InternalTokens

func (w NotificationWebhookAttributes) InternalTokens() (hclwrite.Tokens, error)

func (NotificationWebhookAttributes) InternalWithRef

func (NotificationWebhookAttributes) Properties

func (NotificationWebhookAttributes) ServiceUri

type NotificationWebhookState

type NotificationWebhookState struct {
	Properties map[string]string `json:"properties"`
	ServiceUri string            `json:"service_uri"`
}

type Predictive

type Predictive struct {
	// LookAheadTime: string, optional
	LookAheadTime terra.StringValue `hcl:"look_ahead_time,attr"`
	// ScaleMode: string, required
	ScaleMode terra.StringValue `hcl:"scale_mode,attr" validate:"required"`
}

type PredictiveAttributes

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

func (PredictiveAttributes) InternalRef

func (p PredictiveAttributes) InternalRef() (terra.Reference, error)

func (PredictiveAttributes) InternalTokens

func (p PredictiveAttributes) InternalTokens() (hclwrite.Tokens, error)

func (PredictiveAttributes) InternalWithRef

func (PredictiveAttributes) LookAheadTime

func (p PredictiveAttributes) LookAheadTime() terra.StringValue

func (PredictiveAttributes) ScaleMode

func (p PredictiveAttributes) ScaleMode() terra.StringValue

type PredictiveState

type PredictiveState struct {
	LookAheadTime string `json:"look_ahead_time"`
	ScaleMode     string `json:"scale_mode"`
}

type Profile

type Profile struct {
	// Name: string, required
	Name terra.StringValue `hcl:"name,attr" validate:"required"`
	// ProfileCapacity: required
	Capacity *ProfileCapacity `hcl:"capacity,block" validate:"required"`
	// ProfileFixedDate: optional
	FixedDate *ProfileFixedDate `hcl:"fixed_date,block"`
	// ProfileRecurrence: optional
	Recurrence *ProfileRecurrence `hcl:"recurrence,block"`
	// ProfileRule: min=0,max=10
	Rule []ProfileRule `hcl:"rule,block" validate:"min=0,max=10"`
}

type ProfileAttributes

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

func (ProfileAttributes) Capacity

func (ProfileAttributes) FixedDate

func (ProfileAttributes) InternalRef

func (p ProfileAttributes) InternalRef() (terra.Reference, error)

func (ProfileAttributes) InternalTokens

func (p ProfileAttributes) InternalTokens() (hclwrite.Tokens, error)

func (ProfileAttributes) InternalWithRef

func (p ProfileAttributes) InternalWithRef(ref terra.Reference) ProfileAttributes

func (ProfileAttributes) Name

func (ProfileAttributes) Recurrence

func (ProfileAttributes) Rule

type ProfileCapacity

type ProfileCapacity struct {
	// Default: number, required
	Default terra.NumberValue `hcl:"default,attr" validate:"required"`
	// Maximum: number, required
	Maximum terra.NumberValue `hcl:"maximum,attr" validate:"required"`
	// Minimum: number, required
	Minimum terra.NumberValue `hcl:"minimum,attr" validate:"required"`
}

type ProfileCapacityAttributes

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

func (ProfileCapacityAttributes) Default

func (ProfileCapacityAttributes) InternalRef

func (c ProfileCapacityAttributes) InternalRef() (terra.Reference, error)

func (ProfileCapacityAttributes) InternalTokens

func (c ProfileCapacityAttributes) InternalTokens() (hclwrite.Tokens, error)

func (ProfileCapacityAttributes) InternalWithRef

func (ProfileCapacityAttributes) Maximum

func (ProfileCapacityAttributes) Minimum

type ProfileCapacityState

type ProfileCapacityState struct {
	Default float64 `json:"default"`
	Maximum float64 `json:"maximum"`
	Minimum float64 `json:"minimum"`
}

type ProfileFixedDate

type ProfileFixedDate struct {
	// End: string, required
	End terra.StringValue `hcl:"end,attr" validate:"required"`
	// Start: string, required
	Start terra.StringValue `hcl:"start,attr" validate:"required"`
	// Timezone: string, optional
	Timezone terra.StringValue `hcl:"timezone,attr"`
}

type ProfileFixedDateAttributes

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

func (ProfileFixedDateAttributes) End

func (ProfileFixedDateAttributes) InternalRef

func (fd ProfileFixedDateAttributes) InternalRef() (terra.Reference, error)

func (ProfileFixedDateAttributes) InternalTokens

func (fd ProfileFixedDateAttributes) InternalTokens() (hclwrite.Tokens, error)

func (ProfileFixedDateAttributes) InternalWithRef

func (ProfileFixedDateAttributes) Start

func (ProfileFixedDateAttributes) Timezone

type ProfileFixedDateState

type ProfileFixedDateState struct {
	End      string `json:"end"`
	Start    string `json:"start"`
	Timezone string `json:"timezone"`
}

type ProfileRecurrence

type ProfileRecurrence struct {
	// Days: list of string, required
	Days terra.ListValue[terra.StringValue] `hcl:"days,attr" validate:"required"`
	// Hours: list of number, required
	Hours terra.ListValue[terra.NumberValue] `hcl:"hours,attr" validate:"required"`
	// Minutes: list of number, required
	Minutes terra.ListValue[terra.NumberValue] `hcl:"minutes,attr" validate:"required"`
	// Timezone: string, optional
	Timezone terra.StringValue `hcl:"timezone,attr"`
}

type ProfileRecurrenceAttributes

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

func (ProfileRecurrenceAttributes) Days

func (ProfileRecurrenceAttributes) Hours

func (ProfileRecurrenceAttributes) InternalRef

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

func (ProfileRecurrenceAttributes) InternalTokens

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

func (ProfileRecurrenceAttributes) InternalWithRef

func (ProfileRecurrenceAttributes) Minutes

func (ProfileRecurrenceAttributes) Timezone

type ProfileRecurrenceState

type ProfileRecurrenceState struct {
	Days     []string  `json:"days"`
	Hours    []float64 `json:"hours"`
	Minutes  []float64 `json:"minutes"`
	Timezone string    `json:"timezone"`
}

type ProfileRule

type ProfileRule struct {
	// ProfileRuleMetricTrigger: required
	MetricTrigger *ProfileRuleMetricTrigger `hcl:"metric_trigger,block" validate:"required"`
	// ProfileRuleScaleAction: required
	ScaleAction *ProfileRuleScaleAction `hcl:"scale_action,block" validate:"required"`
}

type ProfileRuleAttributes

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

func (ProfileRuleAttributes) InternalRef

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

func (ProfileRuleAttributes) InternalTokens

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

func (ProfileRuleAttributes) InternalWithRef

func (ProfileRuleAttributes) MetricTrigger

func (ProfileRuleAttributes) ScaleAction

type ProfileRuleMetricTrigger

type ProfileRuleMetricTrigger struct {
	// DivideByInstanceCount: bool, optional
	DivideByInstanceCount terra.BoolValue `hcl:"divide_by_instance_count,attr"`
	// MetricName: string, required
	MetricName terra.StringValue `hcl:"metric_name,attr" validate:"required"`
	// MetricNamespace: string, optional
	MetricNamespace terra.StringValue `hcl:"metric_namespace,attr"`
	// MetricResourceId: string, required
	MetricResourceId terra.StringValue `hcl:"metric_resource_id,attr" validate:"required"`
	// Operator: string, required
	Operator terra.StringValue `hcl:"operator,attr" validate:"required"`
	// Statistic: string, required
	Statistic terra.StringValue `hcl:"statistic,attr" validate:"required"`
	// Threshold: number, required
	Threshold terra.NumberValue `hcl:"threshold,attr" validate:"required"`
	// TimeAggregation: string, required
	TimeAggregation terra.StringValue `hcl:"time_aggregation,attr" validate:"required"`
	// TimeGrain: string, required
	TimeGrain terra.StringValue `hcl:"time_grain,attr" validate:"required"`
	// TimeWindow: string, required
	TimeWindow terra.StringValue `hcl:"time_window,attr" validate:"required"`
	// ProfileRuleMetricTriggerDimensions: min=0
	Dimensions []ProfileRuleMetricTriggerDimensions `hcl:"dimensions,block" validate:"min=0"`
}

type ProfileRuleMetricTriggerAttributes

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

func (ProfileRuleMetricTriggerAttributes) Dimensions

func (ProfileRuleMetricTriggerAttributes) DivideByInstanceCount

func (mt ProfileRuleMetricTriggerAttributes) DivideByInstanceCount() terra.BoolValue

func (ProfileRuleMetricTriggerAttributes) InternalRef

func (ProfileRuleMetricTriggerAttributes) InternalTokens

func (ProfileRuleMetricTriggerAttributes) InternalWithRef

func (ProfileRuleMetricTriggerAttributes) MetricName

func (ProfileRuleMetricTriggerAttributes) MetricNamespace

func (ProfileRuleMetricTriggerAttributes) MetricResourceId

func (ProfileRuleMetricTriggerAttributes) Operator

func (ProfileRuleMetricTriggerAttributes) Statistic

func (ProfileRuleMetricTriggerAttributes) Threshold

func (ProfileRuleMetricTriggerAttributes) TimeAggregation

func (ProfileRuleMetricTriggerAttributes) TimeGrain

func (ProfileRuleMetricTriggerAttributes) TimeWindow

type ProfileRuleMetricTriggerDimensions

type ProfileRuleMetricTriggerDimensions struct {
	// Name: string, required
	Name terra.StringValue `hcl:"name,attr" validate:"required"`
	// Operator: string, required
	Operator terra.StringValue `hcl:"operator,attr" validate:"required"`
	// Values: list of string, required
	Values terra.ListValue[terra.StringValue] `hcl:"values,attr" validate:"required"`
}

type ProfileRuleMetricTriggerDimensionsAttributes

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

func (ProfileRuleMetricTriggerDimensionsAttributes) InternalRef

func (ProfileRuleMetricTriggerDimensionsAttributes) InternalTokens

func (ProfileRuleMetricTriggerDimensionsAttributes) InternalWithRef

func (ProfileRuleMetricTriggerDimensionsAttributes) Name

func (ProfileRuleMetricTriggerDimensionsAttributes) Operator

func (ProfileRuleMetricTriggerDimensionsAttributes) Values

type ProfileRuleMetricTriggerDimensionsState

type ProfileRuleMetricTriggerDimensionsState struct {
	Name     string   `json:"name"`
	Operator string   `json:"operator"`
	Values   []string `json:"values"`
}

type ProfileRuleMetricTriggerState

type ProfileRuleMetricTriggerState struct {
	DivideByInstanceCount bool                                      `json:"divide_by_instance_count"`
	MetricName            string                                    `json:"metric_name"`
	MetricNamespace       string                                    `json:"metric_namespace"`
	MetricResourceId      string                                    `json:"metric_resource_id"`
	Operator              string                                    `json:"operator"`
	Statistic             string                                    `json:"statistic"`
	Threshold             float64                                   `json:"threshold"`
	TimeAggregation       string                                    `json:"time_aggregation"`
	TimeGrain             string                                    `json:"time_grain"`
	TimeWindow            string                                    `json:"time_window"`
	Dimensions            []ProfileRuleMetricTriggerDimensionsState `json:"dimensions"`
}

type ProfileRuleScaleAction

type ProfileRuleScaleAction struct {
	// Cooldown: string, required
	Cooldown terra.StringValue `hcl:"cooldown,attr" validate:"required"`
	// Direction: string, required
	Direction terra.StringValue `hcl:"direction,attr" validate:"required"`
	// Type: string, required
	Type terra.StringValue `hcl:"type,attr" validate:"required"`
	// Value: number, required
	Value terra.NumberValue `hcl:"value,attr" validate:"required"`
}

type ProfileRuleScaleActionAttributes

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

func (ProfileRuleScaleActionAttributes) Cooldown

func (ProfileRuleScaleActionAttributes) Direction

func (ProfileRuleScaleActionAttributes) InternalRef

func (ProfileRuleScaleActionAttributes) InternalTokens

func (sa ProfileRuleScaleActionAttributes) InternalTokens() (hclwrite.Tokens, error)

func (ProfileRuleScaleActionAttributes) InternalWithRef

func (ProfileRuleScaleActionAttributes) Type

func (ProfileRuleScaleActionAttributes) Value

type ProfileRuleScaleActionState

type ProfileRuleScaleActionState struct {
	Cooldown  string  `json:"cooldown"`
	Direction string  `json:"direction"`
	Type      string  `json:"type"`
	Value     float64 `json:"value"`
}

type ProfileRuleState

type ProfileRuleState struct {
	MetricTrigger []ProfileRuleMetricTriggerState `json:"metric_trigger"`
	ScaleAction   []ProfileRuleScaleActionState   `json:"scale_action"`
}

type ProfileState

type ProfileState struct {
	Name       string                   `json:"name"`
	Capacity   []ProfileCapacityState   `json:"capacity"`
	FixedDate  []ProfileFixedDateState  `json:"fixed_date"`
	Recurrence []ProfileRecurrenceState `json:"recurrence"`
	Rule       []ProfileRuleState       `json:"rule"`
}

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_autoscale_setting.

func New

func New(name string, args Args) *Resource

New creates a new instance of Resource.

func (*Resource) Attributes

func (amas *Resource) Attributes() azurermMonitorAutoscaleSettingAttributes

Attributes returns the attributes for Resource.

func (*Resource) Configuration

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

Configuration returns the configuration (args) for Resource.

func (*Resource) DependOn

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

DependOn is used for other resources to depend on Resource.

func (*Resource) Dependencies

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

Dependencies returns the list of resources Resource depends_on.

func (*Resource) ImportState

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

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

func (*Resource) LifecycleManagement

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

LifecycleManagement returns the lifecycle block for Resource.

func (*Resource) LocalName

func (amas *Resource) LocalName() string

LocalName returns the local name for Resource.

func (*Resource) State

func (amas *Resource) State() (*azurermMonitorAutoscaleSettingState, bool)

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

func (*Resource) StateMust

func (amas *Resource) StateMust() *azurermMonitorAutoscaleSettingState

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

func (*Resource) Type

func (amas *Resource) Type() string

Type returns the Terraform object type for Resource.

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