Skip to content

Commit 4b3f8c8

Browse files
committed
review2
1 parent f834fd0 commit 4b3f8c8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

azure/azure-pr-teardown-pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
vmImage: 'ubuntu-latest'
2424
steps:
2525
- checkout: self
26-
path: s/$(SERVICE_NAME)
2726

2827
- bash: |
2928
echo $(action_pr_number)
@@ -46,9 +45,10 @@ jobs:
4645
4746
- bash: |
4847
export AWS_PROFILE=apim-dev
48+
ls
4949
5050
cd terraform
51-
make init environment="dev" sub_environment="$WORKSPACE"
51+
make init environment="dev" sub_environment="$WORKSPACE" bucket_name="immunisation-internal-dev-terraform-state-files"
5252
make workspace sub_environment="$WORKSPACE"
5353
5454
# Extract values from Terraform state before destroying
@@ -80,6 +80,6 @@ jobs:
8080
8181
cd terraform
8282
make workspace sub_environment="$SUB_ENVIRONMENT"
83-
make destroy environment="dev" sub_environment="$WORKSPACE"
83+
make plan environment="dev" sub_environment="$WORKSPACE" bucket_name="immunisation-internal-dev-terraform-state-files"
8484
displayName: Destroy terraform PR workspace and linked resources
8585
retryCountOnTaskFailure: 2

terraform/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ sub_environment_dir := $(if $(findstring pr-,$(sub_environment)),pr,$(sub_enviro
66

77
tf_cmd = AWS_PROFILE=$(AWS_PROFILE) terraform
88

9-
is_pr := $(findstring pr-,$(sub_environment))
10-
bucket_name = $(if $(is_pr),immunisation-internal-dev,immunisation-$(environment))-terraform-state-files
9+
10+
bucket_name ?= $(if $(filter dev,$(environment)),immunisation-$(sub_environment),immunisation-$(environment))-terraform-state-files
1111

1212
tf_state = -backend-config="bucket=$(bucket_name)"
1313

0 commit comments

Comments
 (0)