Skip to content

Commit 27579ff

Browse files
committed
feat: AZAPI Provider Migration with Version Management
Major architectural shift from AzureRM provider to AZAPI provider with comprehensive version management. Architecture Updates: - Migrated from AzureRM provider to AZAPI provider for direct Azure REST API access - Implemented unified version-aware resource framework (AzapiResource) - Added ApiVersionManager for centralized version registry and resolution - Added SchemaMapper for property validation and transformation Supported Services: - Resource Groups: API versions 2024-11-01, 2025-01-01, 2025-03-01 - Storage Accounts: API versions 2023-01-01, 2023-05-01, 2024-01-01 Features: - Automatic latest version resolution when no version specified - Explicit version pinning for stability requirements - Schema-driven validation and transformation - Migration analysis with breaking change detection - Version lifecycle management (Active/Deprecated/Sunset) - Full JSII compliance for multi-language support Documentation: - Updated README with both supported services and all API versions - Added comprehensive code examples for ResourceGroup and StorageAccount - Fixed broken documentation links to reference existing files - Added version-specific usage examples BREAKING CHANGE: Complete migration from AzureRM to AZAPI provider requires updating import statements and resource instantiation patterns.
1 parent c60a863 commit 27579ff

File tree

242 files changed

+43588
-26971
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+43588
-26971
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
"version": "latest"
1111
},
1212
"ghcr.io/devcontainers/features/go:1": {
13-
"version": "1.19"
13+
"version": "1.23"
1414
},
1515
"ghcr.io/devcontainers/features/terraform:1": {
1616
"version": "1.5.4",
1717
"tflint": "latest",
1818
"terragrunt": "latest"
1919
},
2020
"ghcr.io/devcontainers-contrib/features/tfcdk-cli:1": {
21-
"version": "0.17.3"
21+
"version": "0.20.8"
2222
},
2323
"ghcr.io/devcontainers-contrib/features/jest:2": {
2424
"version": "latest"

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/deps.json

Lines changed: 7 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/tasks.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { JsonPatch } from "projen/lib/json-patch";
55
const project = new cdktf.ConstructLibraryCdktf({
66
author: "Microsoft",
77
authorAddress: "https://microsoft.com",
8-
cdktfVersion: "0.17.3",
9-
jsiiVersion: "~5.2.0",
8+
cdktfVersion: "0.20.8",
9+
jsiiVersion: "~5.9.0",
1010
description:
11-
"A collection of CDK modules for provisioning and managing Terraform resources efficiently.",
11+
"Azure CDK constructs using AZAPI provider for direct Azure REST API access. Version 1.0.0 - Major breaking change migration from AzureRM to AZAPI.",
1212
keywords: [
1313
"cdk",
1414
"cdktf",
@@ -17,14 +17,16 @@ const project = new cdktf.ConstructLibraryCdktf({
1717
"cloud",
1818
"devops",
1919
"azure",
20+
"azapi",
21+
"rest-api",
2022
],
21-
constructsVersion: "^10.1.106",
22-
typescriptVersion: "~5.2.0", // should always be the same major/minor as JSII
23+
constructsVersion: "^10.3.0",
24+
typescriptVersion: "~5.6.2", // should always be the same major/minor as JSII
2325
minNodeVersion: "20.10.0",
2426
defaultReleaseBranch: "main",
2527
name: "@microsoft/terraform-cdk-constructs",
28+
majorVersion: 1, // Set to version 1.0.0 for AZAPI migration
2629
projenrcTs: true,
27-
prerelease: "pre",
2830
jest: true,
2931
testdir: "",
3032
prettier: true,
@@ -50,27 +52,19 @@ const project = new cdktf.ConstructLibraryCdktf({
5052
jestOptions: {
5153
updateSnapshot: UpdateSnapshot.NEVER,
5254
},
53-
deps: [
54-
"@cdktf/provider-azurerm@9.0.8",
55-
"nanoid@^4.0.2",
56-
"ts-md5@^1.3.1",
57-
"cdktf@0.17.3",
58-
//"constructs@^10.1.106",
59-
"moment@^2.30.1",
60-
],
61-
peerDeps: ["@cdktf/provider-azurerm@9.0.8"],
62-
bundledDeps: ["moment@^2.30.1", "ts-md5@^1.3.1", "nanoid@^4.0.2"],
55+
// Dependencies for AZAPI-only implementation (removed AzureRM dependencies)
56+
// AZAPI provider classes are built into this package in src/core-azure/lib/providers-azapi/
57+
deps: ["cdktf@0.20.8"],
58+
peerDeps: ["cdktf@0.20.8", "constructs@^10.3.0"], // Only core CDK dependencies
59+
bundledDeps: [],
6360
devDeps: [
64-
"@cdktf/provider-azurerm@9.0.8",
65-
"cdktf@0.17.3",
66-
"@types/jest@^29.5.8",
67-
"@types/node@^18.7.18",
68-
"jest@^29.6.1",
69-
"ts-jest@^29.1.1",
70-
"ts-node@^10.9.1",
71-
"typescript@^4.9.5",
72-
//"constructs@10.1.106",
73-
"@types/moment@^2.13.0",
61+
"cdktf@0.20.8",
62+
"@types/jest@^29.5.13",
63+
"@types/node@^22",
64+
"jest@^29.7.0",
65+
"ts-jest@^29.2.5",
66+
"ts-node@^10.9.2",
67+
"typescript@~5.6.2",
7468
],
7569
releaseToNpm: true,
7670
});
@@ -92,6 +86,8 @@ if (project.jest && project.jest.config) {
9286
}
9387
project.tsconfigDev.include.push("**/*.integ.ts");
9488
project.tsconfigDev.include.push("**/*.spec.ts");
89+
project.tsconfigDev.include.push("src/**/v*/**/*.ts");
90+
project.tsconfigDev.include.push("src/utils/**/*.ts");
9591
project.addScripts({
9692
test: "jest --testMatch '**/*.spec.ts'",
9793
integration: "STREAM_OUTPUT=true jest --testMatch '**/*.integ.ts'",
@@ -186,6 +182,11 @@ project.gitignore.exclude("*terraform.*.tfstate*");
186182
project.prettier?.addIgnorePattern(".github");
187183
project.eslint?.addIgnorePattern(".github");
188184

185+
// Ignore generated AZAPI provider files completely
186+
project.eslint?.addIgnorePattern(
187+
"src/core-azure/lib/azapi/providers-azapi/**/*.ts",
188+
);
189+
189190
// Add generate index script
190191
project.addScripts({
191192
"generate-index": "node ./scripts/generate-index.js",

0 commit comments

Comments
 (0)