Skip to content

Commit

Permalink
feat(iac): iac update
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhi Markan committed Nov 9, 2023
1 parent 0eb9b34 commit 0f4a6ab
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ jobs:
WEBSITES_PORT='${{ vars.API_PORT }}' \
TLS_CERTIFICATE='${{ secrets.TLS_CERTIFICATE }}' \
TLS_KEY='${{ secrets.TLS_KEY }}' \
DATABASE_URL='${{ secrets.DATABASE_URL }}' \
API_KEY='${{ secrets.API_KEY }}' \
APIM_MDM_URL='${{ secrets.APIM_MDM_URL }}' \
APIM_MDM_KEY='${{ secrets.APIM_MDM_KEY }}' \
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,34 @@ jobs:
--name vnet-peer-apim-${{ env.TARGET }}-${{ env.PRODUCT }}-${{ vars.VERSION }} \
--query peeringState)"
- name: VNET Peer - UKS 🔀
uses: Azure/[email protected]
with:
inlineScript: |
# UKS VNET peering
# Local VNET peer
az network vnet peering create \
--name vnet-peer-uks-${{ env.TARGET }}-${{ env.PRODUCT }}-${{ vars.VERSION }} \
--vnet-name vnet-${{ env.PRODUCT }}-${{ env.TARGET }}-${{ vars.VERSION }} \
--remote-vnet $(az network vnet show --subscription ${{ secrets.REMOTE_VNET_SUBSCRIPTION_UKS }} --resource-group ${{ secrets.REMOTE_VNET_RESOURCE_GROUP_UKS }} --name ${{ secrets.REMOTE_VNET_NAME_UKS }} --query 'id' -o tsv) \
--allow-vnet-access 1
# Remote VNET peer
az network vnet peering create \
--name vnet-peer-uks-${{ env.TARGET }}-${{ env.PRODUCT }}-${{ vars.VERSION }} \
--vnet-name ${{ secrets.REMOTE_VNET_NAME_UKS }} \
--remote-vnet $(az network vnet show --name vnet-${{ env.PRODUCT }}-${{ env.TARGET }}-${{ vars.VERSION }} --query 'id' -o tsv) \
--allow-vnet-access 1 \
--subscription ${{ secrets.REMOTE_VNET_SUBSCRIPTION_UKS }} \
--resource-group ${{ secrets.REMOTE_VNET_RESOURCE_GROUP_UKS }}
# Fetch peering state
echo "Peering state: $(az network vnet peering show \
--vnet-name vnet-${{ env.PRODUCT }}-${{ env.TARGET }}-${{ vars.VERSION }} \
--name vnet-peer-uks-${{ env.TARGET }}-${{ env.PRODUCT }}-${{ vars.VERSION }} \
--query peeringState)"
- name: Database 💾
uses: Azure/[email protected]
with:
Expand Down Expand Up @@ -562,7 +590,7 @@ jobs:
- name: Variables ✨
run: |
echo "API_URL=$(az webapp show --name app-${{ env.PRODUCT }}-api-${{ env.TARGET }}-${{ vars.VERSION }} --query defaultHostName -o tsv)" >> $GITHUB_ENV
echo "MYSQL_URL=$(az mysql flexible-server list --query [].fullyQualifiedDomainName -o tsv)" >> $GITHUB_ENV
echo "MYSQL_URL=$(az network private-dns zone list --query ['?contains(name, `sql`)'].name -o tsv)" >> $GITHUB_ENV
- name: Setting 🧱
uses: Azure/[email protected]
Expand Down

0 comments on commit 0f4a6ab

Please sign in to comment.