![Terraform Version](https://camo.githubusercontent.com/e027dd4a4cffd240a14c011828e1c580427673e841ca7f91f707fd9a709d8122/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74662d253345253344302e31352e302d626c75652e737667)
Writes config files to ./scaffoldly
for all services in all environments to the repo for the service.
module "github_config_files_serverless_apis" {
source = "scaffoldly/config-files/github"
for_each = local.serverless_apis
organization = var.organization
repository_name = module.serverless_api[each.key].repository_name
service_name = module.serverless_api[each.key].service_name
stages = keys(var.stages)
services = zipmap(values(module.serverless_api)[*].service_name, values(module.serverless_api)[*].stage_config)
stage_env_vars = module.serverless_api[each.key].stage_env_vars
shared_env_vars = var.shared_env_vars
stage_domains = module.dns.stage_domains
depends_on = [
module.public_website,
module.serverless_api
]
}
module "github_config_files_public_websites" {
source = "scaffoldly/config-files/github"
for_each = var.public_websites
organization = var.organization
repository_name = module.public_website[each.key].repository_name
service_name = module.public_website[each.key].service_name
stages = keys(var.stages)
services = zipmap(values(module.serverless_api)[*].service_name, values(module.serverless_api)[*].stage_config)
stage_env_vars = module.public_website[each.key].stage_env_vars
shared_env_vars = var.shared_env_vars
stage_domains = module.dns.stage_domains
depends_on = [
module.public_website,
module.serverless_api
]
}
Name |
Description |
Type |
Default |
Required |
organization |
The organization name |
string |
n/a |
yes |
repository_name |
The repository name |
string |
n/a |
yes |
service_name |
The service name |
string |
n/a |
yes |
services |
A map of services+config: Service Name -> Stage -> [key: base_url|service_name|repo_nane] = value |
map(map(map(string))) |
n/a |
yes |
shared_env_vars |
A map of all of the org-wide environment variables |
map(string) |
n/a |
yes |
stage_domains |
Stage Domains config. Using any so as the variable evolves/changes, everything still gets written |
any |
n/a |
yes |
stage_env_vars |
A map of environment variables for the stage: Stage -> Name -> Value |
map(map(string)) |
n/a |
yes |
stages |
The list of available stages |
list(string) |
n/a |
yes |
No outputs.