You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add existing-project orchestrator for network-secured Standard Agent setup (microsoft-foundry#414)
Adds add-existing-project.bicep so the network-secured Standard Agent setup can
be wired onto a Foundry project that already exists, instead of always creating
a new project with a random suffix. This covers the common case of securing an
already-deployed Foundry behind private endpoints.
- New orchestrator add-existing-project.bicep mirrors add-project.bicep but
references an existing project in place (no suffix appended).
- New module ai-existing-project-connections.bicep declares the Cosmos DB,
Storage, and AI Search connections on the existing project with AAD auth and
outputs the names so the capability host binds to them.
- Optional toggles for already-configured projects: assignRoles to skip
role-assignment modules when the identity is already permissioned, explicit
connection-name overrides to match a pre-existing capability host, and
projectCapHost to target an existing host.
- Example add-existing-project.bicepparam and a README section covering
prerequisites, the optional parameters, a required-roles checklist for the
assignRoles=false case, idempotency, and scope/caveats.
Validated on a repro environment: idempotent re-deploy converges as a no-op, and
assignRoles=false deploys cleanly against a project that already has the role
assignments.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@description('Name of the EXISTING project to reuse. No suffix is appended.')
19
+
paramprojectNamestring
20
+
21
+
@description('Name for the project capability host')
22
+
paramprojectCapHoststring = 'caphostproj'
23
+
24
+
@description('Set false to skip all role-assignment modules. Use this when the existing project identity is ALREADY permissioned on the backing services (a pre-permissioned production project), to avoid RoleAssignmentExists on assignments that were created under different names.')
25
+
paramassignRolesbool = true
26
+
27
+
@description('Optional. Full name of the Cosmos DB connection on the project. Leave empty to use the default <cosmosName>-<project>. Set this to match a connection that already exists (for example one a portal-created capability host already binds to).')
28
+
paramcosmosDBConnectionNamestring = ''
29
+
30
+
@description('Optional. Full name of the Storage connection on the project. Leave empty to use the default <storageName>-<project>.')
31
+
paramazureStorageConnectionNamestring = ''
32
+
33
+
@description('Optional. Full name of the AI Search connection on the project. Leave empty to use the default <searchName>-<project>.')
34
+
paramaiSearchConnectionNamestring = ''
35
+
36
+
// Existing shared resources (from your original deployment)
37
+
@description('Name of the existing AI Search service')
38
+
paramexistingAiSearchNamestring
39
+
40
+
@description('Resource group containing the AI Search service')
41
+
paramaiSearchResourceGroupNamestring
42
+
43
+
@description('Subscription ID containing the AI Search service')
44
+
paramaiSearchSubscriptionIdstring
45
+
46
+
@description('Name of the existing Storage Account')
47
+
paramexistingStorageNamestring
48
+
49
+
@description('Resource group containing the Storage Account')
50
+
paramstorageResourceGroupNamestring
51
+
52
+
@description('Subscription ID containing the Storage Account')
53
+
paramstorageSubscriptionIdstring
54
+
55
+
@description('Name of the existing Cosmos DB account')
56
+
paramexistingCosmosDBNamestring
57
+
58
+
@description('Resource group containing the Cosmos DB account')
59
+
paramcosmosDBResourceGroupNamestring
60
+
61
+
@description('Subscription ID containing the Cosmos DB account')
62
+
paramcosmosDBSubscriptionIdstring
63
+
64
+
// Deterministic suffix from the project name. Keeps connection names and role
65
+
// assignment GUIDs stable across re-runs so the deployment is idempotent.
66
+
varprojectNameLower = toLower(projectName)
67
+
varconnectionSuffix = '-${projectNameLower}'
68
+
69
+
// Effective connection names: explicit override if supplied, otherwise the
70
+
// deterministic default. Lets a customer match connections a pre-existing
0 commit comments