Hello,
what is the proper way to create an additional resource?
E,g.
Step 1
variable user_names {
type = list(string)
default = ["user1","user2"]
resource "aws_iam_user" "example" {
count = length(var.user_names)
name = var.user_names[count.index]
}
Step 2:
variable user_names {
type = list(string)
default = ["user1","user2",**"user3"**]
It is my understanding that the code above will fail because user1 and user2 already exist.
What is the proper way of handling such a situation?
Thank you
AZ