google_compute_autoscaler

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 {
	// Description: string, optional
	Description terra.StringValue `hcl:"description,attr"`
	// Id: string, optional
	Id terra.StringValue `hcl:"id,attr"`
	// Name: string, required
	Name terra.StringValue `hcl:"name,attr" validate:"required"`
	// Project: string, optional
	Project terra.StringValue `hcl:"project,attr"`
	// Target: string, required
	Target terra.StringValue `hcl:"target,attr" validate:"required"`
	// Zone: string, optional
	Zone terra.StringValue `hcl:"zone,attr"`
	// AutoscalingPolicy: required
	AutoscalingPolicy *AutoscalingPolicy `hcl:"autoscaling_policy,block" validate:"required"`
	// Timeouts: optional
	Timeouts *Timeouts `hcl:"timeouts,block"`
}

Args contains the configurations for google_compute_autoscaler.

type AutoscalingPolicy

type AutoscalingPolicy struct {
	// CooldownPeriod: number, optional
	CooldownPeriod terra.NumberValue `hcl:"cooldown_period,attr"`
	// MaxReplicas: number, required
	MaxReplicas terra.NumberValue `hcl:"max_replicas,attr" validate:"required"`
	// MinReplicas: number, required
	MinReplicas terra.NumberValue `hcl:"min_replicas,attr" validate:"required"`
	// Mode: string, optional
	Mode terra.StringValue `hcl:"mode,attr"`
	// AutoscalingPolicyCpuUtilization: optional
	CpuUtilization *AutoscalingPolicyCpuUtilization `hcl:"cpu_utilization,block"`
	// AutoscalingPolicyLoadBalancingUtilization: optional
	LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `hcl:"load_balancing_utilization,block"`
	// AutoscalingPolicyMetric: min=0
	Metric []AutoscalingPolicyMetric `hcl:"metric,block" validate:"min=0"`
	// AutoscalingPolicyScaleDownControl: optional
	ScaleDownControl *AutoscalingPolicyScaleDownControl `hcl:"scale_down_control,block"`
	// AutoscalingPolicyScaleInControl: optional
	ScaleInControl *AutoscalingPolicyScaleInControl `hcl:"scale_in_control,block"`
	// AutoscalingPolicyScalingSchedules: min=0
	ScalingSchedules []AutoscalingPolicyScalingSchedules `hcl:"scaling_schedules,block" validate:"min=0"`
}

type AutoscalingPolicyAttributes

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

func (AutoscalingPolicyAttributes) CooldownPeriod

func (ap AutoscalingPolicyAttributes) CooldownPeriod() terra.NumberValue

func (AutoscalingPolicyAttributes) CpuUtilization

func (AutoscalingPolicyAttributes) InternalRef

func (ap AutoscalingPolicyAttributes) InternalRef() (terra.Reference, error)

func (AutoscalingPolicyAttributes) InternalTokens

func (ap AutoscalingPolicyAttributes) InternalTokens() (hclwrite.Tokens, error)

func (AutoscalingPolicyAttributes) InternalWithRef

func (AutoscalingPolicyAttributes) LoadBalancingUtilization

func (AutoscalingPolicyAttributes) MaxReplicas

func (AutoscalingPolicyAttributes) Metric

func (AutoscalingPolicyAttributes) MinReplicas

func (AutoscalingPolicyAttributes) Mode

func (AutoscalingPolicyAttributes) ScaleDownControl

func (AutoscalingPolicyAttributes) ScaleInControl

func (AutoscalingPolicyAttributes) ScalingSchedules

type AutoscalingPolicyCpuUtilization

type AutoscalingPolicyCpuUtilization struct {
	// PredictiveMethod: string, optional
	PredictiveMethod terra.StringValue `hcl:"predictive_method,attr"`
	// Target: number, required
	Target terra.NumberValue `hcl:"target,attr" validate:"required"`
}

type AutoscalingPolicyCpuUtilizationAttributes

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

func (AutoscalingPolicyCpuUtilizationAttributes) InternalRef

