microsoft-cdktfconstructs 0.0.3.dev11__py3-none-any.whl

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 (27) hide show
  1. microsoft_cdktfconstructs/__init__.py +217 -0
  2. microsoft_cdktfconstructs/_jsii/__init__.py +31 -0
  3. microsoft_cdktfconstructs/_jsii/terraform-cdk-constructs@0.0.3-pre.11.jsii.tgz +0 -0
  4. microsoft_cdktfconstructs/azure_applicationgateway/__init__.py +823 -0
  5. microsoft_cdktfconstructs/azure_applicationinsights/__init__.py +397 -0
  6. microsoft_cdktfconstructs/azure_containerregistry/__init__.py +320 -0
  7. microsoft_cdktfconstructs/azure_eventhub/__init__.py +2213 -0
  8. microsoft_cdktfconstructs/azure_functionapp/__init__.py +908 -0
  9. microsoft_cdktfconstructs/azure_keyvault/__init__.py +1982 -0
  10. microsoft_cdktfconstructs/azure_kubernetes/__init__.py +400 -0
  11. microsoft_cdktfconstructs/azure_kusto/__init__.py +2485 -0
  12. microsoft_cdktfconstructs/azure_loganalytics/__init__.py +652 -0
  13. microsoft_cdktfconstructs/azure_metricalert/__init__.py +1260 -0
  14. microsoft_cdktfconstructs/azure_networksecuritygroup/__init__.py +1742 -0
  15. microsoft_cdktfconstructs/azure_queryrulealert/__init__.py +1189 -0
  16. microsoft_cdktfconstructs/azure_resourcegroup/__init__.py +320 -0
  17. microsoft_cdktfconstructs/azure_storageaccount/__init__.py +1910 -0
  18. microsoft_cdktfconstructs/azure_virtualmachine/__init__.py +1460 -0
  19. microsoft_cdktfconstructs/azure_virtualmachinescaleset/__init__.py +1185 -0
  20. microsoft_cdktfconstructs/azure_virtualnetwork/__init__.py +707 -0
  21. microsoft_cdktfconstructs/core_azure/__init__.py +931 -0
  22. microsoft_cdktfconstructs/py.typed +1 -0
  23. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/LICENSE +19 -0
  24. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/METADATA +188 -0
  25. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/RECORD +27 -0
  26. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/WHEEL +5 -0
  27. microsoft_cdktfconstructs-0.0.3.dev11.dist-info/top_level.txt +1 -0
