Skip to content

Commit e6cfbe6

Browse files
committed
Fix Terraform examples for newer Nix versions
The examples do work for the Nix version that the book is tested against, but this updates them to also work for newer Nix versions. For more details, see: Gabriella439/terraform-nixos-ng#9
1 parent a9f5fe7 commit e6cfbe6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

manuscript/Terraform.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ module "ami" {
445445
}
446446
447447
module "nixos" {
448-
source = "github.com/Gabriella439/terraform-nixos-ng//nixos?ref=d8563d06cc65bc699ffbf1ab8d692b1343ecd927"
448+
source = "github.com/Gabriella439/terraform-nixos-ng//nixos?ref=af1a0af57287851f957be2b524fcdc008a21d9ae"
449449
host = "root@${aws_instance.todo.public_ip}"
450450
flake = ".#default"
451451
arguments = [ "--build-host", "root@${aws_instance.todo.public_ip}" ]
@@ -467,7 +467,7 @@ let
467467
source = fetchFromGitHub {
468468
owner = "Gabriella439";
469469
repo = "terraform-nixos-ng";
470-
rev = "d8563d06cc65bc699ffbf1ab8d692b1343ecd927";
470+
rev = "af1a0af57287851f957be2b524fcdc008a21d9ae";
471471
hash = …;
472472
};
473473
@@ -503,7 +503,7 @@ The first child module selects the correct NixOS AMI to use:
503503

504504
```hcl
505505
module "ami" {
506-
source = "github.com/Gabriella439/terraform-nixos-ng//ami?ref=d8563d06cc65bc699ffbf1ab8d692b1343ecd927"
506+
source = "github.com/Gabriella439/terraform-nixos-ng//ami?ref=af1a0af57287851f957be2b524fcdc008a21d9ae"
507507
release = "23.05"
508508
region = var.region
509509
system = "x86_64-linux"
@@ -514,7 +514,7 @@ module "ami" {
514514

515515
```hcl
516516
module "nixos" {
517-
source = "github.com/Gabriella439/terraform-nixos-ng//nixos?ref=d8563d06cc65bc699ffbf1ab8d692b1343ecd927"
517+
source = "github.com/Gabriella439/terraform-nixos-ng//nixos?ref=af1a0af57287851f957be2b524fcdc008a21d9ae"
518518
519519
host = "root@${aws_instance.todo.public_ip}"
520520

templates/continuous-deployment/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ resource "aws_key_pair" "nixos-in-production" {
7272
}
7373

7474
module "ami" {
75-
source = "github.com/Gabriella439/terraform-nixos-ng//ami?ref=06d207ebc1c3de68d1bc52129d0fa23d61de5525"
75+
source = "github.com/Gabriella439/terraform-nixos-ng//ami?ref=af1a0af57287851f957be2b524fcdc008a21d9ae"
7676
release = "23.05"
7777
region = var.region
7878
system = "x86_64-linux"
@@ -117,7 +117,7 @@ resource "null_resource" "wait" {
117117
}
118118

119119
module "nixos" {
120-
source = "github.com/Gabriella439/terraform-nixos-ng//nixos?ref=06d207ebc1c3de68d1bc52129d0fa23d61de5525"
120+
source = "github.com/Gabriella439/terraform-nixos-ng//nixos?ref=af1a0af57287851f957be2b524fcdc008a21d9ae"
121121
host = "root@${aws_instance.todo.public_ip}"
122122
flake = ".#default"
123123
arguments = [ "--build-host", "root@${aws_instance.todo.public_ip}" ]

templates/terraform/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ resource "aws_key_pair" "nixos-in-production" {
7272
}
7373

7474
module "ami" {
75-
source = "github.com/Gabriella439/terraform-nixos-ng//ami?ref=06d207ebc1c3de68d1bc52129d0fa23d61de5525"
75+
source = "github.com/Gabriella439/terraform-nixos-ng//ami?ref=af1a0af57287851f957be2b524fcdc008a21d9ae"
7676
release = "23.05"
7777
region = var.region
7878
system = "x86_64-linux"
@@ -117,7 +117,7 @@ resource "null_resource" "wait" {
117117
}
118118

119119
module "nixos" {
120-
source = "github.com/Gabriella439/terraform-nixos-ng//nixos?ref=06d207ebc1c3de68d1bc52129d0fa23d61de5525"
120+
source = "github.com/Gabriella439/terraform-nixos-ng//nixos?ref=af1a0af57287851f957be2b524fcdc008a21d9ae"
121121
host = "root@${aws_instance.todo.public_ip}"
122122
flake = ".#default"
123123
arguments = [ "--build-host", "root@${aws_instance.todo.public_ip}" ]

0 commit comments

Comments
 (0)