This module is designed to be driven from JSON and intended to configure all required aspects of Networking in GCP.
locals {
project_id = "rteller-demo-host-aaaa"
prefix = "test" // Make optional
environment = "" // Make optional
network_config_path = "./network_config"
network_config_sets = fileset(local.network_config_path, "*.json")
network_configs = flatten([for networks in local.network_config_sets : [
for network in jsondecode(file("${local.network_config_path}/${networks}")) :
merge(network, { fileName = split(".", networks)[0] })
]])
}
module "network" {
source = "r-teller/foundation-network/google"
version = "~> 0.10.0"
project_id = local.project_id
prefix = local.prefix
environment = "cases"
network_configs = local.network_configs
}
- Cloud VPN -- JSON Schema needs to be created to define expected properties -- Integration with Secret Manger for storing VPN pre-shared keys -- Creation of terraform logic
- Explicit naming of resources -- For example VPC, Firewall Rule, Cloud Router
- Deployment to existing VPCs -- Currently this module expects to create the VPCs specified
- Specifying the project_id and prefix within the JSON spec
https://r-teller.github.io/terraform-google-foundation-network
https://r-teller.github.io/terraform-google-foundation-network/documentation/
https://github.com/ajv-validator/ajv https://ajv.js.org/packages/ajv-cli.html
npm install -g ajv-cli
ajv validate -s .\json_generator\src\Schema\resolved.schema.json -d .\test_cases\1_network\1a_network_single_name.json --strict=false
ajv validate -s .\json_generator\src\Schema\resolved.schema.json -d .\test_cases\*\*.json --strict=false
https://github.com/davidkelley/json-dereference-cli
npm install -g json-dereference-cli
json-dereference -s my-schema.json -o compiled-schema.yaml
https://github.com/ui-schema/ui-schema
https://github.com/coveooss/json-schema-for-humans
## Install as admin to make globally available
pip install json-schema-for-humans