Skip to content

map("key1", "value1", ...) => list(map("key", "key1", "value", "value1", "propagate_at_launch", true), map(...))

License

Notifications You must be signed in to change notification settings

hattorious/terraform-aws-tags-to-asg-tags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform AWS tags to AWS AutoScaling Group (ASG) tags

Converts a Terraform map of ${length(n)} into a list of AWS AutoScaling Group tags which will propogate at launch.

AWS ASGs have a different tagging structure which can cause pain when implementing a tagging policy; this module allows you to use the same map of tags on ASGs and other AWS resources.

Usage

module "aws_asg_tags" {
  source = "[email protected]:mavin/terraform-aws-tags-to-asg-tags.git"

  tags = "${map(
    "key1", "value1",
    "key2", "value2",
  )}"
}

...

resource "aws_autoscaling_group" "foo" {

  ...

  tags = "${module.aws_asg_tags.tags}"
}

Tested on Terraform v0.11.7 and terraform-provider-null_v1.0.0

About

map("key1", "value1", ...) => list(map("key", "key1", "value", "value1", "propagate_at_launch", true), map(...))

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages