From 23dbe0ae85e821da0d96d368b99ebfc93b574878 Mon Sep 17 00:00:00 2001 From: Simone Ruffilli Date: Fri, 15 Oct 2021 11:33:48 +0200 Subject: [PATCH] Updated factories/README.md --- factories/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/factories/README.md b/factories/README.md index 3bfbf777..f23e7990 100644 --- a/factories/README.md +++ b/factories/README.md @@ -30,6 +30,21 @@ secondary_ip_ranges: This configuration creates the `subnet-alpha-a` subnet, located in VPC `vpc-alpha`, inside project `project-prod-a`. +All modules consume specialized `yaml` configurations - located on a well-defined directory structure that carries metadata. Let's observe an example from the [Example environments](example-environments/) directory: + +```yaml +# ../example-environments/prod/conf/project-prod-a/vpc-alpha/subnet-alpha-a.yaml + +region: europe-west3 +ip_cidr_range: 10.0.0.0/24 +description: Sample Subnet in project project-prod-a, vpc-alpha +secondary_ip_ranges: + secondary-range-a: 192.168.0.0/24 + secondary-range-b: 192.168.1.0/24 +``` + +This configuration creates the `subnet-alpha-a` subnet, located in VPC `vpc-alpha`, inside project `project-prod-a`. + ## Rationale This approach is based on modules implementing the factory logic using Terraform code, and a set of directories having a well-defined, semantic structure holding the configuration for the resources in YaML syntax.