Skip to content

Commit 354d299

Browse files
committed
Update module wrapper name
1 parent 55c8baa commit 354d299

File tree

15 files changed

+14
-78
lines changed

15 files changed

+14
-78
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ id_rsa.pub
1313
configuration.nix
1414
init.sh
1515
email.txt
16+
TODO.md

mikemcgirr-com-webserver-aws-env/index.html

Lines changed: 0 additions & 76 deletions
This file was deleted.

mikemcgirr-com-webserver-aws-env/locals.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
locals {
22
name_prefix = "mikemcgirr"
33
base_domain = "${local.name_prefix}.com"
4+
hostname = "mikemcgirr"
5+
6+
content_location = "mikemcgirr-com"
7+
# Used to set things like /var/www/${content_location}/_site as the root of the site
48

59
region = "us-west-2"
610

mikemcgirr-com-webserver-aws-env/main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ provider "aws" {
44
}
55

66
module "mikemcgirr-com-server" {
7-
source = "../modules/mikemcgirr-com-webserver-aws-wrapper"
7+
source = "../modules/terraform-aws-nixos-webserver-wrapper"
88

99
name_prefix = local.name_prefix
1010
base_domain = local.base_domain
11+
hostname = local.hostname
12+
13+
content_location = local.content_location
14+
1115
region = local.region
1216

1317
email = var.email

modules/mikemcgirr-com-webserver-aws-wrapper/configuration.tf renamed to modules/terraform-aws-nixos-webserver-wrapper/configuration.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ resource "local_file" "nix_configuration" {
33
content = templatefile("${path.module}/templates/configuration.nix.tpl", {
44
domain = var.base_domain
55
email = var.email
6+
hostname = var.hostname
7+
content_location = var.content_location
68
})
79
filename = "${path.root}/configuration.nix"
810
file_permission = "0600"
911
}
1012

1113
resource "local_file" "init_configuration" {
1214
content = templatefile("${path.module}/templates/init.sh.tpl", {
13-
ip = aws_eip.web_server.public_ip
15+
ip = aws_eip.web_server.public_ip
16+
content_location = var.content_location
1417
})
1518

1619
filename = "${path.root}/init.sh"

0 commit comments

Comments
 (0)