add terraform section in documentation

This commit is contained in:
Jörg Thalheim 2023-09-17 16:43:43 +02:00
parent 588f9ab866
commit 6e1a159d20
3 changed files with 26 additions and 0 deletions

View File

@ -19,5 +19,6 @@ Refer to the following documentation for more information.
- [Using your own kexec image](./howtos/custom-kexec.md)
- [Secrets and full disk encryption](./howtos/secrets.md)
- [Use without flakes](./howtos/use-without-flakes.md)
- [Terraform](./howtos/terraform.md)
[Reference](./reference.md): Reference Guide

View File

@ -15,3 +15,5 @@
[Secrets and full disk encryption](./secrets.md)
[Use without flakes](./use-without-flakes.md)
[Terraform](./terraform.md)

23
docs/howtos/terraform.md Normal file
View File

@ -0,0 +1,23 @@
# Terraform
The nixos-anywhere terraform modules allow you to use Terraform for installing
and updating NixOS. It simplifies the deployment process by integrating
nixos-anywhere functionality.
Our terraform module requires the
[null](https://registry.terraform.io/providers/hashicorp/null/latest) and
[external](https://registry.terraform.io/providers/hashicorp/external/latest)
provider.
You can get these by from nixpkgs like this:
```nix
nix-shell -p '(pkgs.terraform.withPlugins (p: [ p.null p.external ]))'
```
You can add this expression the `packages` list in your devshell in flake.nix or
in shell.nix.
Checkout out the
[module reference](https://github.com/numtide/nixos-anywhere/tree/main/terraform)
for examples and module parameter on how to use the modules.