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
Copy file name to clipboardExpand all lines: articles/service-connector/how-to-build-connections-with-iac-tools.md
+25-14Lines changed: 25 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,29 +4,40 @@ description: Learn how to create service connections and translate your infrastr
4
4
author: houk-ms
5
5
ms.service: service-connector
6
6
ms.topic: how-to
7
-
ms.date: 04/01/2026
7
+
ms.date: 04/06/2026
8
8
ms.author: honc
9
-
#customer intent: As an Azure developer, I want to learn how to create service connections and infrastructure configurations as Infrastructure as Code (IaC) templates so I can use the templates for CI/CD pipelines.
9
+
#customer intent: As an Azure developer, I want to learn how to create service connections and infrastructure configurations as Infrastructure as Code (IaC) templates so I can use them for CI/CD pipelines.
10
10
---
11
11
# Create service connections using IaC tools
12
12
13
-
Service Connector helps you quickly and easily connect your compute services to target backing services. When you move from getting-started to a production stage, you also need to transition your connections from manual configurations to Infrastructure as Code (IaC) templates for your continuous integration/continuous delivery (CI/CD) pipelines. This article shows how you can translate your connected Azure services to IaC templates.
13
+
Service Connector helps you quickly and easily connect your compute services to target backing services. When you move from getting-started to a production stage, you also need to transition your service connections from manual configurations to Infrastructure as Code (IaC) templates to use in your continuous integration/continuous delivery (CI/CD) pipelines. This article shows how to translate connected Azure services to IaC templates.
14
14
15
15
## Solution options
16
16
17
17
The Bicep templates in this article create a web app and a storage account and connect them via a system-assigned identity, either in Service Connector or by using template logic. To use these templates, you should understand IaC tools, template authoring grammar, and [known Service Connector IaC limitations](known-limitations.md).
18
18
19
-
Translating Service Connector infrastructure to IaC templates involves implementing both the logic to provision source and target services and the logic to build the connections. To provision source and target services, you can author a template from scratch, or export a template from Azure and polish it. To build a service connection, you can use Service Connector with or without App Configuration, or use template logic directly.
19
+
Translating Service Connector infrastructure to IaC templates includes the following two parts:
20
20
21
-
Combinations of these different options produce different solutions. The following table presents the solutions from most to least recommended, based on susceptibility to Service Connector [IaC limitations](known-limitations.md). **Liveness check** refers to whether the solution performs a liveness check on cloud resources before allowing live traffic.
21
+
1. Provision source and target services. To provision source and target services, you can:
22
+
-[Author a template from scratch](#author-a-template-from-scratch).
23
+
-[Export a template from Azure and polish it](#export-and-polish-a-template).
24
+
25
+
1. Build the service connections. To build a service connection, you can:
26
+
-[Use Service Connector by itself](#use-service-connector).
27
+
-[Use Service Connector with App Configuration](#use-service-connector-with-app-configuration).
Different combinations of these options produce different solutions. The following table presents the solutions from most to least recommended, based on several factors.
31
+
32
+
For example, using App Configuration eliminates known Service Connector [IaC issues](known-limitations.md), but creates a dependency to read from App Configuration. Service Connector does a cloud resources *liveness check* before allowing live traffic, but this feature incurs added cost.
|1| Author from scratch | Service Connector /<br /> App Configuration | Yes | - Template simplicity and readability<br />- Service Connector adds value<br />- No Service Connector IaC issues | - Extra dependency to read from App Configuration<br />- Cost of cloud resources liveness check |
26
-
|2| Author from scratch |Service Connector | Yes | - Template simplicity and readability<br />- Service Connector adds value| - Cost of cloud resources liveness check<br />- Potential Service Connector IaC issues |
36
+
|1| Author from scratch | Service Connector /<br /> App Configuration | Yes | - Template simplicity and readability<br />- Service Connector features<br />- No Service Connector IaC issues | - Dependency on App Configuration<br />- Cost of cloud resources liveness check |
37
+
|2| Author from scratch |Service Connector | Yes | - Template simplicity and readability<br />- Service Connector features| - Cost of cloud resources liveness check<br />- Potential Service Connector IaC issues |
27
38
|3| Author from scratch | Directly in template | No | - Template simplicity and readability<br />- No Service Connector IaC issues | - No Service Connector features |
28
-
|4| Export and polish | Service Connector /<br /> App Configuration | Yes | - Same resources as in the cloud <br />- Service Connector adds value <br />- No Service Connector IaC issues | - Extra dependency to read from App Configuration<br />- Cost of cloud resources liveness check <br />- Effort to understand and polish the template |
29
-
|5| Export and polish |Service Connector | Yes | - Same resources as in the cloud <br />- Service Connector adds value| - Cost of cloud resources liveness check <br />- Potential Service Connector IaC issues <br />- Effort to understand and polish the template |
39
+
|4| Export and polish | Service Connector /<br /> App Configuration | Yes | - Same resources as in the cloud <br />- Service Connector features <br />- No Service Connector IaC issues | - Dependency on App Configuration<br />- Cost of cloud resources liveness check <br />- Effort to understand and polish the template |
40
+
|5| Export and polish |Service Connector | Yes | - Same resources as in the cloud <br />- Service Connector features| - Cost of cloud resources liveness check <br />- Potential Service Connector IaC issues <br />- Effort to understand and polish the template |
30
41
|6| Export and polish | Directly in template | No | - Same resources as in the cloud<br />- No Service Connector IaC issues | - Effort to understand and polish the template <br />- No Service Connector features |
31
42
32
43
## Provision source and target services
@@ -153,7 +164,7 @@ For more information about the properties needed to create a Service Connector r
153
164
154
165
:::image type="content" source="./media/how-to/export-sc-template.png" alt-text="Screenshot of exporting a Bicep template of a service connector resource in the Azure portal.":::
155
166
156
-
#### Store configuration with App Configuration
167
+
###Use Service Connector with App Configuration
157
168
158
169
App Configuration is the recommended way to store connection configuration, because it isn't subject to Service Connector IaC limitations. To create an App Configuration store using the Azure portal, see [Connect Azure services and store configuration in an App Configuration store](tutorial-portal-app-configuration-store.md).
If Service Connector [IaC limitations](./known-limitations.md) affect your scenario, consider building connections directly using template logic. The following template example shows how to connect a storage account to a web app using a system-assigned identity.
209
+
If Service Connector [IaC limitations](./known-limitations.md) affect your scenario, consider building connections directly using template logic. The following template logic connects a storage account to a web app directly, using a system-assigned identity.
199
210
200
211
```bicep
201
212
// This template builds a connection between a web app and a storage account with a system-assigned identity directly
Using template logic directly is equivalent to using Service Connector backend operations. When you build connections using template logic, you must implement the same authentication operations that Service Connector would. The following table lists the operations you must translate to template logic for each kind of authentication type.
256
+
Using template logic directly is equivalent to using Service Connector backend operations. When you build connections using template logic directly, you must implement the same authentication operations that Service Connector would. The following table lists the operations you must translate to template logic for each kind of authentication type.
0 commit comments