-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align README.md and variables.tf with latest standard
- Loading branch information
1 parent
7f01df1
commit 8ab1bef
Showing
15 changed files
with
225 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[<img src="https://raw.githubusercontent.com/mineiros-io/brand/3bffd30e8bdbbde32c143e2650b2faa55f1df3ea/mineiros-primary-logo.svg" width="400"/>][homepage] | ||
|
||
[![GitHub tag (latest SemVer)][badge-semver]][releases-github] | ||
[![license][badge-license]][apache20] | ||
[![Terraform Version][badge-terraform]][releases-terraform] | ||
[![Join Slack][badge-slack]][slack] | ||
|
||
# Examples for using this Mineiros module | ||
|
||
- [github-team/] Create a team with two repositories with different permissions. | ||
|
||
<!-- References --> | ||
|
||
<!-- markdown-link-check-disable --> | ||
[github-team/]: https://github.com/mineiros-io/terraform-github-team/blob/master/examples/github-team | ||
<!-- markdown-link-check-enable --> | ||
|
||
[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 | ||
[badge-semver]: https://img.shields.io/github/v/tag/mineiros-io/terraform-github-team.svg?label=latest&sort=semver | ||
|
||
[releases-github]: https://github.com/mineiros-io/terraform-github-team/releases | ||
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
[<img src="https://raw.githubusercontent.com/mineiros-io/brand/3bffd30e8bdbbde32c143e2650b2faa55f1df3ea/mineiros-primary-logo.svg" width="400"/>][homepage] | ||
|
||
[![license][badge-license]][apache20] | ||
[![Terraform Version][badge-terraform]][releases-terraform] | ||
[![Join Slack][badge-slack]][slack] | ||
|
||
# Create a team which has access to two newly created repositories | ||
|
||
This example shows how to create a team and two repositories. | ||
The team will have pull permissions for one repository and push permissions | ||
for the other. We also add lists of members and maintainers to the team. | ||
|
||
## Basic usage | ||
|
||
The code in [main.tf] defines two public GitHub repository and two nested | ||
GitHub teams. The team will be granted pull permissions to the one repository | ||
and push permissions to the other. | ||
|
||
```hcl | ||
module "team" { | ||
source = "mineiros-io/team/github" | ||
version = "0.1.3" | ||
name = "Engineering" | ||
description = "This team is created with terraform to test the terraformn-github-repository module." | ||
privacy = "closed" | ||
members = ["alice"] | ||
maintainers = ["bob"] | ||
pull_repositories = [ | ||
github_repository.repository.name, | ||
] | ||
push_repositories = [ | ||
github_repository.another_repository.name, | ||
] | ||
} | ||
module "child_team" { | ||
source = "mineiros-io/team/github" | ||
version = "0.1.3" | ||
name = "DevOps" | ||
parent_team_id = module.team.id | ||
privacy = "closed" | ||
} | ||
``` | ||
|
||
## Running the example | ||
|
||
### Cloning the repository | ||
|
||
```bash | ||
git clone https://github.com/mineiros-io/terraform-github-team.git | ||
cd terraform-github-team/examples/github-team | ||
``` | ||
|
||
### Initializing Terraform | ||
|
||
Run `terraform init` to initialize the example and download providers and the module. | ||
|
||
### Planning the example | ||
|
||
Run `terraform plan` to see a plan of the changes. | ||
|
||
### Applying the example | ||
|
||
Run `terraform apply` to create the resources. | ||
You will see a plan of the changes and Terraform will prompt you for approval to actually apply the changes. | ||
|
||
### Destroying the example | ||
|
||
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 | ||
|
||
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# CREATE A TEAM AND TWO REPOSITORIES | ||
# | ||
# We create a team and two repositories. The team will have pull permissions for one repository and push permissions | ||
# for the other. We also add lists of members and maintainers to the team. | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# ENVIRONMENT VARIABLES: | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# You can provide your credentials via the | ||
# AWS_ACCESS_KEY_ID and | ||
# AWS_SECRET_ACCESS_KEY, environment variables, | ||
# representing your AWS Access Key and AWS Secret Key, respectively. | ||
# Note that setting your AWS credentials using either these (or legacy) | ||
# environment variables will override the use of | ||
# AWS_SHARED_CREDENTIALS_FILE and | ||
# AWS_PROFILE. | ||
# The | ||
# AWS_DEFAULT_REGION and | ||
# AWS_SESSION_TOKEN environment variables are also used, if applicable. | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# Provider Setup | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
provider "aws" { | ||
version = "~> 2.0" | ||
region = "eu-west-1" | ||
} | ||
|
||
|
||
resource "github_repository" "repository" { | ||
name = "engineering-tools" | ||
} | ||
|
||
resource "github_repository" "another_repository" { | ||
name = "devops-tools" | ||
} | ||
|
||
module "team" { | ||
source = "mineiros-io/team/github" | ||
version = "0.1.3" | ||
|
||
name = "Engineering" | ||
description = "This team is created with terraform to test the terraformn-github-repository module." | ||
privacy = "closed" | ||
|
||
members = ["alice"] | ||
maintainers = ["bob"] | ||
|
||
pull_repositories = [ | ||
github_repository.repository.name, | ||
] | ||
|
||
push_repositories = [ | ||
github_repository.another_repository.name, | ||
] | ||
} | ||
|
||
module "child_team" { | ||
source = "mineiros-io/team/github" | ||
version = "0.1.3" | ||
|
||
name = "DevOps" | ||
parent_team_id = module.team.id | ||
privacy = "closed" | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.