package-search-gradle-plugins icon indicating copy to clipboard operation
package-search-gradle-plugins copied to clipboard

Multiple levels of tfModules

Open agascon opened this issue 1 year ago • 0 comments

Hi team,

We are trying to build a gradle project for developing a serverless application (basically composed by lambdas + other AWS resources)

To organize all this code, we are splitting the different tf script in modules, initially in just 2 levels:

  • 1st level of tfModules which basically represent the deployment targets, which references a number of other modules from the 2nd level.
  • 2nd level of tfModules which contains lambda scripts.

This is working perfect and we can deploy at any target by running something like...

gradle clean :terraform:_targets:production:terraformApply

Now, we are introducing some shared modules to reuse tf scripts, for example monitoring resources. for example...

  • Deployment target tfModules -> dependent on lambda modules.
  • Lambda tfModules which in some cases depends on shared resource modules.
  • Shared resource modules

With this setup, gradle fails with some error as the module source in the lambda tfmodule was not found?

Is this configuration with multiple nested tfModules expected to work? Or only something like in the original example is supported?

Thanks!

agascon avatar Oct 03 '23 20:10 agascon