func (AutoscalingPolicyCpuUtilizationAttributes) InternalTokens

func (AutoscalingPolicyCpuUtilizationAttributes) InternalWithRef

func (AutoscalingPolicyCpuUtilizationAttributes) PredictiveMethod

func (AutoscalingPolicyCpuUtilizationAttributes) Target

type AutoscalingPolicyCpuUtilizationState

type AutoscalingPolicyCpuUtilizationState struct {
	PredictiveMethod string  `json:"predictive_method"`
	Target           float64 `json:"target"`
}

type AutoscalingPolicyLoadBalancingUtilization

type AutoscalingPolicyLoadBalancingUtilization struct {
	// Target: number, required
	Target terra.NumberValue `hcl:"target,attr" validate:"required"`
}

type AutoscalingPolicyLoadBalancingUtilizationAttributes

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

func (AutoscalingPolicyLoadBalancingUtilizationAttributes) InternalRef

func (AutoscalingPolicyLoadBalancingUtilizationAttributes) InternalTokens

func (AutoscalingPolicyLoadBalancingUtilizationAttributes) InternalWithRef

func (AutoscalingPolicyLoadBalancingUtilizationAttributes) Target

type AutoscalingPolicyLoadBalancingUtilizationState

type AutoscalingPolicyLoadBalancingUtilizationState struct {
	Target float64 `json:"target"`
}

type AutoscalingPolicyMetric

type AutoscalingPolicyMetric struct {
	// Filter: string, optional
	Filter terra.StringValue `hcl:"filter,attr"`
	// Name: string, required
	Name terra.StringValue `hcl:"name,attr" validate:"required"`
	// SingleInstanceAssignment: number, optional
	SingleInstanceAssignment terra.NumberValue `hcl:"single_instance_assignment,attr"`
	// Target: number, optional
	Target terra.NumberValue `hcl:"target,attr"`
	// Type: string, optional
	Type terra.StringValue `hcl:"type,attr"`
}

type AutoscalingPolicyMetricAttributes

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

func (AutoscalingPolicyMetricAttributes) Filter

func (AutoscalingPolicyMetricAttributes) InternalRef

func (AutoscalingPolicyMetricAttributes) InternalTokens

func (AutoscalingPolicyMetricAttributes) InternalWithRef

func (AutoscalingPolicyMetricAttributes) Name

func (AutoscalingPolicyMetricAttributes) SingleInstanceAssignment

func (m AutoscalingPolicyMetricAttributes) SingleInstanceAssignment() terra.NumberValue

func (AutoscalingPolicyMetricAttributes) Target

func (AutoscalingPolicyMetricAttributes) Type

type AutoscalingPolicyMetricState

type AutoscalingPolicyMetricState struct {
	Filter                   string  `json:"filter"`
	Name                     string  `json:"name"`
	SingleInstanceAssignment float64 `json:"single_instance_assignment"`
	Target                   float64 `json:"target"`
	Type                     string  `json:"type"`
}

type AutoscalingPolicyScaleDownControl

type AutoscalingPolicyScaleDownControl struct {
	// TimeWindowSec: number, optional
	TimeWindowSec terra.NumberValue `hcl:"time_window_sec,attr"`
	// AutoscalingPolicyScaleDownControlMaxScaledDownReplicas: optional
	MaxScaledDownReplicas *AutoscalingPolicyScaleDownControlMaxScaledDownReplicas `hcl:"max_scaled_down_replicas,block"`
}

type AutoscalingPolicyScaleDownControlAttributes

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

func (AutoscalingPolicyScaleDownControlAttributes) InternalRef

func (AutoscalingPolicyScaleDownControlAttributes) InternalTokens

func (AutoscalingPolicyScaleDownControlAttributes) InternalWithRef

func (AutoscalingPolicyScaleDownControlAttributes) TimeWindowSec

type AutoscalingPolicyScaleDownControlMaxScaledDownReplicas

