Search code examples
terraformterraform-provider-awsterraform-modules

Terraform modules


Sorry folks it might be a silly question, I am new to terraform modules. I have created 2 private registries which are S3 and common tags. So whenever I am deploying S3 using the S3 module, How can I call the private shared tag module to get the tags?


Solution

  • If you are using modules, you get the output like this:

    module "commontags" {
      source = "path"
      ...
    }
    
    module "s3module" {
      tags = module.commontags.tags
    }
    

    Check the official documentation to get more examples.