Skip to content

Commit

Permalink
refactor: packer vnet resolution (#5347)
Browse files Browse the repository at this point in the history
Co-authored-by: Cameron Meissner <[email protected]>
Co-authored-by: Sylvain Boily <[email protected]>
  • Loading branch information
3 people authored Dec 8, 2024
1 parent bee9cc9 commit c0f8cc2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vhdbuilder/packer/init-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if [ -z "${VNET_RG_NAME}" ]; then
# TODO(cameissner): build out updated pool resources in prod so we don't have to pivot like this
VNET_RG_NAME="nodesig-${ENVIRONMENT}-${PACKER_BUILD_LOCATION}-agent-pool"
else
VNET_RG_NAME="nodesig-${ENVIRONMENT}-${PACKER_BUILD_LOCATION}-pool-vnet-rg"
VNET_RG_NAME="nodesig-${ENVIRONMENT}-${PACKER_BUILD_LOCATION}-packer-vnet-rg"
fi
fi
if [ "$MODE" == "windowsVhdMode" ]; then
Expand All @@ -99,7 +99,12 @@ fi

if [ -z "${VNET_NAME}" ]; then
if [ "$MODE" == "linuxVhdMode" ]; then
VNET_NAME="nodesig-pool-vnet-${PACKER_BUILD_LOCATION}"
if [ "${ENVIRONMENT,,}" == "prod" ]; then
# TODO(cameissner): build out updated pool resources in prod so we don't have to pivot like this
VNET_NAME="nodesig-pool-vnet-${PACKER_BUILD_LOCATION}"
else
VNET_NAME="nodesig-packer-vnet-${PACKER_BUILD_LOCATION}"
fi
fi
if [ "$MODE" == "windowsVhdMode" ]; then
VNET_NAME="nodesig-pool-vnet"
Expand Down

0 comments on commit c0f8cc2

Please sign in to comment.