From a379fc3cbab5aa1e0c08423ea3904e71335787f4 Mon Sep 17 00:00:00 2001 From: Mike Monteith Date: Tue, 25 May 2021 16:19:24 +0100 Subject: [PATCH] Add devops pipeline for terraform state creation --- terraform-state-pipeline.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 terraform-state-pipeline.yaml diff --git a/terraform-state-pipeline.yaml b/terraform-state-pipeline.yaml new file mode 100644 index 0000000..d0c18cb --- /dev/null +++ b/terraform-state-pipeline.yaml @@ -0,0 +1,27 @@ +# Only allow this pipeline to be run manually +trigger: none + +pool: + vmImage: ubuntu-latest + +parameters: +- name: env + displayName: Environment (dev, stag, prod, etc.) + type: string +- name: region + displayName: Region (uks, ukw, etc.) + type: string + +steps: + +- task: AzureCLI@2 + inputs: + azureSubscription: 'nhsuk-user-feedback-${{ parameters.env }}' + scriptType: 'bash' + scriptLocation: 'inlineScript' + inlineScript: | + ./scripts/create_terraform_state.sh \ + --env=${{ parameters.env }} \ + --region=${{ parameters.region }} + displayName: 'Create terraform state resources' +