Skip to content

Commit aa2ab70

Browse files
committed
Terraform folder changes to release prod setup to int
1 parent 3f6fba2 commit aa2ab70

20 files changed

+686
-700
lines changed

terraform/configs.tf

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

terraform_old/.terraform.lock.hcl

Lines changed: 72 additions & 90 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

terraform_old/Makefile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
-include .env
22

3-
interactionId=$(environment)
4-
5-
aws_profile = apim-dev
3+
interactionId = $(ENVIRONMENT)# to change to lower case
4+
environment = $(ENVIRONMENT)
5+
aws_profile = $(AWS_PROFILE)#apim-dev # Leave this here for pipeline
66
tf_cmd = AWS_PROFILE=$(aws_profile) terraform
77

88
project_name = immunisation
99
project_short_name = imms
10-
state_bucket = $(project_name)-$(APIGEE_ENVIRONMENT)-terraform-state-files
10+
state_bucket = $(BUCKET_NAME)#$(project_name)-$(APIGEE_ENVIRONMENT)-terraform-state-files
1111
tf_state= -backend-config="bucket=$(state_bucket)"
1212

13-
tf_vars= -var="project_name=$(project_name)" -var="project_short_name=$(project_short_name)"
13+
tf_vars= -var="project_name=$(project_name)" -var="project_short_name=$(project_short_name)" -var="profile=$(aws_profile)" -var="aws_account_name=$(AWS_ACCOUNT)"
1414

1515
.PHONY : lock-provider workspace init plan apply clean destroy output state-list lambda-zip catch-all-zip
1616

@@ -20,10 +20,14 @@ lock-provider:
2020
$(tf_cmd) providers lock -platform=darwin_arm64 -platform=darwin_amd64 -platform=linux_amd64 -platform=windows_amd64
2121

2222
workspace:
23-
$(tf_cmd) workspace new $(environment) || $(tf_cmd) workspace select $(environment) && echo "Switched to workspace/environment: $(environment)"
23+
$(tf_cmd) workspace new $(ENVIRONMENT) || $(tf_cmd) workspace select $(ENVIRONMENT) && echo "Switched to workspace/environment: $(ENVIRONMENT)"
2424

2525
init:
26-
$(tf_cmd) init $(tf_state) -upgrade $(tf_vars)
26+
$(tf_cmd) init $(tf_state) -upgrade $(tf_vars)
27+
28+
29+
init-reconfigure:
30+
$(tf_cmd) init $(tf_state) -upgrade $(tf_vars) -reconfigure
2731

2832
plan: workspace
2933
$(tf_cmd) plan $(tf_vars)
@@ -40,7 +44,7 @@ clean:
4044
destroy: workspace
4145
$(tf_cmd) destroy $(tf_vars) -auto-approve
4246
$(tf_cmd) workspace select default
43-
$(tf_cmd) workspace delete $(environment)
47+
$(tf_cmd) workspace delete $(ENVIRONMENT)
4448

4549
output:
4650
$(tf_cmd) output -raw $(name)

0 commit comments

Comments
 (0)