Skip to content

Commit cb4f1c5

Browse files
authored
Merge pull request #141 from NHSDigital/feature/eja-eli-287-adding-tfbackend-files-for-all-preprod-envs
eli-287 adding tfbackend files for preprod envs
2 parents 7743c14 + c1f8d23 commit cb4f1c5

File tree

12 files changed

+45
-3
lines changed

12 files changed

+45
-3
lines changed

infrastructure/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ terraform-workspace-delete: guard-env guard-stack
3535

3636
# Runs a specified Terraform command (e.g., plan, apply) for the stack and environment.
3737
terraform: guard-env guard-stack guard-tf-command terraform-init terraform-workspace
38-
terraform -chdir=./stacks/$(stack) $(tf-command) $(args) \
38+
terraform -chdir=./stacks/$(stack) $(tf-command) $(args) -var="environment=$(env)" \
3939
$(if $(filter init,$(tf-command)),,--parallelism=30) \
4040
$(if $(filter apply,$(tf-command)),-auto-approve)
4141
rm -f ./terraform_outputs_$(stack).json || true
@@ -53,4 +53,4 @@ bootstrap-terraform-init: guard-env
5353

5454
# Runs a specified Terraform command (e.g., plan, apply) for the bootstrap stack.
5555
bootstrap-terraform: guard-env guard-tf-command bootstrap-terraform-init
56-
terraform -chdir=./stacks/bootstrap $(tf-command) $(args)
56+
terraform -chdir=./stacks/bootstrap $(tf-command) $(args) -var="environment=$(env)"

infrastructure/stacks/_shared/default_variables.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ variable "project_name" {
55
}
66

77
variable "environment" {
8-
default = "dev"
98
description = "Environment"
109
type = string
1110
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bucket = "eligibility-signposting-api-preprod-tfstate"
2+
key = "tfstate/api-layer.tfstate"
3+
region = "eu-west-2"
4+
encrypt = true
5+
use_lockfile = true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bucket = "eligibility-signposting-api-prod-tfstate"
2+
key = "tfstate/api-layer.tfstate"
3+
region = "eu-west-2"
4+
encrypt = true
5+
use_lockfile = true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bucket = "eligibility-signposting-api-test-tfstate"
2+
key = "tfstate/api-layer.tfstate"
3+
region = "eu-west-2"
4+
encrypt = true
5+
use_lockfile = true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bucket = "eligibility-signposting-api-preprod-tfstate"
2+
key = "terraform.tfstate"
3+
region = "eu-west-2"
4+
encrypt = true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bucket = "eligibility-signposting-api-prod-tfstate"
2+
key = "terraform.tfstate"
3+
region = "eu-west-2"
4+
encrypt = true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bucket = "eligibility-signposting-api-test-tfstate"
2+
key = "terraform.tfstate"
3+
region = "eu-west-2"
4+
encrypt = true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bucket = "eligibility-signposting-api-prod-tfstate"
2+
key = "iams-roles.tfstate"
3+
region = "eu-west-2"
4+
encrypt = true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bucket = "eligibility-signposting-api-preprod-tfstate"
2+
key = "networking.tfstate"
3+
region = "eu-west-2"
4+
encrypt = true

0 commit comments

Comments
 (0)