Difference between revisions of "User data"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
  
 
   user_data                  = [[templatefile]]("${[[path.module]]}/assets/your_instance_data[[.tftpl]]", {})
 
   user_data                  = [[templatefile]]("${[[path.module]]}/assets/your_instance_data[[.tftpl]]", {})
 +
 +
 +
  user_data = templatefile("${path.module}/path/yourfile.tftpl", {
 +
    ecs_cluster            = aws_ecs_cluster.your_cluster.name
 +
    [[ecs_instance_attribute]] = var.ecs_instance_attribute
 +
  })
  
  

Revision as of 13:31, 29 May 2023

user_data (optional) user data to provide when launching the instance, such as shell scripts.

  user_data                   = templatefile("${path.module}/assets/your_instance_data.tftpl", {})


 user_data = templatefile("${path.module}/path/yourfile.tftpl", {
   ecs_cluster            = aws_ecs_cluster.your_cluster.name
   ecs_instance_attribute = var.ecs_instance_attribute
 })


Important notes:

Related

See also

Advertising: