I have attempted to use a module in the Terrafile (as described in Terrafile - Terraspace). I stumped upon an issue with the azurerm_resource_group, which is declared as data in main.tf. As far as I understand the Terraform docs, the data means that the resource group must have been created before and exist at the time of creating the stack with Terraspace. However, in our Terraspace app the resource group is created along all other resources, and so I get an error from the module main.tf that the resource group could not be found.
Because of that I cannot use the vendor module verbatim, but must copy its code to app/modules and get rid of the data “azurerm_resource_group” “this” declaration to be able to use the rest of the code.
Is there any solution that would allow me to use the vendor module code without any modification?
Any help will be much appreciated.