Skip to content

vsco/terraform-github-team

 
 

Repository files navigation

Build Status GitHub tag (latest SemVer) Terraform Version Github Provider Version Join Slack

terraform-github-team

A Terraform module that offers a more convenient and tested way to provision and manage GitHub teams.

This module supports Terraform v0.13 as well as v0.12.9 and above and is compatible with the Terraform Github Provider v3 as well as v2.4 and above.

Features

This module uses the Terraform GitHub provider v2.4 that supports the following resources:

  • Team
  • Nested Team
  • Memberships
  • Team Repositories

Getting Started

module "team" {
  source  = "mineiros-io/team/github"
  version = "~> 0.2.0"

  name        = "DevOps"
  description = "The DevOps Team"
  privacy     = "secret"

  members = [
    "a-user",
    "b-user"
  ]

  maintainers = [
    "a-maintainer"
  ]

  push_repositories = [
    github_repository.repository.name,
  ]
}

resource "github_repository" "repository" {
  name   = "a-repository"
}

Examples

For a complete example please see examples/ directory.

Module Argument Reference

See variables.tf and examples/ for details and use-cases.

Top-level Arguments

Module Configuration

  • module_depends_on: (Optional list(any))

    A list of dependencies. Any object can be assigned to this list to define a hidden external dependency.

Main Resource Configuration

  • name: (Required string)

    The name of the team.

  • push_repositories: (Optional set(string))

    A list of repository names the current team should get push (read-write) permission to. Default is [].

  • pull_repositories: (Optional set(string))

    A list of repository names the current team should get pull (read-only) permission to. Default is [].

  • maintainers: (Optional set(string))

    A list of users that will be added to the current team with maintainer permissions. Default is [].

  • members: (Optional set(string))

    A list of users that will be added to the current team with member permissions. Default is [].

  • admin_repositories: (Optional set(string))

    A list of repository names the current team should get admin (full) permission to. Default is [].

  • description: (Optional string)

    A description of the team. Default is "".

  • privacy: (Optional string)

    The level of privacy for the team. Must be one of secret or closed. Default is "secret".

  • parent_team_id: (Optional number)

    The ID of the parent team, if this is a nested team. Default is to create a root team without a parent.

  • ldap_dn: (Optional string)

    The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise. Default is null.

Module Attributes Reference

The following attributes are exported by the module:

  • module_depends_on

    A list of external resources the module depends_on.

External Documentation

Module Versioning

This Module follows the principles of Semantic Versioning (SemVer).

Given a version number MAJOR.MINOR.PATCH, we increment the:

  1. MAJOR version when we make incompatible changes,
  2. MINOR version when we add functionality in a backwards compatible manner, and
  3. PATCH version when we make backwards compatible bug fixes.

Backwards compatibility in 0.0.z and 0.y.z version

  • Backwards compatibility in versions 0.0.z is not guaranteed when z is increased. (Initial development)
  • Backwards compatibility in versions 0.y.z is not guaranteed when y is increased. (Pre-release)

About Mineiros

Mineiros is a DevOps as a Service company based in Berlin, Germany. We offer commercial support for all of our projects and encourage you to reach out if you have any questions or need help. Feel free to send us an email at hello@mineiros.io or join our Community Slack channel.

We can also help you with:

  • Terraform modules for all types of infrastructure such as VPCs, Docker clusters, databases, logging and monitoring, CI, etc.
  • Consulting & training on AWS, Terraform and DevOps

Reporting Issues

We use GitHub Issues to track community reported issues and missing features.

Contributing

Contributions are encouraged and welcome! For the process of accepting changes, we use Pull Requests. If you'd like more information, please see our Contribution Guidelines.

Makefile Targets

This repository comes with a handy Makefile. Run make help to see details on each available target.

License

license

This module is licensed under the Apache License Version 2.0, January 2004. Please see LICENSE for full details.

Copyright © 2020 Mineiros GmbH

Packages

No packages published

Languages

  • HCL 72.9%
  • Makefile 16.9%
  • Go 10.2%