microsoft-cdktfconstructs 0.0.3.dev12__tar.gz → 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {microsoft-cdktfconstructs-0.0.3.dev12 → microsoft_cdktfconstructs-1.2.0}/LICENSE +1 -1
  2. microsoft_cdktfconstructs-1.2.0/PKG-INFO +294 -0
  3. microsoft_cdktfconstructs-1.2.0/README.md +267 -0
  4. {microsoft-cdktfconstructs-0.0.3.dev12 → microsoft_cdktfconstructs-1.2.0}/pyproject.toml +2 -2
  5. {microsoft-cdktfconstructs-0.0.3.dev12 → microsoft_cdktfconstructs-1.2.0}/setup.py +18 -22
  6. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/__init__.py +36636 -0
  7. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/_jsii/__init__.py +45 -0
  8. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/_jsii/terraform-cdk-constructs@1.2.0.jsii.tgz +0 -0
  9. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_actiongroup/__init__.py +1604 -0
  10. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_activitylogalert/__init__.py +1313 -0
  11. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_aks/__init__.py +6270 -0
  12. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_diagnosticsettings/__init__.py +1128 -0
  13. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_metricalert/__init__.py +1748 -0
  14. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_networkinterface/__init__.py +1722 -0
  15. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_networksecuritygroup/__init__.py +1592 -0
  16. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_publicipaddress/__init__.py +1298 -0
  17. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_resourcegroup/__init__.py +711 -0
  18. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_storageaccount/__init__.py +2023 -0
  19. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_subnet/__init__.py +1300 -0
  20. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_virtualmachine/__init__.py +4814 -0
  21. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_virtualnetwork/__init__.py +1125 -0
  22. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/azure_vmss/__init__.py +5524 -0
  23. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/core_azure/__init__.py +11626 -0
  24. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs/testing/__init__.py +1291 -0
  25. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs.egg-info/PKG-INFO +294 -0
  26. {microsoft-cdktfconstructs-0.0.3.dev12 → microsoft_cdktfconstructs-1.2.0}/src/microsoft_cdktfconstructs.egg-info/SOURCES.txt +11 -13
  27. microsoft_cdktfconstructs-1.2.0/src/microsoft_cdktfconstructs.egg-info/requires.txt +5 -0
  28. microsoft-cdktfconstructs-0.0.3.dev12/PKG-INFO +0 -178
  29. microsoft-cdktfconstructs-0.0.3.dev12/README.md +0 -155
  30. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/__init__.py +0 -216
  31. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/_jsii/__init__.py +0 -31
  32. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/_jsii/terraform-cdk-constructs@0.0.3-pre.12.jsii.tgz +0 -0
  33. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_applicationgateway/__init__.py +0 -823
  34. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_applicationinsights/__init__.py +0 -397
  35. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_containerregistry/__init__.py +0 -320
  36. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_eventhub/__init__.py +0 -2218
  37. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_functionapp/__init__.py +0 -908
  38. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_keyvault/__init__.py +0 -1982
  39. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_kubernetes/__init__.py +0 -400
  40. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_kusto/__init__.py +0 -2522
  41. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_loganalytics/__init__.py +0 -676
  42. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_metricalert/__init__.py +0 -1260
  43. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_networksecuritygroup/__init__.py +0 -1742
  44. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_queryrulealert/__init__.py +0 -1189
  45. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_resourcegroup/__init__.py +0 -320
  46. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_storageaccount/__init__.py +0 -1931
  47. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_virtualmachine/__init__.py +0 -1514
  48. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_virtualmachinescaleset/__init__.py +0 -1239
  49. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/azure_virtualnetwork/__init__.py +0 -707
  50. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs/core_azure/__init__.py +0 -940
  51. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs.egg-info/PKG-INFO +0 -178
  52. microsoft-cdktfconstructs-0.0.3.dev12/src/microsoft_cdktfconstructs.egg-info/requires.txt +0 -6
  53. {microsoft-cdktfconstructs-0.0.3.dev12 → microsoft_cdktfconstructs-1.2.0}/MANIFEST.in +0 -0
  54. {microsoft-cdktfconstructs-0.0.3.dev12 → microsoft_cdktfconstructs-1.2.0}/setup.cfg +0 -0
  55. {microsoft-cdktfconstructs-0.0.3.dev12 → microsoft_cdktfconstructs-1.2.0}/src/microsoft_cdktfconstructs/py.typed +0 -0
  56. {microsoft-cdktfconstructs-0.0.3.dev12 → microsoft_cdktfconstructs-1.2.0}/src/microsoft_cdktfconstructs.egg-info/dependency_links.txt +0 -0
  57. {microsoft-cdktfconstructs-0.0.3.dev12 → microsoft_cdktfconstructs-1.2.0}/src/microsoft_cdktfconstructs.egg-info/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- Copyright (c) 2024 Microsoft
