output "user_data_output" {
  value = templatefile("${path.module}/user_data_chef_bootstrap.tpl",
    {
      chef_version                     = var.chef_version
      chef_server                      = var.chef_server
      chef_server_url                  = var.chef_server_url
      chef_environment                 = var.chef_environment
      node_data                        = jsonencode(local.node_data)
      aws_instance_name                = var.aws_instance_name
      s3_chef_bucket                   = var.s3_chef_bucket
      log_file                         = var.log_file
      encrypted_data_bag_secret        = var.encrypted_data_bag_secret
      qualys_encrypted_data_bag_secret = var.qualys_encrypted_data_bag_secret
      ssl_verify_mode                  = var.ssl_verify_mode
      ebs_data_mount_point             = var.ebs_data_mount_point
      instance_store_mount_point       = var.instance_store_mount_point
      block_device_filesystem_type     = var.block_device_filesystem_type
    }
  )
}

output "s3_chef_bucket_output" {
  value = var.s3_chef_bucket
}
