From f9c2fa0d2dead2d11b0dc1ff306bbc998007bdbb Mon Sep 17 00:00:00 2001 From: Piasecki-grid Date: Fri, 28 Mar 2025 10:31:35 +0100 Subject: [PATCH] Setting up test infrastructure pipeline v7 --- .github/workflows/setup-infra-pipeline.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/setup-infra-pipeline.yml b/.github/workflows/setup-infra-pipeline.yml index e36754379..223ddc7aa 100644 --- a/.github/workflows/setup-infra-pipeline.yml +++ b/.github/workflows/setup-infra-pipeline.yml @@ -36,6 +36,26 @@ jobs: cd cicd git clone https://x-access-token:${{ secrets.INFRA_GITHUB_TOKEN }}@github.com/Piasecki-grid/grid-capstone-terraform-infra.git + + - name: Create resources for remote backend + run: | + az group create --name tfstate-rg --location eastus + + az storage account create \ + --name tfstatestorageaccount \ + --resource-group tfstate-rg \ + --location eastus \ + --sku Standard_LRS \ + --kind StorageV2 + + az storage container create \ + --name tfstate \ + --account-name tfstatestorageaccount + + az ad sp create-for-rbac \ + --name "terraform-github-actions" \ + --role Contributor \ + --scopes /subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }} - name: Terraform Init run: |