Skip to content

Support multi-environment deployment to a single APIM instance #132

@petehauge

Description

@petehauge

Summary

Support deploying multiple environments (e.g., dev, staging, prod) to the same Azure API Management instance, with clear separation between environments via naming conventions or prefixes.

Problem

Currently, apiops-cli assumes a 1:1 mapping between environments and APIM instances. Many organizations want to consolidate multiple environments into a single APIM instance for cost or operational reasons, but need clear separation between environment-specific APIs.

Proposed Solution

Extract

  • Support extracting APIs from a single APIM instance while tagging/grouping them by environment (e.g., via API name prefix, path prefix, or tags).
  • Allow filter configuration to scope extraction to a specific environment subset.

Publish

  • When publishing to a target environment (e.g., "Dev"), automatically apply an environment-specific prefix or suffix to API names/paths (e.g., dev-my-api or /dev/my-api).
  • Support configuration to define the naming/prefixing strategy per environment.
  • Ensure environment-specific named values, backends, and other resources are correctly scoped.

Configuration

  • Extend the configuration system to support an environment concept with per-environment prefixing rules.
  • Allow users to define environment mappings in their configuration files (e.g., configuration.dev.yaml targets the same APIM instance but with a dev- prefix).

Acceptance Criteria

  • Extract supports filtering by environment within a single APIM instance
  • Publish supports applying environment-specific prefixes/suffixes to APIs
  • Configuration schema supports environment-to-prefix mappings
  • Documentation covers multi-environment setup on a single APIM instance
  • Tests cover extract and publish with environment prefixing

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions