Giter Club home page Giter Club logo

terraform-github-config-files's Introduction

Maintained by Scaffoldly GitHub release (latest SemVer) Terraform Version

Description

Writes config files to ./scaffoldly for all services in all environments to the repo for the service.

Usage

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
  ]
}

Requirements

Name Version
terraform >= 0.15
github 4.9.4

Providers

Name Version
github 4.9.4

Modules

Name Source Version
stage_files scaffoldly/stage-config-files/github 0.15.1
stage_files_default scaffoldly/stage-config-files/github 0.15.1

Resources

Name Type
github_repository_file.readme resource
github_repository.repository data source

Inputs

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

Outputs

No outputs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.