[BREAKING] FEAT: Add fixed egress deployment for CoPyRIT - #2438
Conversation
Deploy the GUI on a VNet-integrated public Container Apps environment with static NAT egress and optional Azure Front Door. Harden the Azure DevOps workflow around immutable image digests, fail-closed what-if validation, and preservation of the reserved public IP. Update isolated-instance lifecycle guidance and add focused infrastructure tests.
Apply the repository-pinned Ruff formatter, resolve typing-only imports and long fixture lines, and normalize file endings for the new infrastructure Python files.
Add the trailing newlines required by the cross-platform end-of-file pre-commit hook.
Behnam (behnam-o)
left a comment
There was a problem hiding this comment.
Looks good to me!
Generally, I would suggest not mixing "refactors" (cosmetic changes with little consequence e.g. updated comments, using effective*** instead of ***.properties.X, introducing env vars in inline scripts, changing reference ADO var groups, etc.) with the "actual feature" (which, here is, adding a AFD and wiring it up to the ACA) ... but I won't block on it :D
Add opt-in AFD Premium Private Link for ACA, disable direct ACA public access in the team deployment path, and automate connection approval, validation, and ordered rollback. Preserve community defaults, protect the managed environment in what-if validation, and document the cutover lifecycle.
Approve ACA private endpoint connections through ARM instead of MSYS-sensitive resource-ID CLI calls, and use REST cleanup during rollback. Allow the full observed Front Door propagation window, set explicit deployment-job timeouts, and cover the approval contract in tests.
varunj-msft
left a comment
There was a problem hiding this comment.
Went through the changes and it looks really good!
Left a couple of notes on the rollback path, both look small.
Few minor things, none blocking: the FD health loop worst case looks closer to an hour than the 30 min in the README; az afd is warning it's moving to the cdn extension so might be worth pinning; and I couldn't spot $(prodApprovers) in the copyrit-gui-prod group yet, though the README does call it out.
Really nice work on this 😊
hannahwestra25
left a comment
There was a problem hiding this comment.
looks good! small nits
Description
This PR replaces the former Azure Container Apps environment Private Endpoint and private DNS path with a supported workload-profiles ACA topology on a dedicated delegated subnet. A Standard NAT Gateway and static public IP provide fixed outbound egress independently of the inbound routing mode.
The Bicep template supports these inbound modes:
The Front Door and Private Link controls are opt-in and default to disabled for community deployments. Bicep rejects ACA public-access shutdown unless both Front Door and its Private Link origin are enabled. Front Door changes inbound routing only; ACA-originated outbound traffic continues to use the NAT Gateway's static public IP.
The Azure DevOps deployment workflow now:
CanNotDeletelock to the static egress public IP and verifies its resource ID and address after deployment;The isolated-instance lifecycle scripts now validate Azure CLI JSON boundaries, restrict Azure SQL to the static egress IP, keep the private Storage container network-reachable for managed-identity and signed-browser media access, use ownership tags, and require explicit acknowledgement before teardown releases an allow-listed IP.
Breaking change: the existing
enablePrivateEndpointparameter and its ACA environment Private Endpoint and private DNS resources are removed, along with the previous Private Endpoint subnet parameters. ACA environment network type is creation-time configuration, so deployments using that path must migrate to a parallel VNet-integrated workload-profiles environment. Pipeline callers must adopt the deployment parameters documented ininfra/README.md.Tests and Documentation
python -m pytest tests/unit/infra -q- 27 tests and 7 subtests pass.infra/main.bicep,infra/modules/aca_nat_network.bicep,infra/modules/aca_front_door.bicep, andinfra/modules/aca_private_endpoint_approval.bicepwith Azure CLI/Bicep.py_compilefor both lifecycle scripts and the what-if validator.bash -nfor the container startup and deployment scripts.git diff --check.infra/README.mdandinfra/DEPLOY_NEW_INSTANCE.mdwith the supported topology, ingress and egress behavior, migration boundary, pipeline contract, lifecycle safeguards, and teardown requirements.