Repository navigation
Azure deploy: use a Foundry account that already exists (FOUNDRY_ACCOUNT_EXISTING) - #430
Open
Affan Dar (affandar) wants to merge 1 commit into
Open
Affan Dar (affandar) wants to merge 1 commit into
Affan Dar (affandar) wants to merge 1 commit into
Conversation
…UNT_EXISTING) Every base-infra deploy sent the Foundry account's full definition. A subscription policy can refuse an account that allows key sign-in. The deploy then fails at base-infra, also when nothing about the account changed. Turning key sign-in off is not an option while the HorizonDB embedding loop sends the account key on every call. FOUNDRY_ACCOUNT_EXISTING=true makes the stamp leave the account as it is: - The account's definition moves from foundry.bicep to the new foundry-account.bicep. main.bicep skips that file when the switch is on. - foundry.bicep reads the account as an existing resource and still manages the model deployments, the azure-oai-key secret and the data-plane role. - The default (false) sends the same account as before. - The deploy workflows read the switch from a variable of the azure-deploy environment. Also: - The deploy Action's one-line diagnostic says whether Azure Policy refused the Foundry account or the AKS cluster. It still prints no resource or policy name. - DEPLOY_PRINCIPAL_TYPE=User lets a person give their own object ID in DEPLOY_PRINCIPAL_ID when the Azure CLI cannot look it up.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The deploy step of the last four Create release runs failed (0.8.18 to 0.8.21). Each release was published. The test environment was not upgraded.
The account had not changed. The deploy sent it again anyway, and that is what the policy refuses.
FOUNDRY_AUTH_MODE=entraturns key sign-in off, but it cannot be used here yet. The HorizonDB embedding loop sends the account key on every call (df.httpwith theapi-keyheader). The live embedding tests of the release gate read the same key. Related: #13, #408.Change
A new stamp setting,
FOUNDRY_ACCOUNT_EXISTING(defaultfalse).foundry-account.bicep(new) holds the account.main.bicepskips it when the switch is on.foundry.bicepreads the account as an existing resource in both cases.azure-deployenvironment, likeAKS_ENTRA_ID_AUTH.Two small additions:
DEPLOY_PRINCIPAL_TYPE=User: a person can give their own object ID inDEPLOY_PRINCIPAL_IDwhen the Azure CLI cannot look it up. Before, the ID was always read as a service principal.This does not make the account compliant with such a policy. It stops the deploy from failing on an account it did not change. The real end state is keyless embedding calls, then
FOUNDRY_AUTH_MODE=entra.Checks
az deployment group validateagainst a stamp where the policy is active (read-only):foundry.bicepfrom mainfoundry.bicep(account as existing)foundry-account.bicepmain.bicep, switch onmain.bicep, switch offA real
base-infradeploy with the switch on then succeeded on that stamp. The account was not updated. All other parameters were the same as in the last deploy by the workflow.Tests: 448 deploy-script tests, 135 CI script tests, privacy check 0 findings,
az bicep buildon the three files.After merge
Set the variable
FOUNDRY_ACCOUNT_EXISTING=trueon theazure-deployenvironment. Without it the next release deploy fails in the same place.