Skip to content

Commit

Permalink
Update provider (#4)
Browse files Browse the repository at this point in the history
* feat(main): update provider to 5.37.0

* chore(README)
  • Loading branch information
erikreinert committed Sep 21, 2023
1 parent 18ade37 commit 9ecf5be
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 37 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Nix directories
.direnv
result

# Local .terraform directories
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Terraform module which creates GitHub team resources.

| Name | Version |
|------|---------|
| <a name="requirement_github"></a> [github](#requirement\_github) | 5.25.1 |
| <a name="requirement_github"></a> [github](#requirement\_github) | 5.37.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_github"></a> [github](#provider\_github) | 5.25.1 |
| <a name="provider_github"></a> [github](#provider\_github) | 5.37.0 |

## Modules

Expand All @@ -22,8 +22,8 @@ No modules.

| Name | Type |
|------|------|
| [github_team.self](https://registry.terraform.io/providers/integrations/github/5.25.1/docs/resources/team) | resource |
| [github_team_membership.self](https://registry.terraform.io/providers/integrations/github/5.25.1/docs/resources/team_membership) | resource |
| [github_team.self](https://registry.terraform.io/providers/integrations/github/5.37.0/docs/resources/team) | resource |
| [github_team_membership.self](https://registry.terraform.io/providers/integrations/github/5.37.0/docs/resources/team_membership) | resource |

## Inputs

Expand All @@ -39,5 +39,7 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_team_id"></a> [team\_id](#output\_team\_id) | The team id |
| <a name="output_team_node_id"></a> [team\_node\_id](#output\_team\_node\_id) | The team node id |
| <a name="output_team_slug"></a> [team\_slug](#output\_team\_slug) | The team slug |
<!-- END_TF_DOCS -->
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 33 additions & 23 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,48 @@
{
description = "terraform-github-team";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
packages = {
terraform-with-plugins = pkgs.terraform.withPlugins (ps: with ps; [
github
]);
perSystem = { config, self', inputs', pkgs, system, ... }:
let
terraform-github = pkgs.terraform-providers.mkProvider {
homepage = "https://registry.terraform.io/providers/integrations/github";
owner = "integrations";
repo = "terraform-provider-github";
rev = "v5.37.0";
hash = "sha256-E53MbDM9ufQD0AnlIkdmNRcAlkGj+IACTwMPDUyNkqQ=";
vendorHash = null;
};
in
{
packages = {
terraform-with-plugins = pkgs.terraform.withPlugins (ps: [
terraform-github
]);

default = pkgs.runCommand "default" {
src = ./.;
} ''
mkdir -p $out
cp -R $src/*.tf $out
default = pkgs.runCommand "default"
{
src = ./.;
} ''
mkdir -p $out
cp -R $src/*.tf $out
${config.packages.terraform-with-plugins}/bin/terraform -chdir="$out" init
${config.packages.terraform-with-plugins}/bin/terraform -chdir="$out" validate
'';
${config.packages.terraform-with-plugins}/bin/terraform -chdir="$out" init
${config.packages.terraform-with-plugins}/bin/terraform -chdir="$out" validate
'';
};

devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
terraform
terraform-docs
];
devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
terraform
terraform-docs
];
};
};
};
};
};
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
github = {
source = "integrations/github"
version = "5.25.1"
version = "5.37.0"
}
}
}
10 changes: 10 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
output "team_id" {
description = "The team id"
value = github_team.self.id
}

output "team_node_id" {
description = "The team node id"
value = github_team.self.node_id
}

output "team_slug" {
description = "The team slug"
value = github_team.self.slug
Expand Down

0 comments on commit 9ecf5be

Please sign in to comment.