raum01 / terraform-aws-cloudformation-autoscaling

Terraform module which creates Auto Scaling resources on AWS

Home Page:https://registry.terraform.io/modules/dshmelev/cloudformation-autoscaling/aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Auto Scaling Group (ASG) Terraform module

Note: This module forked from terraform-aws-modules/terraform-aws-autoscaling; Replaced "aws_autoscaling_group" to "aws_cloudformation_stack" for allowing RollingUpdate hashicorp/terraform#1552

Terraform module which creates Auto Scaling resources on AWS.

These types of resources are supported:

Root module calls these modules which can also be used separately to create independent resources:

Usage

module "asg" {
  source = "terraform-aws-modules/autoscaling/aws"

  # Launch configuration
  lc_name = "example-lc"

  image_id        = "ami-ebd02392"
  instance_type   = "t2.micro"
  security_groups = ["sg-12345678"]

  ebs_block_device = [
    {
      device_name           = "/dev/xvdz"
      volume_type           = "gp2"
      volume_size           = "50"
      delete_on_termination = true
    },
  ]

  root_block_device = [
    {
      volume_size = "50"
      volume_type = "gp2"
    },
  ]

  # Auto scaling group
  asg_name                  = "example-asg"
  vpc_zone_identifier       = ["subnet-1235678", "subnet-87654321"]
  health_check_type         = "EC2"
  min_size                  = 0
  max_size                  = 1
  desired_capacity          = 1
  wait_for_capacity_timeout = 0

  tags = [
    {
      key                 = "Environment"
      value               = "dev"
      propagate_at_launch = true
    },
    {
      key                 = "Project"
      value               = "megasecret"
      propagate_at_launch = true
    },
  ]
}

Examples

Authors

Module managed by Anton Babenko.

License

Apache 2 Licensed. See LICENSE for full details.

About

Terraform module which creates Auto Scaling resources on AWS

https://registry.terraform.io/modules/dshmelev/cloudformation-autoscaling/aws

License:Other


Languages

Language:HCL 100.0%