@@ -0,0 +1,217 @@
1
+ '''
2
+ # Azure Terraform CDK Constructs
3
+
4
+ Welcome to the Azure Terraform CDK Constructs project! This library offers a comprehensive suite of L2 Constructs designed to simplify and enhance the experience of building and managing Azure infrastructure with the Cloud Development Kit for Terraform (CDKTF).
5
+
6
+ ## Benefits of Using L2 Constructs
7
+
8
+ With L2 Constructs, you get the following benefits:
9
+
10
+ * **Abstraction**: Higher-level abstractions over Azure resources make your infrastructure code more declarative and easier to understand.
11
+ * **Reusability**: Encapsulate common patterns and best practices in your infrastructure code, promoting reusability across different projects and teams.
12
+ * **Rapid Development**: Accelerate your cloud development process with pre-built constructs that have been tested for common use cases, allowing you to focus on your unique application logic.
13
+ * **Direct IDE Integration**: Access detailed documentation directly within your Integrated Development Environment (IDE), streamlining your development workflow: ![alt text](./docs/images/ide-documentation.png)
14
+
15
+ ## Quick Example
16
+
17
+ This is a quick example that showcases the simplicity and power of L2 Constructs. We'll create a storage account, add a container to it, and then upload a blob—all with a few lines of intuitive, object-oriented code:
18
+
19
+ ```python
20
+
21
+ // Create a new instance of a storage account as an object
22
+ const sa = new azcdk.azure_storageaccount.Account(stack, "storageaccount", {
23
+ name: "testStorageAccount",
24
+ location: "eastus",
25
+ });
26
+
27
+ // Add a container to the storage account by calling a method on the storage account object
28
+ const container = sa.addContainer("testcontainer");
29
+
30
+ // Add a blob to the container by calling a method on the container object
31
+ // The path "../../../test.txt" points to the source file to be uploaded as a blob
32
+ container.addBlob("testblob.txt", "../../../test.txt");
33
+ ```
34
+
35
+ ## Getting Started
36
+
37
+ This guide will walk you through the process of using the Azure L2 Constructs to define and provision infrastructure on Azure.
38
+
39
+ ### Prerequisites
40
+
41
+ Make sure you have Node.js and npm installed on your machine. These will be used to install the CDK for Terraform and Azure provider packages.
42
+
43
+ ### Installation
44
+
45
+ First, install the CDK for Terraform CLI globally using npm:
46
+
47
+ ```sh
48
+ npm install -g cdktf-cli
49
+ ```
50
+
51
+ Next, initialize a new CDK for Terraform project with TypeScript template:
52
+
53
+ ```sh
54
+ cdktf init --template="TypeScript" --local
55
+ ```
56
+
57
+ Install the AzureRM provider for CDKTF:
58
+
59
+ ```sh
60
+ npm install @cdktf/provider-azurerm
61
+ ```
62
+
63
+ Then, add the Microsoft Terraform CDK constructs for Azure:
64
+
65
+ ```sh
66
+ npm install @micrsoft/terraform-cdk-constructs
67
+
68
+ ```
69
+
70
+ ### Example 1: Creating a Storage Account
71
+
72
+ Now let's create a simple Azure storage account. The following TypeScript snippet defines a storage account resource using the CDKTF:
73
+
74
+ ```python
75
+ // Import necessary modules and classes
76
+ import * as azcdk from "@microsoft/terraform-cdk-constructs";
77
+ import { Construct } from 'constructs';
78
+ import { App, TerraformStack } from 'cdktf';
79
+ import { AzurermProvider } from "@cdktf/provider-azurerm/lib/provider";
80
+
81
+ // Define a new Terraform stack
82
+ class AzureAppInfra extends TerraformStack {
83
+ constructor(scope: Construct, name: string) {
84
+ super(scope, name);
85
+
86
+ // Initialize Azure provider
87
+ new AzurermProvider(this, "azureFeature", { features: {} });
88
+
89
+ // Create a new Azure storage account with the specified name and location
90
+ new azcdk.azure_storageaccount.Account(this, "storageaccount", {
91
+ name: "test42348808",
92
+ location: "eastus",
93
+ });
94
+ }
95
+ }
96
+
97
+ // Initialize the CDK app and synthesize Terraform configurations
98
+ const app = new App();
99
+ new AzureAppInfra(app, 'cdk');
100
+ app.synth();
101
+ ```
102
+
103
+ After defining your infrastructure, generate the Terraform configuration files:
104
+
105
+ ```sh
106
+ cdktf synth
107
+ ```
108
+
109
+ Finally, deploy your infrastructure to Azure:
110
+
111
+ ```sh
112
+ cdktf deploy
113
+ ```
114
+
115
+ ## Supported Languages
116
+
117
+ Currently, our CDK L2 constructs are available in the following languages:
118
+
119
+ | Language | Status |
120
+ |------------|--------------|
121
+ | TypeScript | Available |
122
+ | Python | Coming soon |
123
+ | Java | Coming soon |
124
+ | Go | Coming soon |
125
+ | C# | Coming soon |
126
+
127
+ Stay tuned for updates as we work to expand support to other popular programming languages!
128
+
129
+ ## Contributing
130
+
131
+ This project welcomes contributions and suggestions. Most contributions require you to agree to a
132
+ Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
133
+ the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
134
+
135
+ When you submit a pull request, a CLA bot will automatically determine whether you need to provide
136
+ a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
137
+ provided by the bot. You will only need to do this once across all repos using our CLA.
138
+
139
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
140
+ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
141
+ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
142
+
143
+ We welcome contributions to this project! See our documentation on [how to get started contributing](./docs/CONTRIBUTING.md).
144
+
145
+ ## Code Spaces
146
+
147
+ To open this repository in a Code Space, click the button below:
148
+
149
+ [![Open in Code Spaces](https://img.shields.io/badge/Open%20in%20Code%20Spaces-Terraform%20Azure%20CDK%20Modules%20Project-blue?logo=github)](https://github.com/microsoft/terraform-azure-cdk-modules/codespaces)
150
+
151
+ ## Trademarks
152
+
153
+ This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
154
+ trademarks or logos is subject to and must follow
155
+ [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
156
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
157
+ Any use of third-party trademarks or logos are subject to those third-party's policies.
158
+ '''
159
+ from pkgutil import extend_path
160
+ __path__ = extend_path(__path__, __name__)
161
+
162
+ import abc
163
+ import builtins
164
+ import datetime
165
+ import enum
166
+ import typing
167
+
168
+ import jsii
169
+ import publication
170
+ import typing_extensions
171
+
172
+ from typeguard import check_type
173
+
174
+ from ._jsii import *
175
+
176
+ __all__ = [
177
+ "azure_applicationgateway",
178
+ "azure_applicationinsights",
179
+ "azure_containerregistry",
180
+ "azure_eventhub",
181
+ "azure_functionapp",
182
+ "azure_keyvault",
183
+ "azure_kubernetes",
184
+ "azure_kusto",
185
+ "azure_loganalytics",
186
+ "azure_metricalert",
187
+ "azure_networksecuritygroup",
188
+ "azure_queryrulealert",
189
+ "azure_resourcegroup",
190
+ "azure_storageaccount",
191
+ "azure_virtualmachine",
192
+ "azure_virtualmachinescaleset",
193
+ "azure_virtualnetwork",
194
+ "core_azure",
195
+ ]
196
+
197
+ publication.publish()
198
+
199
+ # Loading modules to ensure their types are registered with the jsii runtime library
200
+ from . import azure_applicationgateway
201
+ from . import azure_applicationinsights
202
+ from . import azure_containerregistry
203
+ from . import azure_eventhub
204
+ from . import azure_functionapp
205
+ from . import azure_keyvault
206
+ from . import azure_kubernetes
207
+ from . import azure_kusto
208
+ from . import azure_loganalytics
209
+ from . import azure_metricalert
210
+ from . import azure_networksecuritygroup
211
+ from . import azure_queryrulealert
212
+ from . import azure_resourcegroup
213
+ from . import azure_storageaccount
214
+ from . import azure_virtualmachine
215
+ from . import azure_virtualmachinescaleset
216
+ from . import azure_virtualnetwork
217
+ from . import core_azure
@@ -0,0 +1,31 @@
1
+ from pkgutil import extend_path
2
+ __path__ = extend_path(__path__, __name__)
3
+
4
+ import abc
5
+ import builtins
6
+ import datetime
7
+ import enum
8
+ import typing
9
+
10
+ import jsii
11
+ import publication
12
+ import typing_extensions
13
+
14
+ from typeguard import check_type
15
+
16
+ import cdktf._jsii
17
+ import cdktf_cdktf_provider_azurerm._jsii
18
+ import constructs._jsii
19
+
20
+ __jsii_assembly__ = jsii.JSIIAssembly.load(
21
+ "@microsoft/terraform-cdk-constructs",
22
+ "0.0.3-pre.11",
23
+ __name__[0:-6],
24
+ "terraform-cdk-constructs@0.0.3-pre.11.jsii.tgz",
25
+ )
26
+
27
+ __all__ = [
28
+ "__jsii_assembly__",
29
+ ]
30
+
31
+ publication.publish()