Skip to content

Commit

Permalink
Merge pull request #30 from mineiros-io/mariux/gh4
Browse files Browse the repository at this point in the history
feat: Add support for github provider 4.x
  • Loading branch information
mariux authored May 2, 2021
2 parents 46baf02 + 68a8baa commit 95fd7fd
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 39 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0]

### Added

- Add support for Github Provider v0.4.x

## [0.3.1]

### Changed
Expand Down Expand Up @@ -84,11 +90,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- markdown-link-check-disable -->

[unreleased]: https://github.com/mineiros-io/terraform-github-team/compare/v0.3.1...HEAD
[0.3.1]: https://github.com/mineiros-io/terraform-github-team/compare/v0.3.0...v0.3.1
[unreleased]: https://github.com/mineiros-io/terraform-github-team/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/mineiros-io/terraform-github-team/compare/v0.3.1...v0.4.0

<!-- markdown-link-check-enable -->

[0.3.1]: https://github.com/mineiros-io/terraform-github-team/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/mineiros-io/terraform-github-team/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/mineiros-io/terraform-github-team/compare/v0.1.3...v0.2.0
[0.1.3]: https://github.com/mineiros-io/terraform-github-team/compare/v0.1.2...v0.1.3
Expand Down
55 changes: 25 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

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.***
**_This module supports Terraform v0.13 as well as v0.12.9 and above
and is compatible with the Terraform Github Provider v4, v3 as well as v2.4 and above._**

