public registry modules aws Archives - For all your terraform needs https://terraformarchitect.com/tag/public-registry-modules-aws/ Automation cannot be an afterthought (TM) Thu, 12 Nov 2020 22:25:35 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 Reusable Terraform Modules from the public registry https://terraformarchitect.com/reusable-terraform/reusable-terraform-modules-from-the-public-registry/?utm_source=rss&utm_medium=rss&utm_campaign=reusable-terraform-modules-from-the-public-registry https://terraformarchitect.com/reusable-terraform/reusable-terraform-modules-from-the-public-registry/#comments Tue, 10 Nov 2020 15:39:38 +0000 http://terraformarchitect.com/?p=90 There’s a wealth of existing modules for AWS, GCP and Azure on registry.terraform.io (Also read, reusable modules in Terraform, getting started ) Look for something of interest to you here […]

The post Reusable Terraform Modules from the public registry appeared first on For all your terraform needs.

]]>
There’s a wealth of existing modules for AWS, GCP and Azure on registry.terraform.io (Also read, reusable modules in Terraform, getting started )

Look for something of interest to you here : https://registry.terraform.io/browse/modules.

Once you locate the module , there should be a ‘usage’ instruction. Basically, here’s what you need to do to use that module in your own source code.

  1. Explicitly spell out the source of your module  – as shown below. (It will automatically reach out over the internet to this public repo)
  2. Pass in values for all the REQUIRED variables, inside the module block, as shown below.
module "project-factory" {

  source  = "terraform-google-modules/project-factory/google"

  version = "9.2.0"

  billing_account = "account id here"

  budget_alert_pubsub_topic = `projects/{project_id}/topics/{topic_id}`

  budget_amount = 20

  name = "test_budget_alerts"

  org_id = "your_org_id here"

  vpc_service_control_perimeter_name = "test_project_permiter"

}

Summary

That’s really all there is to it.  Instead of writing all this code from scratch, you simply reference the publicly available module. And pass in the required (and optional ) variable values.

A note on security 

If you leverage a module provided by AWS or Google or Microsoft, you can rest assured that they have passed certain security and coding standards. However, there are also ‘unverified’ modules out there on the public registry. Use these with caution.

Next Steps?

Need help with your Terraform or PowerShell or other automation effort? Set up a free consultation – Start the conversation today.  

The post Reusable Terraform Modules from the public registry appeared first on For all your terraform needs.

]]>
https://terraformarchitect.com/reusable-terraform/reusable-terraform-modules-from-the-public-registry/feed/ 1