APIM module major: contract simplification - #1923
Draft
krusty93 wants to merge 12 commits into
Draft
Conversation
krusty93
temporarily deployed
to
bootstrapper-dev-cd
July 1, 2026 13:36 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-prod-cd
July 1, 2026 13:36 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-dev-cd
July 1, 2026 13:45 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-prod-cd
July 1, 2026 13:45 — with
GitHub Actions
Inactive
…in APIM module Auto-compute subnet IDs from the virtual_network variable using the standard naming convention, eliminating the need for users to manually provide subnet IDs. Mark all three variables as deprecated using the Terraform 1.9+ deprecated variable feature. - var.subnet_id: computed from virtual_network + apim_subnet naming convention - var.subnet_pep_id: computed from virtual_network + pep subnet naming convention - var.virtual_network_type_internal: type is already determined by use_case Resolves CES-1911 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace the naming-convention lookup approach with actual subnet creation inside the module. The DX provider computes an available /27 CIDR block from the VNet and the module creates the subnet. var.subnet_id is retained as deprecated for backward compatibility: when provided the existing subnet is used and none is created. A new 'subnet' output exposes the ID and name of the managed subnet. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
krusty93
force-pushed
the
krusty93-shiny-adventure
branch
from
July 8, 2026 12:28
a163c4c to
138fce7
Compare
krusty93
temporarily deployed
to
bootstrapper-prod-ci
July 8, 2026 12:28 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-dev-ci
July 8, 2026 12:28 — with
GitHub Actions
Inactive
Collect the APIM module breaking changes behind a major version plan. The module now owns subnet creation, public IP creation when required, private DNS zone lookup, monitoring defaults, locks, notification sender configuration, Application Insights connection string lookup, and a simpler hostname certificate input contract. Resolves CES-1911 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
krusty93
temporarily deployed
to
bootstrapper-prod-ci
July 8, 2026 13:16 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-dev-ci
July 8, 2026 13:16 — with
GitHub Actions
Inactive
Replace the legacy combined APIM test file with dedicated unit, contract, and integration test layers. Mocked unit and contract tests cover the simplified major-version contract, while integration tests use the setup module and real providers for apply scenarios. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
krusty93
temporarily deployed
to
bootstrapper-prod-ci
July 8, 2026 13:28 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-dev-ci
July 8, 2026 13:28 — with
GitHub Actions
Inactive
…in APIM module Auto-compute subnet IDs from the virtual_network variable using the standard naming convention, eliminating the need for users to manually provide subnet IDs. Mark all three variables as deprecated using the Terraform 1.9+ deprecated variable feature. - var.subnet_id: computed from virtual_network + apim_subnet naming convention - var.subnet_pep_id: computed from virtual_network + pep subnet naming convention - var.virtual_network_type_internal: type is already determined by use_case Resolves CES-1911 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace the naming-convention lookup approach with actual subnet creation inside the module. The DX provider computes an available /27 CIDR block from the VNet and the module creates the subnet. var.subnet_id is retained as deprecated for backward compatibility: when provided the existing subnet is used and none is created. A new 'subnet' output exposes the ID and name of the managed subnet. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Collect the APIM module breaking changes behind a major version plan. The module now owns subnet creation, public IP creation when required, private DNS zone lookup, monitoring defaults, locks, notification sender configuration, Application Insights connection string lookup, and a simpler hostname certificate input contract. Resolves CES-1911 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace the legacy combined APIM test file with dedicated unit, contract, and integration test layers. Mocked unit and contract tests cover the simplified major-version contract, while integration tests use the setup module and real providers for apply scenarios. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
krusty93
force-pushed
the
krusty93-shiny-adventure
branch
from
July 24, 2026 14:03
f1b104e to
d836923
Compare
krusty93
temporarily deployed
to
bootstrapper-prod-ci
July 24, 2026 14:03 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-dev-ci
July 24, 2026 14:03 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-dev-ci
July 24, 2026 14:17 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-prod-ci
July 24, 2026 14:17 — with
GitHub Actions
Inactive
Restore the intended module-owned subnet and network resource changes after the malformed local commit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
krusty93
temporarily deployed
to
bootstrapper-prod-ci
July 24, 2026 16:12 — with
GitHub Actions
Inactive
krusty93
temporarily deployed
to
bootstrapper-dev-ci
July 24, 2026 16:12 — with
GitHub Actions
Inactive
Contributor
📋 Pre-commit Output LogGenerated on Fri Jul 24 16:14:00 UTC 2026 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Collects APIM module breaking changes behind a major version plan instead of relying on Terraform's unsupported
deprecatedvariable attribute for the current binary constraint.This PR simplifies the module contract so common APIM infrastructure is owned by the module and driven by
use_case.Breaking changes
subnet_id; the module always creates the APIM subnet usingdx_available_subnet_cidrwith a /24 prefix.subnet_pep_id; the private endpoint subnet ID is computed from the VNet and standardpepsubnet naming.virtual_network_type_internal; APIM virtual network type is selected byuse_case.enable_public_network_access; public network access is selected byuse_caseand SKU behavior.public_ip_address_id; the module creates a Standard static public IP when required by the selected use case.private_dns_zone_ids; private DNS zones are looked up by name inprivate_dns_zone_resource_group_nameor the VNet resource group, in the current subscription.notification_sender_email;publisher_emailis used for notifications.lock_enable; lock behavior is selected byuse_case.key_vault_idandcertificate_names; hostname certificates are configured directly with Key Vault certificate IDs and the module strips versions internally.monitoringwithlog_analytics_workspace_id; logs and metrics are enabled by default for production use cases.management_logger_application_insight_enabled; Application Insights logger is enabled whenapplication_insights.idis set.application_insights.enabledandapplication_insights.connection_string; the module resolves the connection string from the Application Insights resource ID.hostname_configuration.proxy; users can only choose whether the resource-name proxy host is the default SSL binding viause_resource_name_as_default.Tests
tests/apim.tftest.hclwith dedicatedunit.tftest.hcl,contract.tftest.hcl, andintegration.tftest.hcllayers.azurermanddxproviders.tests/setupshared infrastructure and random instance numbers for isolation.Validation
terraform fmt -recursiveterraform validatepnpm nx run azure_api_management:tf-validate --skipNxCacheTF_CLI_ARGS_test='-filter=tests/unit.tftest.hcl' pnpm nx run azure_api_management:tf-test --skipNxCacheTF_CLI_ARGS_test='-filter=tests/contract.tftest.hcl' pnpm nx run azure_api_management:tf-test --skipNxCacheResolves CES-1911