type AutoscalingPolicyScaleDownControlMaxScaledDownReplicas struct {
	// Fixed: number, optional
	Fixed terra.NumberValue `hcl:"fixed,attr"`
	// Percent: number, optional
	Percent terra.NumberValue `hcl:"percent,attr"`
}

type AutoscalingPolicyScaleDownControlMaxScaledDownReplicasAttributes

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

func (AutoscalingPolicyScaleDownControlMaxScaledDownReplicasAttributes) Fixed

func (AutoscalingPolicyScaleDownControlMaxScaledDownReplicasAttributes) InternalRef

func (AutoscalingPolicyScaleDownControlMaxScaledDownReplicasAttributes) InternalTokens

func (AutoscalingPolicyScaleDownControlMaxScaledDownReplicasAttributes) InternalWithRef

func (AutoscalingPolicyScaleDownControlMaxScaledDownReplicasAttributes) Percent

type AutoscalingPolicyScaleDownControlMaxScaledDownReplicasState

type AutoscalingPolicyScaleDownControlMaxScaledDownReplicasState struct {
	Fixed   float64 `json:"fixed"`
	Percent float64 `json:"percent"`
}

type AutoscalingPolicyScaleDownControlState

type AutoscalingPolicyScaleDownControlState struct {
	TimeWindowSec         float64                                                       `json:"time_window_sec"`
	MaxScaledDownReplicas []AutoscalingPolicyScaleDownControlMaxScaledDownReplicasState `json:"max_scaled_down_replicas"`
}

type AutoscalingPolicyScaleInControl

type AutoscalingPolicyScaleInControl struct {
	// TimeWindowSec: number, optional
	TimeWindowSec terra.NumberValue `hcl:"time_window_sec,attr"`
	// AutoscalingPolicyScaleInControlMaxScaledInReplicas: optional
	MaxScaledInReplicas *AutoscalingPolicyScaleInControlMaxScaledInReplicas `hcl:"max_scaled_in_replicas,block"`
}

type AutoscalingPolicyScaleInControlAttributes

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

func (AutoscalingPolicyScaleInControlAttributes) InternalRef

func (AutoscalingPolicyScaleInControlAttributes) InternalTokens

func (AutoscalingPolicyScaleInControlAttributes) InternalWithRef

func (AutoscalingPolicyScaleInControlAttributes) TimeWindowSec

type AutoscalingPolicyScaleInControlMaxScaledInReplicas

type AutoscalingPolicyScaleInControlMaxScaledInReplicas struct {
	// Fixed: number, optional
	Fixed terra.NumberValue `hcl:"fixed,attr"`
	// Percent: number, optional
	Percent terra.NumberValue `hcl:"percent,attr"`
}

type AutoscalingPolicyScaleInControlMaxScaledInReplicasAttributes

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

func (AutoscalingPolicyScaleInControlMaxScaledInReplicasAttributes) Fixed

func (AutoscalingPolicyScaleInControlMaxScaledInReplicasAttributes) InternalRef

func (AutoscalingPolicyScaleInControlMaxScaledInReplicasAttributes) InternalTokens

func (AutoscalingPolicyScaleInControlMaxScaledInReplicasAttributes) InternalWithRef

func (AutoscalingPolicyScaleInControlMaxScaledInReplicasAttributes) Percent

type AutoscalingPolicyScaleInControlMaxScaledInReplicasState

type AutoscalingPolicyScaleInControlMaxScaledInReplicasState struct {
	Fixed   float64 `json:"fixed"`
	Percent float64 `json:"percent"`
}

type AutoscalingPolicyScaleInControlState

type AutoscalingPolicyScaleInControlState struct {
	TimeWindowSec       float64                                                   `json:"time_window_sec"`
	MaxScaledInReplicas []AutoscalingPolicyScaleInControlMaxScaledInReplicasState `json:"max_scaled_in_replicas"`
}

type AutoscalingPolicyScalingSchedules

