I’m writing terraform custom provider, and I’m completely new at terraform.
I need to take user input, transform it, and pass it to resource, something like this
data "data_source" d1 {
input = "some input here"
//output = { param_a,param_b }
}
resource "resource" "r1" {
input = {
param_a : data.data_source.output.param_a
param_b : data.data_source.output.param_b
}
}
But the problem is that I have many param_x and its very annoying to pass it one by one
Is there any better solution to do that ? Can I pass whole object somehow ?
This unfortunately does not work
resource "resource" "r1" {
input = data.data_source.output
}