- [Features](#features)
- [Getting Started](#getting-started)
Expand All @@ -32,8 +32,8 @@ and is compatible with the Terraform Github Provider v3 as well as v2.4 and abov

## Features

*This module supports Terraform v0.14, 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.*
_This module supports Terraform v0.14, 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._

This module supports the following resources:

Expand All @@ -47,7 +47,7 @@ This module supports the following resources:
```hcl
module "team" {
source = "mineiros-io/team/github"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "DevOps"
description = "The DevOps Team"
Expand Down Expand Up @@ -84,7 +84,7 @@ See [variables.tf] and [examples/] for details and use-cases.

#### Module Configuration

- **`module_depends_on`**: *(Optional `list(any)`)*
- **`module_depends_on`**: _(Optional `list(any)`)_

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

Expand All @@ -94,47 +94,47 @@ See [variables.tf] and [examples/] for details and use-cases.

The name of the team.

- **`push_repositories`**: *(Optional `set(string)`)*
- **`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)`)*
- **`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)`)*
- **`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)`)*
- **`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)`)*
- **`admin_repositories`**: _(Optional `set(string)`)_

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

- **`description`**: *(Optional `string`)*
- **`description`**: _(Optional `string`)_

A description of the team.
Default is `""`.

- **`privacy`**: *(Optional `string`)*
- **`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`)*
- **`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`)*
- **`ldap_dn`**: _(Optional `string`)_

The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise.
Default is `null`.
Expand Down Expand Up @@ -207,31 +207,26 @@ Copyright &copy; 2020 [Mineiros GmbH][homepage]

[homepage]: https://mineiros.io/?ref=terraform-github-team
[[email protected]]: mailto:[email protected]

[badge-build]: https://github.com/mineiros-io/terraform-github-team/workflows/CI/CD%20Pipeline/badge.svg
[badge-semver]: https://img.shields.io/github/v/tag/mineiros-io/terraform-github-team.svg?label=latest&sort=semver
[badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg
[badge-terraform]: https://img.shields.io/badge/terraform-0.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform
[badge-slack]: https://img.shields.io/badge/[email protected]?logo=slack
[build-status]: https://github.com/mineiros-io/terraform-github-team/actions
[releases-github]: https://github.com/mineiros-io/terraform-github-team/releases

[releases-terraform]: https://github.com/hashicorp/terraform/releases

[badge-tf-gh]: https://img.shields.io/badge/GH-3%20and%202.4+-F8991D.svg?logo=terraform
[badge-tf-gh]: https://img.shields.io/badge/GH-4%20|%203%20|%202.4+-F8991D.svg?logo=terraform
[releases-github-provider]: https://github.com/terraform-providers/terraform-provider-github/releases

[apache20]: https://opensource.org/licenses/Apache-2.0
[slack]: https://join.slack.com/t/mineiros-community/shared_invite/zt-ehidestg-aLGoIENLVs6tvwJ11w9WGg
[Terraform]: https://www.terraform.io
[AWS]: https://aws.amazon.com/
[Semantic Versioning (SemVer)]: https://semver.org/

[terraform]: https://www.terraform.io
[aws]: https://aws.amazon.com/
[semantic versioning (semver)]: https://semver.org/
[variables.tf]: https://github.com/mineiros-io/terraform-github-team/blob/master/variables.tf
[examples/]: https://github.com/mineiros-io/terraform-github-team/tree/master/examples
[Issues]: https://github.com/mineiros-io/terraform-github-team/issues
[LICENSE]: https://github.com/mineiros-io/terraform-github-team/blob/master/LICENSE
[Makefile]: https://github.com/mineiros-io/terraform-github-team/blob/master/Makefile
[Pull Requests]: https://github.com/mineiros-io/terraform-github-team/pulls
[Contribution Guidelines]: https://github.com/mineiros-io/terraform-github-team/blob/master/CONTRIBUTING.md
[Github teams]: https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/organizing-members-into-teams
[issues]: https://github.com/mineiros-io/terraform-github-team/issues
[license]: https://github.com/mineiros-io/terraform-github-team/blob/master/LICENSE
[makefile]: https://github.com/mineiros-io/terraform-github-team/blob/master/Makefile
[pull requests]: https://github.com/mineiros-io/terraform-github-team/pulls
[contribution guidelines]: https://github.com/mineiros-io/terraform-github-team/blob/master/CONTRIBUTING.md
[github teams]: https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/organizing-members-into-teams
9 changes: 5 additions & 4 deletions examples/github-team/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and push permissions to the other.
```hcl
module "team" {
source = "mineiros-io/team/github"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "Engineering"
description = "This team is created with terraform to test the terraformn-github-repository module."
Expand All @@ -39,7 +39,7 @@ module "team" {
module "child_team" {
source = "mineiros-io/team/github"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "DevOps"
parent_team_id = module.team.id
Expand Down Expand Up @@ -76,14 +76,15 @@ Run `terraform destroy` to destroy all resources again.
<!-- References -->

<!-- markdown-link-check-disable -->

[main.tf]: https://github.com/mineiros-io/terraform-github-team/blob/master/examples/github-team/main.tf

<!-- markdown-link-check-enable -->
[homepage]: https://mineiros.io/?ref=terraform-github-team

[homepage]: https://mineiros.io/?ref=terraform-github-team
[badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg
[badge-terraform]: https://img.shields.io/badge/terraform-0.13%20and%200.12.20+-623CE4.svg?logo=terraform
[badge-slack]: https://img.shields.io/badge/[email protected]?logo=slack

[releases-terraform]: https://github.com/hashicorp/terraform/releases
[apache20]: https://opensource.org/licenses/Apache-2.0
[slack]: https://join.slack.com/t/mineiros-community/shared_invite/zt-ehidestg-aLGoIENLVs6tvwJ11w9WGg
4 changes: 2 additions & 2 deletions examples/github-team/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ resource "github_repository" "another_repository" {

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

name = "Engineering"
description = "This team is created with terraform to test the terraformn-github-repository module."
Expand All @@ -59,7 +59,7 @@ module "team" {

module "child_team" {
source = "mineiros-io/team/github"
version = "~> 0.3.0"
version = "~> 0.4.0"

name = "DevOps"
parent_team_id = module.team.id
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ terraform {
required_version = ">= 0.12.20, < 0.15"

required_providers {
github = ">= 2.4, < 4.0"
github = ">= 2.4, < 5.0"
}
}

0 comments on commit 95fd7fd

Please sign in to comment.