AJ ZAFAR

Architecting intelligence. Delivering impact.

Power Platform4 min read

Connection references in pipelines: deployment settings files arrive

Power Platform Build Tools and the pac CLI can now set connection references and environment variables from a deployment settings file, in public preview.

The Power Platform Import Solution task in an Azure DevOps pipeline with Use deployment settings file ticked and a deploymentSettings.json path entered

If you have automated Power Platform deployments, you know the awkward bit. The solution imports cleanly through the pipeline, then someone has to log in to the target environment and fix up connection references and environment variable values by hand before the flows will turn on. It is the step that makes “fully automated ALM” a slight exaggeration on most projects.

Yesterday (19 August) Kartik Kanakasabesan announced the July refresh of the Power Platform Build Tools and, more importantly, a public preview of connection reference and environment variable support in the Build Tools and the PAC CLI.

What was announced

The public preview

  • You can now set connection references and environment variables at import time by providing a deployment settings file.
  • The Power Platform Import Solution task in Azure DevOps has a new option to use a deployment settings file.
  • The PAC CLI has a new pac solution create-settings command. It takes a solution zip, or the folder output of pac solution clone, and generates most of the settings JSON for you. Previously developers had to handcraft the file.
  • You still have to fill in the ConnectionId for the target environment yourself.
  • The preview does not create the connection in the target environment. It must be created manually first, and then the pipeline can carry on.

Other changes in the refresh

  • Solution pack and unpack in the PAC CLI, now multi-platform.
  • pac auth create supports interactive login on macOS and Linux.
  • pac plugin init generates the strong-name key without needing Visual Studio tools.
A PowerShell window running pac solution create-settings against a solution zip and reporting that a deployment settings file has been created
pac solution create-settings extracts the connection references and environment variables from a solution and writes a deployment settings file.Image: Microsoft Learn (CC BY 4.0)

What it means for organisations

One less manual step after import

This is the piece I have been waiting for. With a settings file per target environment, the pipeline can point flows at the right connections and set environment variable values for test and production without someone clicking through the solution afterwards. That makes releases repeatable, and repeatable releases are what auditors and change boards actually want.

Connections still need an owner

Because the preview does not create connections, someone still has to create them in each target environment and record their IDs. In practice that means deciding up front:

  • Which account owns production connections. A named service account is usually better than whoever happened to deploy first.
  • Where connection IDs are recorded, and who updates the settings file when a connection is recreated.
  • How secrets are kept out of source control. Connection IDs are not secrets, but environment variable values sometimes are close to it. Pipeline variables or variable groups are a better home for anything sensitive.

Settings files become part of the solution

I would treat the deployment settings files as first-class artefacts, one per environment, stored with the unpacked solution and reviewed like code. A missing or stale value is now a pipeline failure rather than a quiet broken flow, which is a good trade.

The Power Platform Import Solution task in an Azure DevOps pipeline with Use deployment settings file ticked and a deploymentSettings.json path entered
The Import Solution task in Azure DevOps with the new deployment settings file option.Image: Microsoft Learn (CC BY 4.0)

Caveats

This is a public preview, so I would not make a production release process depend on it yet. Pilot it on a non-critical solution, ideally one with a couple of flows and a few environment variables, and see how it behaves across a full dev to test to production path. Feedback goes to the product team through the email address and community forum in the blog post.

↑↓ navigateEnter openEsc close