Connection Info as code

Synchronize Connection Info and attached auth plugins with a remote source code repository

You can push a Connection Info to a repository, preview the changes, and refresh it from the repository. You can also create a Connection Info from one in a repository, for example, to copy it to another Cloud Management Platform (CMP) instance. You need a repository linked to CMP. To push, you also need repository credentials on your profile, unless the repository uses GitHub App authentication.

What CMP stores in the repository

Each Connection Info gets its own folder, connection_infos/<global ID>/, holding <global ID>_metadata.json. The file has the Connection Info’s global ID, name, host, port, protocol, username, description, and whether it uses authentication headers.

The password, the authentication headers, and any token from an auth plugin never reach the repository.

If the Connection Info has an auth plugin, CMP pushes the plugin with it, to plugins/<plugin global ID>/.

Push and refresh a Connection Info

Go to Admin > Connection Info, select the Connection Info’s name, then select its Repository tab.

Push to Remote Source opens a form for a Repository, Branch, and Commit Message. For Branch, select an existing branch or enter the name of a new one. If the Connection Info has been pushed before, select Preview to see what changed.

Refresh from Remote Source appears once the Connection Info has been pushed or created from a repository. It prompts for a Repository and Branch, then updates the Connection Info and its auth plugin in CMP. CMP keeps the stored password, headers, and token.

Nothing is pushed or refreshed automatically.

Create a Connection Info from a repository

  1. Go to Admin > Connection Info.
  2. Select Create from Repository.
  3. Provide a Repository, Branch, and Connection Info JSON File. The list shows the _metadata.json files in the repository’s connection_infos/ folder.
  4. Select Create.

The new Connection Info has no password or headers. Edit it to add them before you use it. If CMP already has a Connection Info with the same global ID, creation fails with an error, and the existing Connection Info isn’t changed.