type AutoscalingPolicyScalingSchedules struct {
	// Description: string, optional
	Description terra.StringValue `hcl:"description,attr"`
	// Disabled: bool, optional
	Disabled terra.BoolValue `hcl:"disabled,attr"`
	// DurationSec: number, required
	DurationSec terra.NumberValue `hcl:"duration_sec,attr" validate:"required"`
	// MinRequiredReplicas: number, required
	MinRequiredReplicas terra.NumberValue `hcl:"min_required_replicas,attr" validate:"required"`
	// Name: string, required
	Name terra.StringValue `hcl:"name,attr" validate:"required"`
	// Schedule: string, required
	Schedule terra.StringValue `hcl:"schedule,attr" validate:"required"`
	// TimeZone: string, optional
	TimeZone terra.StringValue `hcl:"time_zone,attr"`
}

type AutoscalingPolicyScalingSchedulesAttributes

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

func (AutoscalingPolicyScalingSchedulesAttributes) Description

func (AutoscalingPolicyScalingSchedulesAttributes) Disabled

func (AutoscalingPolicyScalingSchedulesAttributes) DurationSec

func (AutoscalingPolicyScalingSchedulesAttributes) InternalRef

func (AutoscalingPolicyScalingSchedulesAttributes) InternalTokens

func (AutoscalingPolicyScalingSchedulesAttributes) InternalWithRef

func (AutoscalingPolicyScalingSchedulesAttributes) MinRequiredReplicas

func (AutoscalingPolicyScalingSchedulesAttributes) Name

func (AutoscalingPolicyScalingSchedulesAttributes) Schedule

func (AutoscalingPolicyScalingSchedulesAttributes) TimeZone

type AutoscalingPolicyScalingSchedulesState

type AutoscalingPolicyScalingSchedulesState struct {
	Description         string  `json:"description"`
	Disabled            bool    `json:"disabled"`
	DurationSec         float64 `json:"duration_sec"`
	MinRequiredReplicas float64 `json:"min_required_replicas"`
	Name                string  `json:"name"`
	Schedule            string  `json:"schedule"`
	TimeZone            string  `json:"time_zone"`
}

type AutoscalingPolicyState

type AutoscalingPolicyState struct {
	CooldownPeriod           float64                                          `json:"cooldown_period"`
	MaxReplicas              float64                                          `json:"max_replicas"`
	MinReplicas              float64                                          `json:"min_replicas"`
	Mode                     string                                           `json:"mode"`
	CpuUtilization           []AutoscalingPolicyCpuUtilizationState           `json:"cpu_utilization"`
	LoadBalancingUtilization []AutoscalingPolicyLoadBalancingUtilizationState `json:"load_balancing_utilization"`
	Metric                   []AutoscalingPolicyMetricState                   `json:"metric"`
	ScaleDownControl         []AutoscalingPolicyScaleDownControlState         `json:"scale_down_control"`
	ScaleInControl           []AutoscalingPolicyScaleInControlState           `json:"scale_in_control"`
	ScalingSchedules         []AutoscalingPolicyScalingSchedulesState         `json:"scaling_schedules"`
}

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

func New

func New(name string, args Args) *Resource

New creates a new instance of Resource.

func (*Resource) Attributes

func (gca *Resource) Attributes() googleComputeAutoscalerAttributes

Attributes returns the attributes for Resource.

func (*Resource) Configuration

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

Configuration returns the configuration (args) for Resource.

func (*Resource) DependOn

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

DependOn is used for other resources to depend on Resource.

func (*Resource) Dependencies

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

Dependencies returns the list of resources Resource depends_on.

func (*Resource) ImportState

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

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

func (*Resource) LifecycleManagement

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

LifecycleManagement returns the lifecycle block for Resource.

func (*Resource) LocalName

func (gca *Resource) LocalName() string

LocalName returns the local name for Resource.

func (*Resource) State

func (gca *Resource) State() (*googleComputeAutoscalerState, bool)

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

func (*Resource) StateMust

func (gca *Resource) StateMust() *googleComputeAutoscalerState

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

func (*Resource) Type

func (gca *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"`
	// 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) Update

type TimeoutsState

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

Jump to

Keyboard shortcuts

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