diff --git a/.envrc b/.envrc
new file mode 100644
index 0000000..3550a30
--- /dev/null
+++ b/.envrc
@@ -0,0 +1 @@
+use flake
diff --git a/.gitignore b/.gitignore
index 35ced3d..c1a7e17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
# Nix directories
+.direnv
result
# Local .terraform directories
diff --git a/README.md b/README.md
index db0d7b6..5564bfc 100644
--- a/README.md
+++ b/README.md
@@ -6,13 +6,13 @@ Terraform module which creates GitHub team resources.
| Name | Version |
|------|---------|
-| [github](#requirement\_github) | 5.25.1 |
+| [github](#requirement\_github) | 5.37.0 |
## Providers
| Name | Version |
|------|---------|
-| [github](#provider\_github) | 5.25.1 |
+| [github](#provider\_github) | 5.37.0 |
## Modules
@@ -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
@@ -39,5 +39,7 @@ No modules.
| Name | Description |
|------|-------------|
+| [team\_id](#output\_team\_id) | The team id |
+| [team\_node\_id](#output\_team\_node\_id) | The team node id |
| [team\_slug](#output\_team\_slug) | The team slug |
\ No newline at end of file
diff --git a/flake.lock b/flake.lock
index 19db6c2..8638864 100644
--- a/flake.lock
+++ b/flake.lock
@@ -5,11 +5,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
- "lastModified": 1683560683,
- "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=",
+ "lastModified": 1693611461,
+ "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "006c75898cf814ef9497252b022e91c946ba8e17",
+ "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca",
"type": "github"
},
"original": {
@@ -19,11 +19,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1685168767,
- "narHash": "sha256-wQgnxz0PdqbyKKpsWl/RU8T8QhJQcHfeC6lh1xRUTfk=",
+ "lastModified": 1695145219,
+ "narHash": "sha256-Eoe9IHbvmo5wEDeJXKFOpKUwxYJIOxKUesounVccNYk=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "e10802309bf9ae351eb27002c85cfdeb1be3b262",
+ "rev": "5ba549eafcf3e33405e5f66decd1a72356632b96",
"type": "github"
},
"original": {
@@ -36,11 +36,11 @@
"nixpkgs-lib": {
"locked": {
"dir": "lib",
- "lastModified": 1682879489,
- "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=",
+ "lastModified": 1693471703,
+ "narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
+ "rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index aa2befc..7fe705f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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
+ ];
+ };
};
};
- };
};
}
diff --git a/main.tf b/main.tf
index 7c2dca9..2a2a75f 100644
--- a/main.tf
+++ b/main.tf
@@ -2,7 +2,7 @@ terraform {
required_providers {
github = {
source = "integrations/github"
- version = "5.25.1"
+ version = "5.37.0"
}
}
}
diff --git a/outputs.tf b/outputs.tf
index 5edc89a..e47c3b3 100644
--- a/outputs.tf
+++ b/outputs.tf
@@ -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