Skip to content

Commit 6606deb

Browse files
committed
terraform workspaces2
1 parent 8e4d10f commit 6606deb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

azure/azure-pr-teardown-pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
make init
5656
5757
# Extract values from Terraform state before destroying
58-
AWS_SQS_QUEUE_NAME=$(make -s output name=aws_sqs_queue_name)
59-
echo "##vso[task.setvariable variable=AWS_SQS_QUEUE_NAME]$AWS_SQS_QUEUE_NAME"
58+
ID_SYNC_QUEUE_ARN=$(make -s output name=id_sync_queue_arn)
59+
echo "##vso[task.setvariable variable=ID_SYNC_QUEUE_ARN]$ID_SYNC_QUEUE_ARN"
6060
displayName: "Init Terraform and extract MNS values"
6161
6262
- bash: |
@@ -83,7 +83,7 @@ jobs:
8383
export ENVIRONMENT="dev"
8484
export SUB_ENVIRONMENT="$WORKSPACE"
8585
86-
terraform workspace select "$SUB_ENVIRONMENT"
86+
terraform workspace new "$SUB_ENVIRONMENT" || terraform workspace select "$SUB_ENVIRONMENT"
8787
make destroy aws_account_no=${account_id} environment="$ENVIRONMENT" sub_environment="$SUB_ENVIRONMENT"
8888
displayName: Destroy terraform PR workspace and linked resources
8989
retryCountOnTaskFailure: 2

0 commit comments

Comments
 (0)