Variables in provider config

Thanks @apparentlymart, that makes sense

Looking at the graph produced by terraform graph | dot -Tsvg > graph.svg, which I attached, am I understanding correctly that the dag is interpreting the dependencies of this config correctly, so it would be safe for me to use this kind of configuration?

EDIT: To clarify, I’m talking about using this type of config, not the config posted specifically. The reason I need the provider to be configured with resource outputs is to overcome the chicken and egg problem, since we’re deploying grafana with terraform, which we then use to issue the api key, which in turn is used in the provider config, so that we can then go and use grafana resources to create dashboards, all in one apply