provider "aws" { region = "eu-west-2" } variable "user_list" { type = list default = [ "cedric-user1", "cedric-user2", "cedric-user3" ] } resource "aws_iam_user" "user1" { name = element(var.user_list,count.index) count = length(var.user_list) }