Skip to content

Commit

Permalink
chore(build): update to latest files (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikreinert committed May 29, 2023
1 parent ce135e3 commit 3345954
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 36 deletions.
6 changes: 6 additions & 0 deletions .terraformignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
.github
.gitignore
flake.lock
flake.nix
makefile
6 changes: 3 additions & 3 deletions flake.lock

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

44 changes: 11 additions & 33 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,20 @@
systems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
packages = {
default = pkgs.stdenv.mkDerivation {
doCheck = true;
name = "terraform-tfe-team";
src = ./.;
version = "0.1.0";

buildInputs = with pkgs; [
terraform-docs
];
terraform-with-plugins = pkgs.terraform.withPlugins (ps: with ps; [
tfe
]);

configurePhase = ''
${pkgs.terraform}/bin/terraform init \
-plugin-dir "${self'.packages.terraform-provider-tfe}/libexec/terraform-providers"
'';

checkPhase = ''
${pkgs.terraform}/bin/terraform validate
'';

installPhase = ''
mkdir -p $out
cp README.md $out/.
cp -R *.tf $out/.
'';
};
default = pkgs.runCommand "default" {
src = ./.;
} ''
mkdir -p $out
cp -R $src/*.tf $out
terraform-provider-tfe = pkgs.terraform-providers.mkProvider {
hash = "sha256-aDM6lTxESm9OFAE/p9SbuBe6Uaydprfw0/MxJitLnwY=";
homepage = "https://registry.terraform.io/providers/hashicorp/tfe";
owner = "hashicorp";
repo = "terraform-provider-tfe";
rev = "v0.45.0";
spdx = "MPL-2.0";
vendorHash = "sha256-CWQDFMvx8vMyeiMcMciZbnYpd56h4nA0ysJqNzEtSUo=";
${config.packages.terraform-with-plugins}/bin/terraform -chdir="$out" init
${config.packages.terraform-with-plugins}/bin/terraform -chdir="$out" validate
'';
};
};

devShells = {
default = pkgs.mkShell {
Expand Down

0 comments on commit 3345954

Please sign in to comment.