Skip to content

Commit 9d2d1a0

Browse files
authored
Fixes for reference-architectures (#68)
* Add missing makefile * Make SMTP credentials optional * use simpler makefile pattern * Standardize interface to be compatible with other modules * remove debug typo
1 parent 0c8f73e commit 9d2d1a0

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

aws/organization/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
init:
2+
init-terraform
3+
4+
%:
5+
terraform $@
6+
7+
clean:
8+
rm -rf .terraform

aws/tfstate-backend/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
## Initialize the configuration (should only be run once)
1+
## Initialize the terraform state backend
22
init:
3-
@scripts/$@.sh
3+
@aws s3 ls s3://${TF_BUCKET}/tfstate-backend/terraform.tfstate > /dev/null || \
4+
scripts/$@.sh
5+
@[ -d .terraform ] || init-terraform
46

57
## Destroy the configuration (only works if `force_destroy=true`)
68
destroy:
@@ -9,3 +11,7 @@ destroy:
911
## Force destroy the bucket (not recommended!)
1012
force-destroy:
1113
@scripts/$@.sh
14+
15+
## Pass target through to terraform
16+
%:
17+
terraform $@

aws/users/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
init:
22
init-terraform
33

4-
plan:
5-
terraform $@
6-
7-
apply:
4+
%:
85
terraform $@
96

107
clean:

aws/users/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,19 @@ variable "name" {
1919
variable "smtp_username" {
2020
description = "Username to authenticate with the SMTP server"
2121
type = "string"
22+
default = ""
2223
}
2324

2425
variable "smtp_password" {
2526
description = "Password to authenticate with the SMTP server"
2627
type = "string"
28+
default = ""
2729
}
2830

2931
variable "smtp_host" {
3032
description = "SMTP Host"
3133
default = "smtp.mailgun.org"
34+
default = ""
3235
}
3336

3437
variable "smtp_port" {

0 commit comments

Comments
 (0)