oci_autoscaling_auto_scaling_configuration

This resource provides the Auto Scaling Configuration resource in Oracle Cloud Infrastructure Auto Scaling service.

Creates an autoscaling configuration.

Example Usage

resource "oci_autoscaling_auto_scaling_configuration" "test_auto_scaling_configuration" {
	#Required
	auto_scaling_resources {
		#Required
		id = var.auto_scaling_configuration_auto_scaling_resources_id
		type = var.auto_scaling_configuration_auto_scaling_resources_type
	}
	compartment_id = var.compartment_id
	policies {
		#Required
		policy_type = var.auto_scaling_configuration_policies_policy_type

		#Optional
		capacity {

			#Optional
			initial = var.auto_scaling_configuration_policies_capacity_initial
			max = var.auto_scaling_configuration_policies_capacity_max
			min = var.auto_scaling_configuration_policies_capacity_min
		}
		display_name = var.auto_scaling_configuration_policies_display_name
		execution_schedule {
			#Required
			expression = var.auto_scaling_configuration_policies_execution_schedule_expression
			timezone = var.auto_scaling_configuration_policies_execution_schedule_timezone
			type = var.auto_scaling_configuration_policies_execution_schedule_type
		}
		is_enabled = var.auto_scaling_configuration_policies_is_enabled
		resource_action {
			#Required
			action = var.auto_scaling_configuration_policies_resource_action_action

			#Required
			action_type = var.auto_scaling_configuration_policies_resource_action_action_type
		}
		rules {

			#Optional
			action {

				#Optional
				type = var.auto_scaling_configuration_policies_rules_action_type
				value = var.auto_scaling_configuration_policies_rules_action_value
			}
			display_name = var.auto_scaling_configuration_policies_rules_display_name
			metric {

				#Optional
				metric_type = var.auto_scaling_configuration_policies_rules_metric_metric_type
				threshold {

					#Optional
					operator = var.auto_scaling_configuration_policies_rules_metric_threshold_operator
					value = var.auto_scaling_configuration_policies_rules_metric_threshold_value
				}
			}
		}
	}

	#Optional
	cool_down_in_seconds = var.auto_scaling_configuration_cool_down_in_seconds
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.auto_scaling_configuration_display_name
	freeform_tags = {"Department"= "Finance"}
	is_enabled = var.auto_scaling_configuration_is_enabled
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Auto Scaling Configuration * update - (Defaults to 20 minutes), when updating the Auto Scaling Configuration * delete - (Defaults to 20 minutes), when destroying the Auto Scaling Configuration

Import

AutoScalingConfigurations can be imported using the id, e.g.

$ terraform import oci_autoscaling_auto_scaling_configuration.test_auto_scaling_configuration "id"