Hello,
In other programming languages the Map is a collection with key, value pairs that are only known at runtime. I want to do the same here, to be able to created 2 resources:
resource "example_bag" "bag1" {
name = "res1"
content = [
book = "How to draw"
pen = "Color red"
}
}
resource "example_bag" "bag2" {
name = "res1"
content = [
drink = "Beer"
food = "Burger"
}
}
But I don’t know the fields inside the Map content. Looking at the documentation of MapNestedAttribute we need to list all the attributes inside the Map, which is not possible. How can I describe correctly in the resource schema for my use case?
Thanks,
Valentin