The documentation explains that you can use a config file when setting up your backend. You partially configure the backend as part of your main.tf file and then point it towards a config file inline as part of the terraform init command.
This works okay, but when it comes to accessing data from this backend it seems as though you have to hardcode in the access credentials. I'm wondering essentially if there's any way for me to point the backend to its config file as part of my main.tf file. Something like this:
data "terraform_remote_state" "vnet"
{
backend = "azurerm"
config {
key = "path/to/state/file"
file = "path/to/config/file.tf"
}
}
If this feature exists I can't find the documentation for it. Am I missing something or is it just not possible right now?
azurermprovider) so I'd recommend using that where possible.