Giter Club home page Giter Club logo

terraform-github-stage-config-files's Introduction

Maintained by Scaffoldly GitHub release (latest SemVer) Terraform Version

Description

Write stage config files to a GitHub repository:

  • .scaffoldly/services.json
  • .scaffoldly/env-vars.json
  • .scaffoldly/.env

Usage

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
}

Requirements

Name Version
terraform >= 0.15
github 4.9.4

Providers

Name Version
github 4.9.4

Modules

No modules.

Resources

Name Type
github_repository_file.env resource
github_repository_file.env_vars_json resource
github_repository_file.services_json resource

Inputs

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

Outputs

No outputs.

terraform-github-stage-config-files's People

Contributors

cnuss avatar

Watchers

 avatar  avatar

Forkers

ryanoatz99

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.