Skip to content

Commit

Permalink
Merge pull request #1453 from equinor/fix-lock-resource-action
Browse files Browse the repository at this point in the history
Fix lock resource action
  • Loading branch information
nilsgstrabo authored Sep 18, 2024
2 parents 755c588 + 19657cc commit d069113
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/lock-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
- name: Add GitHub IP to KeyVault in Prod
id: update_prod_firewall
run: |
az keyvault network-rule add --name "radix-vault-prod" \
--resource-group "common" \
az keyvault network-rule add --name "radix-keyv-platform" \
--resource-group "common-platform" \
--ip-address ${{ steps.github_public_ip.outputs.ipv4 }} >/dev/null
- name: Add GitHub IP to KeyVault in C2
id: update_c2_firewall
run: |
az keyvault network-rule add --name "radix-vault-c2-prod" \
--resource-group "common-westeurope" \
az keyvault network-rule add --name "radix-keyv-c2" \
--resource-group "common-c2" \
--ip-address ${{ steps.github_public_ip.outputs.ipv4 }} >/dev/null
- name: lock-resources-prod
run: RADIX_ZONE_ENV=./scripts/radix-zone/radix_zone_prod.env .github/workflows/scripts/check_resource_lock.sh
Expand All @@ -48,12 +48,12 @@ jobs:
- name: Revoke GitHub IP on KeyVault in Prod
if: ${{ steps.update_prod_firewall.outcome == 'success' && !cancelled()}} # Always run this step even if previous step failed
run: |
az keyvault network-rule remove --name "radix-vault-prod" \
--resource-group "common" \
az keyvault network-rule remove --name "radix-keyv-platform" \
--resource-group "common-platform" \
--ip-address ${{ steps.github_public_ip.outputs.ipv4 }} >/dev/null
- name: Revoke GitHub IP on KeyVault in C2
if: ${{ steps.update_c2_firewall.outcome == 'success' && !cancelled()}} # Always run this step even if previous step failed
run: |
az keyvault network-rule remove --name "radix-vault-c2-prod" \
--resource-group "common-westeurope" \
az keyvault network-rule remove --name "radix-keyv-c2" \
--resource-group "common-c2" \
--ip-address ${{ steps.github_public_ip.outputs.ipv4 }} >/dev/null
6 changes: 5 additions & 1 deletion scripts/cicd-canary/update_auth_secret.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
### HOW TO USE
###

# KEYVAULT_LIST="radix-vault-dev,radix-vault-prod,radix-vault-c2-prod" ./update_auth_secret.sh
# Update key vaults in S941-Omnia-Radix-Development
# KEYVAULT_LIST="radix-keyv-dev,radix-keyv-playground" ./update_auth_secret.sh
#
# Update key vaults in S940-Omnia-Radix-Production
# KEYVAULT_LIST="radix-keyv-platform,radix-keyv-c2" ./update_auth_secret.sh


#######################################################################################
Expand Down

0 comments on commit d069113

Please sign in to comment.