1
+ Copyright (c) 2025 Microsoft
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,294 @@
1
+ Metadata-Version: 2.1
2
+ Name: microsoft-cdktfconstructs
3
+ Version: 1.2.0
4
+ Summary: Azure CDK constructs using AZAPI provider for direct Azure REST API access. Version 1.0.0 - Major breaking change migration from AzureRM to AZAPI.
5
+ Home-page: https://github.com/azure/terraform-cdk-constructs.git
6
+ Author: Microsoft
7
+ License: MIT
8
+ Project-URL: Source, https://github.com/azure/terraform-cdk-constructs.git
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: JavaScript
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Typing :: Typed
17
+ Classifier: Development Status :: 5 - Production/Stable
18
+ Classifier: License :: OSI Approved
19
+ Requires-Python: ~=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: cdktf==0.20.8
23
+ Requires-Dist: constructs<11.0.0,>=10.3.0
24
+ Requires-Dist: jsii<2.0.0,>=1.117.0
25
+ Requires-Dist: publication>=0.0.3
26
+ Requires-Dist: typeguard<4.3.0,>=2.13.3
27
+
28
+ # Azure Terraform CDK Constructs
29
+
30
+ Welcome to the Azure Terraform CDK Constructs project! This library offers Azure L2 Constructs using the AZAPI provider for direct Azure REST API access, providing immediate access to new Azure features and API versions.
31
+
32
+ ## 🚀 Version 1.0.0 - AZAPI Provider Migration
33
+
34
+ **Breaking Change Notice:** Version 1.0.0 represents a major architectural shift from AzureRM provider to AZAPI provider. This migration provides:
35
+
36
+ * **Direct Azure REST API Access**: No dependency on AzureRM provider
37
+ * **Immediate Feature Access**: Get new Azure features as soon as they're available in Azure APIs
38
+ * **Version-Specific Implementations**: Multiple API versions supported for each service
39
+ * **Enhanced Type Safety**: Improved IDE support and compile-time validation
40
+ * **Included Provider Bindings**: AZAPI provider classes are included - no need to generate bindings
41
+
42
+ ## Benefits of Using AZAPI L2 Constructs
43
+
44
+ With AZAPI L2 Constructs, you get the following benefits:
45
+
46
+ * **Direct API Access**: Bypass provider limitations and access Azure REST APIs directly
47
+ * **Version Flexibility**: Choose specific API versions for your resources
48
+ * **Rapid Feature Adoption**: Access new Azure features immediately without waiting for provider updates
49
+ * **Enhanced Abstraction**: Higher-level abstractions over Azure resources with type safety
50
+ * **Built-in Monitoring**: One-line setup for comprehensive monitoring with customizable alerts and diagnostic settings
51
+ * **Schema Validation**: Automatic validation of properties against Azure API schemas
52
+ * **Reusability**: Encapsulate common patterns and best practices in your infrastructure code
53
+ * **Testing Utilities**: Helper functions for integration tests including naming conventions, metadata, and resource cleanup
54
+ * **Direct IDE Integration**: Access detailed documentation directly within your IDE
55
+ * **Zero Provider Setup**: AZAPI provider bindings included in the package
56
+
57
+ ## Currently Supported Services
58
+
59
+ ### Compute
60
+
61
+ | Service | API Versions | Monitoring Support | Status |
62
+ |---------|-------------|-------------------|--------|
63
+ | [Virtual Machines](./src/azure-virtualmachine/README.md) | 2024-07-01, 2024-11-01, 2025-04-01 | ✅ Built-in | ✅ Available |
64
+ | [AKS Clusters](./src/azure-aks/README.md) | 2025-05-01, 2025-07-01, 2025-08-01 | ✅ Built-in | ✅ Available |
65
+ | [Virtual Machine Scale Sets](./src/azure-vmss/README.md) | 2025-01-02, 2025-02-01, 2025-04-01 | ✅ Built-in | ✅ Available |
66
+
67
+ ### Networking
68
+
69
+ | Service | API Versions | Status |
70
+ |---------|-------------|--------|
71
+ | [Virtual Networks](./src/azure-virtualnetwork/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
72
+ | [Subnets](./src/azure-subnet/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
73
+ | [Network Interfaces](./src/azure-networkinterface/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
74
+ | [Network Security Groups](./src/azure-networksecuritygroup/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
75
+ | [Public IP Addresses](./src/azure-publicipaddress/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
76
+
77
+ ### Monitoring & Alerting
78
+
79
+ | Service | API Versions | Status |
80
+ |---------|-------------|--------|
81
+ | [Action Groups](./src/azure-actiongroup/README.md) | 2021-09-01 | ✅ Available |
82
+ | [Metric Alerts](./src/azure-metricalert/README.md) | 2018-03-01 | ✅ Available |
83
+ | [Activity Log Alerts](./src/azure-activitylogalert/README.md) | 2020-10-01 | ✅ Available |
84
+ | [Diagnostic Settings](./src/azure-diagnosticsettings/README.md) | 2016-09-01, 2021-05-01-preview | ✅ Available |
85
+
86
+ ### Foundation
87
+
88
+ | Service | API Versions | Status |
89
+ |---------|-------------|--------|
90
+ | [Resource Groups](./src/azure-resourcegroup/README.md) | 2024-11-01, 2025-01-01, 2025-03-01 | ✅ Available |
91
+ | [Storage Accounts](./src/azure-storageaccount/README.md) | 2023-01-01, 2023-05-01, 2024-01-01 | ✅ Available |
92
+
93
+ ## Quick Example
94
+
95
+ Create Azure resources using AZAPI provider:
96
+
97
+ ```python
98
+ import * as azcdk from "@microsoft/terraform-cdk-constructs";
99
+ import { Construct } from 'constructs';
100
+ import { App, TerraformStack } from 'cdktf';
101
+
102
+ class AzureAppInfra extends TerraformStack {
103
+ constructor(scope: Construct, name: string) {
104
+ super(scope, name);
105
+
106
+ // Create a new Azure Resource Group using AZAPI
107
+ const rg = new azcdk.azure_resourcegroup.ResourceGroup(this, "resourcegroup", {
108
+ name: "rg-myapp-prod",
109
+ location: "eastus",
110
+ tags: {
111
+ environment: "production",
112
+ project: "myapp"
113
+ }
114
+ });
115
+
116
+ // Create a Storage Account
117
+ new azcdk.azure_storageaccount.StorageAccount(this, "storage", {
118
+ name: "mystorageaccount",
119
+ location: "eastus",
120
+ resourceGroupId: rg.id,
121
+ sku: { name: "Standard_LRS" }
122
+ });
123
+ }
124
+ }
125
+
126
+ const app = new App();
127
+ new AzureAppInfra(app, 'cdk');
128
+ app.synth();
129
+ ```
130
+
131
+ ## Getting Started
132
+
133
+ ### Prerequisites
134
+
135
+ * Node.js and npm installed (for TypeScript/JavaScript)
136
+ * Azure CLI configured with appropriate permissions
137
+
138
+ ### Installation
139
+
140
+ Install the CDK for Terraform CLI globally:
141
+
142
+ ```sh
143
+ npm install -g cdktf-cli
144
+ ```
145
+
146
+ Initialize a new CDK for Terraform project:
147
+
148
+ ```sh
149
+ cdktf init --template="TypeScript" --local
150
+ ```
151
+
152
+ Install the Microsoft Terraform CDK constructs (includes AZAPI provider bindings):
153
+
154
+ ```sh
155
+ npm install @microsoft/terraform-cdk-constructs
156
+ ```
157
+
158
+ That's it! The AZAPI provider classes are included in the package, so you don't need to configure additional providers or generate bindings.
159
+
160
+ ## Built-in Monitoring & Alerting
161
+
162
+ Azure L2 Constructs include comprehensive monitoring capabilities that can be enabled with a single method call. The monitoring framework automatically creates metric alerts, diagnostic settings, and activity log alerts for supported resources.
163
+
164
+ ### Quick Example
165
+
166
+ ```python
167
+ import { VirtualMachine } from "@microsoft/terraform-cdk-constructs/azure-virtualmachine";
168
+ import { ActionGroup } from "@microsoft/terraform-cdk-constructs/azure-actiongroup";
169
+
170
+ // Enable monitoring with one line
171
+ const vm = new VirtualMachine(this, "vm", {
172
+ name: "my-vm",
173
+ // ... VM configuration ...
174
+ monitoring: VirtualMachine.defaultMonitoring(actionGroup.id, workspaceId),
175
+ });
176
+ ```
177
+
178
+ ### Supported Resources
179
+
180
+ | Resource | Monitoring Documentation |
181
+ |----------|-------------------------|
182
+ | Virtual Machines | [VM Monitoring Guide](./src/azure-virtualmachine/README.md#monitoring) |
183
+ | AKS Clusters | [AKS Monitoring Guide](./src/azure-aks/README.md#monitoring) |
184
+ | Virtual Machine Scale Sets | [VMSS Monitoring Guide](./src/azure-vmss/README.md#monitoring) |
185
+ | Storage Accounts | [Storage Monitoring Guide](./src/azure-storageaccount/README.md#monitoring) |
186
+
187
+ See the [Monitoring Guide](./docs/monitoring-guide.md) for comprehensive documentation on monitoring capabilities, customization options, and best practices.
188
+
189
+ ## Networking Constructs
190
+
191
+ Build complete Azure networking infrastructure with type-safe constructs that provide automatic validation and version management.
192
+
193
+ ### Available Components
194
+
195
+ | Component | Documentation |
196
+ |-----------|--------------|
197
+ | [Virtual Networks](./src/azure-virtualnetwork/README.md) | Define address spaces and network isolation with custom DNS and DDoS protection |
198
+ | [Subnets](./src/azure-subnet/README.md) | Segment networks with service endpoints, delegations, and NSG association |
199
+ | [Network Interfaces](./src/azure-networkinterface/README.md) | Attach to VMs with static/dynamic IPs and accelerated networking |
200
+ | [Network Security Groups](./src/azure-networksecuritygroup/README.md) | Control traffic with inbound/outbound security rules |
201
+ | [Public IP Addresses](./src/azure-publicipaddress/README.md) | Expose resources with static/dynamic allocation |
202
+
203
+ See individual service documentation for detailed configuration examples and best practices.
204
+
205
+ ## Version-Specific Usage
206
+
207
+ You can use specific API versions for fine-grained control:
208
+
209
+ ```python
210
+ // Use latest version (recommended) - automatically resolves to newest API version
211
+ import { ResourceGroup } from "@microsoft/terraform-cdk-constructs/azure-resourcegroup";
212
+ import { StorageAccount } from "@microsoft/terraform-cdk-constructs/azure-storageaccount";
213
+
214
+ // Or specify explicit API version for version pinning
215
+ const rg = new ResourceGroup(this, "rg", {
216
+ name: "my-resource-group",
217
+ location: "eastus",
218
+ apiVersion: "2025-03-01" // Pin to specific version
219
+ });
220
+
221
+ const storage = new StorageAccount(this, "storage", {
222
+ name: "mystorageaccount",
223
+ location: "eastus",
224
+ resourceGroupId: rg.id,
225
+ sku: { name: "Standard_LRS" },
226
+ apiVersion: "2024-01-01" // Pin to specific version
227
+ });
228
+ ```
229
+
230
+ ## Migration from v0.x
231
+
232
+ If you're migrating from version 0.x (AzureRM-based), please see our [Versioning and Migrations User Guide](./docs/versioning-and-migrations-user-guide.md) for detailed instructions.
233
+
234
+ ## Deployment
235
+
236
+ Generate Terraform configuration:
237
+
238
+ ```sh
239
+ cdktf synth
240
+ ```
241
+
242
+ Deploy your infrastructure:
243
+
244
+ ```sh
245
+ cdktf deploy
246
+ ```
247
+
248
+ ## Supported Languages
249
+
250
+ Thanks to JSII, this library is available in multiple programming languages:
251
+
252
+ | Language | Package | Status |
253
+ |------------|---------|--------|
254
+ | TypeScript/JavaScript | [`@microsoft/terraform-cdk-constructs`](https://www.npmjs.com/package/@microsoft/terraform-cdk-constructs) | ✅ Available |
255
+ | Python | [`microsoft-cdktfconstructs`](https://pypi.org/project/microsoft-cdktfconstructs/) | ✅ Available |
256
+ | Java | [`com.microsoft.terraformcdkconstructs`](https://search.maven.org/artifact/com.microsoft.terraformcdkconstructs/cdktf-azure-constructs) | ✅ Available |
257
+ | C#/.NET | [`Microsoft.Cdktf.Azure.TFConstructs`](https://www.nuget.org/packages/Microsoft.Cdktf.Azure.TFConstructs) | ✅ Available |
258
+
259
+ ## Contributing
260
+
261
+ This project welcomes contributions and suggestions. Most contributions require you to agree to a
262
+ Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
263
+ the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
264
+
265
+ When you submit a pull request, a CLA bot will automatically determine whether you need to provide
266
+ a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
267
+ provided by the bot. You will only need to do this once across all repos using our CLA.
268
+
269
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
270
+ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
271
+ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
272
+
273
+ We welcome contributions to this project! See our documentation on [how to get started contributing](./CONTRIBUTING.md).
274
+
275
+ ## Documentation
276
+
277
+ * [Architecture Documentation](./docs/ARCHITECTURE.md) - High-level architecture and design patterns
278
+ * [Monitoring Guide](./docs/monitoring-guide.md) - Comprehensive monitoring and alerting documentation
279
+ * [Versioning and Migrations User Guide](./docs/versioning-and-migrations-user-guide.md) - API version management and migration guidance
280
+ * [Testing Guide](./docs/testing.md) - Testing practices and utilities
281
+ * [Design Guide](./docs/design_guide.md) - Module design guidelines
282
+ * [API Documentation](./API.md) - Complete API reference
283
+
284
+ ## Code Spaces
285
+
286
+ [![Open in GitHub Codespaces](https://img.shields.io/badge/Open%20in%20GitHub%20Codespaces-blue?logo=github)](https://github.com/Azure/terraform-cdk-constructs/codespaces)
287
+
288
+ ## Trademarks
289
+
290
+ This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
291
+ trademarks or logos is subject to and must follow
292
+ [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
293
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
294
+ Any use of third-party trademarks or logos are subject to those third-party's policies.
@@ -0,0 +1,267 @@
1
+ # Azure Terraform CDK Constructs
2
+
3
+ Welcome to the Azure Terraform CDK Constructs project! This library offers Azure L2 Constructs using the AZAPI provider for direct Azure REST API access, providing immediate access to new Azure features and API versions.
4
+
5
+ ## 🚀 Version 1.0.0 - AZAPI Provider Migration
6
+
7
+ **Breaking Change Notice:** Version 1.0.0 represents a major architectural shift from AzureRM provider to AZAPI provider. This migration provides:
8
+
9
+ * **Direct Azure REST API Access**: No dependency on AzureRM provider
10
+ * **Immediate Feature Access**: Get new Azure features as soon as they're available in Azure APIs
11
+ * **Version-Specific Implementations**: Multiple API versions supported for each service
12
+ * **Enhanced Type Safety**: Improved IDE support and compile-time validation
13
+ * **Included Provider Bindings**: AZAPI provider classes are included - no need to generate bindings
14
+
15
+ ## Benefits of Using AZAPI L2 Constructs
16
+
17
+ With AZAPI L2 Constructs, you get the following benefits:
18
+
19
+ * **Direct API Access**: Bypass provider limitations and access Azure REST APIs directly
20
+ * **Version Flexibility**: Choose specific API versions for your resources
21
+ * **Rapid Feature Adoption**: Access new Azure features immediately without waiting for provider updates
22
+ * **Enhanced Abstraction**: Higher-level abstractions over Azure resources with type safety
23
+ * **Built-in Monitoring**: One-line setup for comprehensive monitoring with customizable alerts and diagnostic settings
24
+ * **Schema Validation**: Automatic validation of properties against Azure API schemas
25
+ * **Reusability**: Encapsulate common patterns and best practices in your infrastructure code
26
+ * **Testing Utilities**: Helper functions for integration tests including naming conventions, metadata, and resource cleanup
27
+ * **Direct IDE Integration**: Access detailed documentation directly within your IDE
28
+ * **Zero Provider Setup**: AZAPI provider bindings included in the package
29
+
30
+ ## Currently Supported Services
31
+
32
+ ### Compute
33
+
34
+ | Service | API Versions | Monitoring Support | Status |
35
+ |---------|-------------|-------------------|--------|
36
+ | [Virtual Machines](./src/azure-virtualmachine/README.md) | 2024-07-01, 2024-11-01, 2025-04-01 | ✅ Built-in | ✅ Available |
37
+ | [AKS Clusters](./src/azure-aks/README.md) | 2025-05-01, 2025-07-01, 2025-08-01 | ✅ Built-in | ✅ Available |
38
+ | [Virtual Machine Scale Sets](./src/azure-vmss/README.md) | 2025-01-02, 2025-02-01, 2025-04-01 | ✅ Built-in | ✅ Available |
39
+
40
+ ### Networking
41
+
42
+ | Service | API Versions | Status |
43
+ |---------|-------------|--------|
44
+ | [Virtual Networks](./src/azure-virtualnetwork/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
45
+ | [Subnets](./src/azure-subnet/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
46
+ | [Network Interfaces](./src/azure-networkinterface/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
47
+ | [Network Security Groups](./src/azure-networksecuritygroup/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
48
+ | [Public IP Addresses](./src/azure-publicipaddress/README.md) | 2024-07-01, 2024-10-01, 2025-01-01 | ✅ Available |
49
+
50
+ ### Monitoring & Alerting
51
+
52
+ | Service | API Versions | Status |
53
+ |---------|-------------|--------|
54
+ | [Action Groups](./src/azure-actiongroup/README.md) | 2021-09-01 | ✅ Available |
55
+ | [Metric Alerts](./src/azure-metricalert/README.md) | 2018-03-01 | ✅ Available |
56
+ | [Activity Log Alerts](./src/azure-activitylogalert/README.md) | 2020-10-01 | ✅ Available |
57
+ | [Diagnostic Settings](./src/azure-diagnosticsettings/README.md) | 2016-09-01, 2021-05-01-preview | ✅ Available |
58
+
59
+ ### Foundation
60
+
61
+ | Service | API Versions | Status |
62
+ |---------|-------------|--------|
63
+ | [Resource Groups](./src/azure-resourcegroup/README.md) | 2024-11-01, 2025-01-01, 2025-03-01 | ✅ Available |
64
+ | [Storage Accounts](./src/azure-storageaccount/README.md) | 2023-01-01, 2023-05-01, 2024-01-01 | ✅ Available |
65
+
66
+ ## Quick Example
67
+
68
+ Create Azure resources using AZAPI provider:
69
+
70
+ ```python
71
+ import * as azcdk from "@microsoft/terraform-cdk-constructs";
72
+ import { Construct } from 'constructs';
73
+ import { App, TerraformStack } from 'cdktf';
74
+
75
+ class AzureAppInfra extends TerraformStack {
76
+ constructor(scope: Construct, name: string) {
77
+ super(scope, name);
78
+
79
+ // Create a new Azure Resource Group using AZAPI
80
+ const rg = new azcdk.azure_resourcegroup.ResourceGroup(this, "resourcegroup", {
81
+ name: "rg-myapp-prod",
82
+ location: "eastus",
83
+ tags: {
84
+ environment: "production",
85
+ project: "myapp"
86
+ }
87
+ });
88
+
89
+ // Create a Storage Account
90
+ new azcdk.azure_storageaccount.StorageAccount(this, "storage", {
91
+ name: "mystorageaccount",
92
+ location: "eastus",
93
+ resourceGroupId: rg.id,
94
+ sku: { name: "Standard_LRS" }
95
+ });
96
+ }
97
+ }
98
+
99
+ const app = new App();
100
+ new AzureAppInfra(app, 'cdk');
101
+ app.synth();
102
+ ```
103
+
104
+ ## Getting Started
105
+
106
+ ### Prerequisites
107
+
108
+ * Node.js and npm installed (for TypeScript/JavaScript)
109
+ * Azure CLI configured with appropriate permissions
110
+
111
+ ### Installation
112
+
113
+ Install the CDK for Terraform CLI globally:
114
+
115
+ ```sh
116
+ npm install -g cdktf-cli
117
+ ```
118
+
119
+ Initialize a new CDK for Terraform project:
120
+
121
+ ```sh
122
+ cdktf init --template="TypeScript" --local
123
+ ```
124
+
125
+ Install the Microsoft Terraform CDK constructs (includes AZAPI provider bindings):
126
+
127
+ ```sh
128
+ npm install @microsoft/terraform-cdk-constructs
129
+ ```
130
+
131
+ That's it! The AZAPI provider classes are included in the package, so you don't need to configure additional providers or generate bindings.
132
+
133
+ ## Built-in Monitoring & Alerting
134
+
135
+ Azure L2 Constructs include comprehensive monitoring capabilities that can be enabled with a single method call. The monitoring framework automatically creates metric alerts, diagnostic settings, and activity log alerts for supported resources.
136
+
137
+ ### Quick Example
138
+
139
+ ```python
140
+ import { VirtualMachine } from "@microsoft/terraform-cdk-constructs/azure-virtualmachine";
141
+ import { ActionGroup } from "@microsoft/terraform-cdk-constructs/azure-actiongroup";
142
+
143
+ // Enable monitoring with one line
144
+ const vm = new VirtualMachine(this, "vm", {
145
+ name: "my-vm",
146
+ // ... VM configuration ...
147
+ monitoring: VirtualMachine.defaultMonitoring(actionGroup.id, workspaceId),
148
+ });
149
+ ```
150
+
151
+ ### Supported Resources
152
+
153
+ | Resource | Monitoring Documentation |
154
+ |----------|-------------------------|
155
+ | Virtual Machines | [VM Monitoring Guide](./src/azure-virtualmachine/README.md#monitoring) |
156
+ | AKS Clusters | [AKS Monitoring Guide](./src/azure-aks/README.md#monitoring) |
157
+ | Virtual Machine Scale Sets | [VMSS Monitoring Guide](./src/azure-vmss/README.md#monitoring) |
158
+ | Storage Accounts | [Storage Monitoring Guide](./src/azure-storageaccount/README.md#monitoring) |
159
+
160
+ See the [Monitoring Guide](./docs/monitoring-guide.md) for comprehensive documentation on monitoring capabilities, customization options, and best practices.
161
+
162
+ ## Networking Constructs
163
+
164
+ Build complete Azure networking infrastructure with type-safe constructs that provide automatic validation and version management.
165
+
166
+ ### Available Components
167
+
168
+ | Component | Documentation |
169
+ |-----------|--------------|
170
+ | [Virtual Networks](./src/azure-virtualnetwork/README.md) | Define address spaces and network isolation with custom DNS and DDoS protection |
171
+ | [Subnets](./src/azure-subnet/README.md) | Segment networks with service endpoints, delegations, and NSG association |
172
+ | [Network Interfaces](./src/azure-networkinterface/README.md) | Attach to VMs with static/dynamic IPs and accelerated networking |
173
+ | [Network Security Groups](./src/azure-networksecuritygroup/README.md) | Control traffic with inbound/outbound security rules |
174
+ | [Public IP Addresses](./src/azure-publicipaddress/README.md) | Expose resources with static/dynamic allocation |
175
+
176
+ See individual service documentation for detailed configuration examples and best practices.
177
+
178
+ ## Version-Specific Usage
179
+
180
+ You can use specific API versions for fine-grained control:
181
+
182
+ ```python
183
+ // Use latest version (recommended) - automatically resolves to newest API version
184
+ import { ResourceGroup } from "@microsoft/terraform-cdk-constructs/azure-resourcegroup";
185
+ import { StorageAccount } from "@microsoft/terraform-cdk-constructs/azure-storageaccount";
186
+
187
+ // Or specify explicit API version for version pinning
188
+ const rg = new ResourceGroup(this, "rg", {
189
+ name: "my-resource-group",
190
+ location: "eastus",
191
+ apiVersion: "2025-03-01" // Pin to specific version
192
+ });
193
+
194
+ const storage = new StorageAccount(this, "storage", {
195
+ name: "mystorageaccount",
196
+ location: "eastus",
197
+ resourceGroupId: rg.id,
198
+ sku: { name: "Standard_LRS" },
199
+ apiVersion: "2024-01-01" // Pin to specific version
200
+ });
201
+ ```
202
+
203
+ ## Migration from v0.x
204
+
205
+ If you're migrating from version 0.x (AzureRM-based), please see our [Versioning and Migrations User Guide](./docs/versioning-and-migrations-user-guide.md) for detailed instructions.
206
+
207
+ ## Deployment
208
+
209
+ Generate Terraform configuration:
210
+
211
+ ```sh
212
+ cdktf synth
213
+ ```
214
+
215
+ Deploy your infrastructure:
216
+
217
+ ```sh
218
+ cdktf deploy
219
+ ```
220
+
221
+ ## Supported Languages
222
+
223
+ Thanks to JSII, this library is available in multiple programming languages:
224
+
225
+ | Language | Package | Status |
226
+ |------------|---------|--------|
227
+ | TypeScript/JavaScript | [`@microsoft/terraform-cdk-constructs`](https://www.npmjs.com/package/@microsoft/terraform-cdk-constructs) | ✅ Available |
228
+ | Python | [`microsoft-cdktfconstructs`](https://pypi.org/project/microsoft-cdktfconstructs/) | ✅ Available |
229
+ | Java | [`com.microsoft.terraformcdkconstructs`](https://search.maven.org/artifact/com.microsoft.terraformcdkconstructs/cdktf-azure-constructs) | ✅ Available |
230
+ | C#/.NET | [`Microsoft.Cdktf.Azure.TFConstructs`](https://www.nuget.org/packages/Microsoft.Cdktf.Azure.TFConstructs) | ✅ Available |
231
+
232
+ ## Contributing
233
+
234
+ This project welcomes contributions and suggestions. Most contributions require you to agree to a
235
+ Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
236
+ the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
237
+
238
+ When you submit a pull request, a CLA bot will automatically determine whether you need to provide
239
+ a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
240
+ provided by the bot. You will only need to do this once across all repos using our CLA.
241
+
242
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
243
+ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
244
+ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
245
+
246
+ We welcome contributions to this project! See our documentation on [how to get started contributing](./CONTRIBUTING.md).
247
+
248
+ ## Documentation
249
+
250
+ * [Architecture Documentation](./docs/ARCHITECTURE.md) - High-level architecture and design patterns
251
+ * [Monitoring Guide](./docs/monitoring-guide.md) - Comprehensive monitoring and alerting documentation
252
+ * [Versioning and Migrations User Guide](./docs/versioning-and-migrations-user-guide.md) - API version management and migration guidance
253
+ * [Testing Guide](./docs/testing.md) - Testing practices and utilities
254
+ * [Design Guide](./docs/design_guide.md) - Module design guidelines
255
+ * [API Documentation](./API.md) - Complete API reference
256
+
257
+ ## Code Spaces
258
+
259
+ [![Open in GitHub Codespaces](https://img.shields.io/badge/Open%20in%20GitHub%20Codespaces-blue?logo=github)](https://github.com/Azure/terraform-cdk-constructs/codespaces)
260
+
261
+ ## Trademarks
262
+
263
+ This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
264
+ trademarks or logos is subject to and must follow
265
+ [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
266
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
267
+ Any use of third-party trademarks or logos are subject to those third-party's policies.
@@ -1,9 +1,9 @@
1
1
  [build-system]
2
- requires = ["setuptools~=67.3.2", "wheel~=0.42"]
2
+ requires = ["setuptools~=75.3.2", "build~=1.3.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [tool.pyright]
6
6
  defineConstant = { DEBUG = true }
7
- pythonVersion = "3.8"
7
+ pythonVersion = "3.9"
8
8
  pythonPlatform = "All"
9
9
  reportSelfClsParameterName = false
@@ -5,8 +5,8 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "microsoft-cdktfconstructs",
8
- "version": "0.0.3.dev12",
9
- "description": "A collection of CDK modules for provisioning and managing Terraform resources efficiently.",
8
+ "version": "1.2.0",
9
+ "description": "Azure CDK constructs using AZAPI provider for direct Azure REST API access. Version 1.0.0 - Major breaking change migration from AzureRM to AZAPI.",
10
10
  "license": "MIT",
11
11
  "url": "https://github.com/azure/terraform-cdk-constructs.git",
12
12
  "long_description_content_type": "text/markdown",
@@ -23,48 +23,44 @@ kwargs = json.loads(
23
23
  "packages": [
24
24
  "microsoft_cdktfconstructs",
25
25
  "microsoft_cdktfconstructs._jsii",
26
- "microsoft_cdktfconstructs.azure_applicationgateway",
27
- "microsoft_cdktfconstructs.azure_applicationinsights",
28
- "microsoft_cdktfconstructs.azure_containerregistry",
29
- "microsoft_cdktfconstructs.azure_eventhub",
30
- "microsoft_cdktfconstructs.azure_functionapp",
31
- "microsoft_cdktfconstructs.azure_keyvault",
32
- "microsoft_cdktfconstructs.azure_kubernetes",
33
- "microsoft_cdktfconstructs.azure_kusto",
34
- "microsoft_cdktfconstructs.azure_loganalytics",
26
+ "microsoft_cdktfconstructs.azure_actiongroup",
27
+ "microsoft_cdktfconstructs.azure_activitylogalert",
28
+ "microsoft_cdktfconstructs.azure_aks",
29
+ "microsoft_cdktfconstructs.azure_diagnosticsettings",
35
30
  "microsoft_cdktfconstructs.azure_metricalert",
31
+ "microsoft_cdktfconstructs.azure_networkinterface",
36
32
  "microsoft_cdktfconstructs.azure_networksecuritygroup",
37
- "microsoft_cdktfconstructs.azure_queryrulealert",
33
+ "microsoft_cdktfconstructs.azure_publicipaddress",
38
34
  "microsoft_cdktfconstructs.azure_resourcegroup",
39
35
  "microsoft_cdktfconstructs.azure_storageaccount",
36
+ "microsoft_cdktfconstructs.azure_subnet",
40
37
  "microsoft_cdktfconstructs.azure_virtualmachine",
41
- "microsoft_cdktfconstructs.azure_virtualmachinescaleset",
42
38
  "microsoft_cdktfconstructs.azure_virtualnetwork",
43
- "microsoft_cdktfconstructs.core_azure"
39
+ "microsoft_cdktfconstructs.azure_vmss",
40
+ "microsoft_cdktfconstructs.core_azure",
41
+ "microsoft_cdktfconstructs.testing"
44
42
  ],
45
43
  "package_data": {
46
44
  "microsoft_cdktfconstructs._jsii": [
47
- "terraform-cdk-constructs@0.0.3-pre.12.jsii.tgz"
45
+ "terraform-cdk-constructs@1.2.0.jsii.tgz"
48
46
  ],
49
47
  "microsoft_cdktfconstructs": [
50
48
  "py.typed"
51
49
  ]
52
50
  },
53
- "python_requires": "~=3.8",
51
+ "python_requires": "~=3.9",
54
52
  "install_requires": [
55
- "cdktf-cdktf-provider-azurerm==9.0.8",
56
- "cdktf==0.17.3",
57
- "constructs>=10.1.106, <11.0.0",
58
- "jsii>=1.98.0, <2.0.0",
53
+ "cdktf==0.20.8",
54
+ "constructs>=10.3.0, <11.0.0",
55
+ "jsii>=1.117.0, <2.0.0",
59
56
  "publication>=0.0.3",
60
- "typeguard~=2.13.3"
57
+ "typeguard>=2.13.3,<4.3.0"
61
58
  ],
62
59
  "classifiers": [
63
60
  "Intended Audience :: Developers",
64
61
  "Operating System :: OS Independent",
65
62
  "Programming Language :: JavaScript",
66
63
  "Programming Language :: Python :: 3 :: Only",
67
- "Programming Language :: Python :: 3.8",
68
64
  "Programming Language :: Python :: 3.9",
69
65
  "Programming Language :: Python :: 3.10",
70
66
  "Programming Language :: Python :: 3.11",