terraform: pin terraform and providers in separate flake

This commit is contained in:
zowoq 2023-02-05 10:33:16 +10:00
parent 0d958270b6
commit f09e14935b
4 changed files with 53 additions and 11 deletions

27
terraform/flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1676795730,
"narHash": "sha256-X69A9BdcPTySJJ7DqS4wc8b6eqGKi32jCSyaBsz4WB0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "efc59894b1ba73cb745676616c56c780383d6788",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

24
terraform/flake.nix Normal file
View file

@ -0,0 +1,24 @@
{
description = "terraform devshell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
outputs = { nixpkgs, self }: {
devShells = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]
(system: {
default = with nixpkgs.legacyPackages.${system}; mkShellNoCC {
packages = [
(terraform.withPlugins (p: [
p.cloudflare
p.external
p.gandi
p.hydra
p.null
p.sops
p.tfe
]))
];
};
});
};
}