Generate provider block with values from dependency

Hi, need to configure provider for kubernetes for one specific module and was trying to use the output from azurerm_kubernetes_cluster that I’m using on another module with no luck.

Is there a way to use dependencies on generate block?

Thanks,
Bruno

Hi @bcochofel ,

Assuming you are referring to terragrunt dependencies, then yes you can reference dependency outputs in generate blocks by using string interpolation. E.g.:

generate "foo" {
  path = "foo.tf"
  contents = <<EOF
${dependency.bar.outputs.data}
EOF
}

Hope this helps!
- Yori

Thank you, that’s exactly what I wanted :slight_smile: