aws_autoscaling_lifecycle_hook
Provides an AutoScaling Lifecycle Hook resource.
Example Usage
resource:
aws_autoscaling_group:
foobar:
availability_zones:
- us-west-2a
name: terraform-test-foobar5
health_check_type: EC2
termination_policies:
- OldestInstance
tag:
key: Foo
value: foo-bar
propagate_at_launch: true
aws_autoscaling_lifecycle_hook:
foobar:
name: foobar
autoscaling_group_name: '${aws_autoscaling_group.foobar.name}'
default_result: CONTINUE
heartbeat_timeout: 2000
lifecycle_transition: 'autoscaling:EC2_INSTANCE_LAUNCHING'
notification_metadata: "{\n \"foo\": \"bar\"\n}"
notification_target_arn: 'arn:aws:sqs:us-east-1:444455556666:queue1*'
role_arn: 'arn:aws:iam::123456789012:role/S3Access'
Argument Reference
The following arguments are supported:
-
name
- (Required) The name of the lifecycle hook. -
autoscaling_group_name
- (Required) The name of the Auto Scaling group to which you want to assign the lifecycle hook -
default_result
- (Optional) Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. -
heartbeat_timeout
- (Optional) Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. When the lifecycle hook times out, Auto Scaling performs the action defined in the DefaultResult parameter
See the source of this document at Terraform.io