fogg icon indicating copy to clipboard operation
fogg copied to clipboard

Passing multiple providers to a module invocation

Open vincenthsh opened this issue 2 years ago • 0 comments

I'm able to define additional_providers for the AWS provider:

# omitting defaults with default aws provider config
envs:
  my-env:
    providers:
      aws:
        additional_providers:
          replica:
            region: us-east-2

which generates fogg.tf with 2 providers (aws and aws.replica)

but the module I'm trying to use still complains I need to explicitly pass them in:

module "foo" {
  source = "..."

  providers = {
    aws         = aws
    aws.replica = aws.replica
  }
}

I believe this is currently not supported in the tf module invocation templates?

I'm ok to create a PR for this, but I'm wondering if I'm missing something on the TF config side?

vincenthsh avatar Sep 22 '22 00:09 vincenthsh