Write stage config files to a GitHub repository:
.scaffoldly/services.json
.scaffoldly/env-vars.json
.scaffoldly/.env
module "stage_files" {
count = length(var.stages)
source = "./stage-files"
repository_name = var.repository_name
service_name = var.service_name
repository_description = data.github_repository.repository.description
branch = data.github_repository.repository.default_branch
stage_name = var.stages[count.index]
stage_config = {
for key, value in var.services :
key => lookup(value, var.stages[count.index])
}
env_vars = lookup(var.stage_env_vars, var.stages[count.index])
shared_env_vars = var.shared_env_vars
}
No modules.
Name |
Description |
Type |
Default |
Required |
branch |
The default branch of the repository |
string |
n/a |
yes |
env_vars |
Environment variables exclusive to this repo/and stage |
map(string) |
n/a |
yes |
repository_description |
The description of the repository, will be added to the APPLICATION_FRIENDLY_NAME environment variable |
string |
"" |
no |
repository_name |
The repository name to add stage config files to |
string |
n/a |
yes |
service_name |
The service name |
string |
n/a |
yes |
shared_env_vars |
Global environment variables to merge in to the environment variables |
map(string) |
n/a |
yes |
stage_config |
The full stage config, initially keyed by stage name, followed by a map of the various properties for a stage |
map(map(string)) |
n/a |
yes |
stage_name |
The name of the stage for the provided config. Used to prefix filenames |
string |
"" |
no |
No outputs.