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.
- microsoft_cdktfconstructs/__init__.py +217 -0
- microsoft_cdktfconstructs/_jsii/__init__.py +31 -0
- microsoft_cdktfconstructs/_jsii/terraform-cdk-constructs@0.0.3-pre.11.jsii.tgz +0 -0
- microsoft_cdktfconstructs/azure_applicationgateway/__init__.py +823 -0
- microsoft_cdktfconstructs/azure_applicationinsights/__init__.py +397 -0
- microsoft_cdktfconstructs/azure_containerregistry/__init__.py +320 -0
- microsoft_cdktfconstructs/azure_eventhub/__init__.py +2213 -0
- microsoft_cdktfconstructs/azure_functionapp/__init__.py +908 -0
- microsoft_cdktfconstructs/azure_keyvault/__init__.py +1982 -0
- microsoft_cdktfconstructs/azure_kubernetes/__init__.py +400 -0
- microsoft_cdktfconstructs/azure_kusto/__init__.py +2485 -0
- microsoft_cdktfconstructs/azure_loganalytics/__init__.py +652 -0
- microsoft_cdktfconstructs/azure_metricalert/__init__.py +1260 -0
- microsoft_cdktfconstructs/azure_networksecuritygroup/__init__.py +1742 -0
- microsoft_cdktfconstructs/azure_queryrulealert/__init__.py +1189 -0
- microsoft_cdktfconstructs/azure_resourcegroup/__init__.py +320 -0
- microsoft_cdktfconstructs/azure_storageaccount/__init__.py +1910 -0
- microsoft_cdktfconstructs/azure_virtualmachine/__init__.py +1460 -0
- microsoft_cdktfconstructs/azure_virtualmachinescaleset/__init__.py +1185 -0
- microsoft_cdktfconstructs/azure_virtualnetwork/__init__.py +707 -0
- microsoft_cdktfconstructs/core_azure/__init__.py +931 -0
- microsoft_cdktfconstructs/py.typed +1 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/LICENSE +19 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/METADATA +188 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/RECORD +27 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/WHEEL +5 -0
- microsoft_cdktfconstructs-0.0.3.dev11.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,908 @@
|
|
|
1
|
+
'''
|
|
2
|
+
# Azure Linux Function App Construct
|
|
3
|
+
|
|
4
|
+
This document provides an overview of the Azure Linux Function App construct, along with best practices for deployment and use.
|
|
5
|
+
|
|
6
|
+
## What is Azure Linux Function App?
|
|
7
|
+
|
|
8
|
+
Azure Linux Function App is a serverless compute service that enables you to run code without explicitly provisioning or managing infrastructure. It supports different programming languages and integrates with Azure services and other external services.
|
|
9
|
+
|
|
10
|
+
### Hosting Plans for Azure Linux Function App
|
|
11
|
+
|
|
12
|
+
Azure Linux Function App offers three hosting plans:
|
|
13
|
+
|
|
14
|
+
**Consumption Plan**: Automatically scales based on demand and is billed per execution. It's suitable for event-driven and intermittent workloads.
|
|
15
|
+
|
|
16
|
+
**Premium Plan**: Offers more CPU and memory than the Consumption Plan and includes features like VNet connectivity. It's suitable for more demanding, consistent workloads.
|
|
17
|
+
|
|
18
|
+
**Dedicated (App Service) Plan**: Provides dedicated resources for your functions, ideal for large-scale, continuous workloads.
|
|
19
|
+
|
|
20
|
+
#### When to Use Each Plan
|
|
21
|
+
|
|
22
|
+
**Consumption Plan**: Ideal for small, event-driven functions. Use when you expect irregular traffic and want to pay only for the compute time you use.
|
|
23
|
+
|
|
24
|
+
**Premium Plan**: Best for medium to large functions requiring more consistent performance and advanced features like VNet.
|
|
25
|
+
|
|
26
|
+
**App Service Plan**: Suited for enterprise-level applications that require constant, high-scale performance.
|
|
27
|
+
|
|
28
|
+
### Azure Service Plan SKUs Enum
|
|
29
|
+
|
|
30
|
+
The `ServicePlanSkus` enum provides various options for Azure Service Plans, ranging from Consumption to Isolated Plans. Each option caters to different scalability, performance, and cost requirements.
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
By default a consumption plan Azure Function will be created. If `storageaccount`, `servicePlanId`, and `resourceGroupName` inputs are not configured, these resources will be automatically created and named after the
|
|
35
|
+
|
|
36
|
+
**Function App**
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
new AzureLinuxFunctionApp(this, 'DefaultFA', {
|
|
40
|
+
name: `MyDefaultFA`,
|
|
41
|
+
location: 'eastus',
|
|
42
|
+
tags: {
|
|
43
|
+
"test": "test"
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Consumption Plan**
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
new AzureLinuxFunctionApp(this, 'ConsumptionFA', {
|
|
52
|
+
name: `MyConsumptionFA`,
|
|
53
|
+
location: 'eastus',
|
|
54
|
+
storageAccount: storageAccount,
|
|
55
|
+
servicePlan: servicePlan,
|
|
56
|
+
resourceGroup: resourceGroup,
|
|
57
|
+
runtimeVersion: {
|
|
58
|
+
pythonVersion: '3.8',
|
|
59
|
+
},
|
|
60
|
+
siteConfig: {
|
|
61
|
+
cors: {
|
|
62
|
+
allowedOrigins: ['*'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
tags: {
|
|
66
|
+
"test": "test"
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Premium Function**
|
|
72
|
+
|
|
73
|
+
To deploy Premium Functions, use the premium SKU type. The `ServicePlanSkus` can be used to easily select available SKUs:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
import { ServicePlanSkus } from '../serviceplanskus';
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
new AzureLinuxFunctionApp(this, 'PremiumFA', {
|
|
80
|
+
name: `MyPremiumFA`,
|
|
81
|
+
location: 'eastus',
|
|
82
|
+
servicePlanSku: ServicePlanSkus.PremiumEP1,
|
|
83
|
+
runtimeVersion: {
|
|
84
|
+
dotnetVersion: '5.0',
|
|
85
|
+
},
|
|
86
|
+
tags: {
|
|
87
|
+
"test": "test"
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
To deploy Premium Functions, use the premium SKU type. The `ServicePlanSkus` can be used to easily select available SKUs:
|
|
93
|
+
|
|
94
|
+
**Dedicated App Service Plan**
|
|
95
|
+
|
|
96
|
+
To deploy Premium Functions, use the premium SKU type. The `ServicePlanSkus` can be used to easily select available SKUs:
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
new AzureLinuxFunctionApp(this, 'ServicePlanFA', {
|
|
100
|
+
name: `MyServicePlanFA`,
|
|
101
|
+
location: 'eastus',
|
|
102
|
+
servicePlanSku: ServicePlanSkus.ASPBasicB1,
|
|
103
|
+
runtimeVersion: {
|
|
104
|
+
pythonVersion: '3.8',
|
|
105
|
+
},
|
|
106
|
+
siteConfig: {
|
|
107
|
+
cors: {
|
|
108
|
+
allowedOrigins: ['*'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
tags: {
|
|
112
|
+
"test": "test"
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Best Practices for Azure Linux Function App
|
|
118
|
+
|
|
119
|
+
Choose the Right Hosting Plan: Select a plan based on your function's performance, reliability, and cost needs.
|
|
120
|
+
|
|
121
|
+
Configure Storage Correctly: Ensure the storage account is in the same region as your function app and use separate accounts for different apps for improved performance.
|
|
122
|
+
|
|
123
|
+
Optimize Deployments: Use the "run from package" approach and consider continuous deployment for reliability.
|
|
124
|
+
|
|
125
|
+
Write Robust Functions: Design functions to be stateless, handle large data sets efficiently, and avoid long-running executions.
|
|
126
|
+
|
|
127
|
+
Consider Concurrency: Understand your function app’s response to load and configure triggers appropriately for scalability.
|
|
128
|
+
|
|
129
|
+
Plan for Connections: Optimize outbound connections to adhere to the plan’s connection limits.
|
|
130
|
+
|
|
131
|
+
Monitor Effectively: Use Azure Application Insights and Azure Monitor for comprehensive monitoring of your functions.
|
|
132
|
+
|
|
133
|
+
Build in Redundancy: Employ a multi-regional approach for high availability and disaster recovery.
|
|
134
|
+
'''
|
|
135
|
+
from pkgutil import extend_path
|
|
136
|
+
__path__ = extend_path(__path__, __name__)
|
|
137
|
+
|
|
138
|
+
import abc
|
|
139
|
+
import builtins
|
|
140
|
+
import datetime
|
|
141
|
+
import enum
|
|
142
|
+
import typing
|
|
143
|
+
|
|
144
|
+
import jsii
|
|
145
|
+
import publication
|
|
146
|
+
import typing_extensions
|
|
147
|
+
|
|
148
|
+
from typeguard import check_type
|
|
149
|
+
|
|
150
|
+
from .._jsii import *
|
|
151
|
+
|
|
152
|
+
import cdktf_cdktf_provider_azurerm.linux_function_app as _cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf
|
|
153
|
+
import cdktf_cdktf_provider_azurerm.resource_group as _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf
|
|
154
|
+
import cdktf_cdktf_provider_azurerm.service_plan as _cdktf_cdktf_provider_azurerm_service_plan_92bbcedf
|
|
155
|
+
import cdktf_cdktf_provider_azurerm.storage_account as _cdktf_cdktf_provider_azurerm_storage_account_92bbcedf
|
|
156
|
+
import constructs as _constructs_77d1e7e8
|
|
157
|
+
from ..core_azure import AzureResource as _AzureResource_74eec1c4
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
class FunctionAppLinux(
|
|
161
|
+
_AzureResource_74eec1c4,
|
|
162
|
+
metaclass=jsii.JSIIMeta,
|
|
163
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_functionapp.FunctionAppLinux",
|
|
164
|
+
):
|
|
165
|
+
def __init__(
|
|
166
|
+
self,
|
|
167
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
168
|
+
id: builtins.str,
|
|
169
|
+
*,
|
|
170
|
+
location: builtins.str,
|
|
171
|
+
name: builtins.str,
|
|
172
|
+
app_settings: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
173
|
+
auth_settings: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettings, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
174
|
+
auth_settings_v2: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettingsV2, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
175
|
+
builtin_logging_enabled: typing.Optional[builtins.bool] = None,
|
|
176
|
+
client_certificate_enabled: typing.Optional[builtins.bool] = None,
|
|
177
|
+
client_certificate_exclusion_paths: typing.Optional[builtins.str] = None,
|
|
178
|
+
client_certificate_mode: typing.Optional[builtins.str] = None,
|
|
179
|
+
connection_string: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppConnectionString, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
180
|
+
enabled: typing.Optional[builtins.bool] = None,
|
|
181
|
+
functions_extension_version: typing.Optional[builtins.str] = None,
|
|
182
|
+
https_only: typing.Optional[builtins.bool] = None,
|
|
183
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
184
|
+
public_network_access_enabled: typing.Optional[builtins.bool] = None,
|
|
185
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
186
|
+
runtime_version: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfigApplicationStack, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
187
|
+
service_plan: typing.Optional[_cdktf_cdktf_provider_azurerm_service_plan_92bbcedf.ServicePlan] = None,
|
|
188
|
+
service_plan_app_service_environment_id: typing.Optional[builtins.str] = None,
|
|
189
|
+
service_plan_maximum_elastic_worker_count: typing.Optional[jsii.Number] = None,
|
|
190
|
+
service_plan_per_site_scaling_enabled: typing.Optional[builtins.bool] = None,
|
|
191
|
+
service_plan_sku: typing.Optional[builtins.str] = None,
|
|
192
|
+
service_plan_worker_count: typing.Optional[jsii.Number] = None,
|
|
193
|
+
service_plan_zone_balancing_enabled: typing.Optional[builtins.bool] = None,
|
|
194
|
+
site_config: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
195
|
+
storage_account: typing.Optional[_cdktf_cdktf_provider_azurerm_storage_account_92bbcedf.StorageAccount] = None,
|
|
196
|
+
storage_account_access_key: typing.Optional[builtins.str] = None,
|
|
197
|
+
storage_uses_managed_identity: typing.Optional[builtins.bool] = None,
|
|
198
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
199
|
+
virtual_network_subnet_id: typing.Optional[builtins.str] = None,
|
|
200
|
+
zip_deploy_file: typing.Optional[builtins.str] = None,
|
|
201
|
+
) -> None:
|
|
202
|
+
'''Constructs a new FunctionAppLinux.
|
|
203
|
+
|
|
204
|
+
:param scope: - The scope in which to define this construct.
|
|
205
|
+
:param id: - The ID of this construct.
|
|
206
|
+
:param location: The Azure Region where the Function App will be deployed, e.g., 'East US', 'West Europe'.
|
|
207
|
+
:param name: The name of the Function App. This name must be unique within Azure.
|
|
208
|
+
:param app_settings: Application settings for the Azure Function App.
|
|
209
|
+
:param auth_settings: Optional authentication settings for the Function App.
|
|
210
|
+
:param auth_settings_v2: Optional advanced version of authentication settings for the Function App.
|
|
211
|
+
:param builtin_logging_enabled: Optional flag to enable built-in logging capabilities.
|
|
212
|
+
:param client_certificate_enabled: Optional flag to enable client certificate authentication.
|
|
213
|
+
:param client_certificate_exclusion_paths: Optional paths that are excluded from client certificate authentication.
|
|
214
|
+
:param client_certificate_mode: Optional mode for client certificate requirement (e.g., 'Required', 'Optional').
|
|
215
|
+
:param connection_string: Optional connection string for external services or databases.
|
|
216
|
+
:param enabled: Optional flag to enable or disable the Function App.
|
|
217
|
+
:param functions_extension_version: Optional version setting for the Azure Functions runtime.
|
|
218
|
+
:param https_only: Optional flag to enforce HTTPS only traffic.
|
|
219
|
+
:param identity: Optional identity configuration for the Function App, for use in Managed Service Identity scenarios.
|
|
220
|
+
:param public_network_access_enabled: Optional flag to enable or disable public network access to the Function App.
|
|
221
|
+
:param resource_group: An optional reference to the resource group in which to deploy the Function App. If not provided, the Function App will be deployed in the default resource group.
|
|
222
|
+
:param runtime_version: Optional runtime version specification for the Function App, such as Node.js, .NET, or Java version.
|
|
223
|
+
:param service_plan: Optional ID of an existing App Service Plan to host the Function App. If not provided, a new plan will be created.
|
|
224
|
+
:param service_plan_app_service_environment_id: Optional ID for the App Service Environment to be used by the service plan.
|
|
225
|
+
:param service_plan_maximum_elastic_worker_count: Optional maximum count of elastic workers for the App Service Plan.
|
|
226
|
+
:param service_plan_per_site_scaling_enabled: Optional flag to enable per-site scaling for the App Service Plan.
|
|
227
|
+
:param service_plan_sku: Optional SKU for the App Service Plan, defines the pricing tier and capabilities.
|
|
228
|
+
:param service_plan_worker_count: Optional worker count for the App Service Plan.
|
|
229
|
+
:param service_plan_zone_balancing_enabled: Optional flag to enable zone balancing for the App Service Plan.
|
|
230
|
+
:param site_config: Optional site configuration for additional settings like environment variables, and connection strings.
|
|
231
|
+
:param storage_account: An optional reference to the storage account to be used by the Function App. If not provided, a new storage account will be created.
|
|
232
|
+
:param storage_account_access_key: Optional access key for the storage account.
|
|
233
|
+
:param storage_uses_managed_identity: Optional flag indicating if the storage account uses a Managed Identity.
|
|
234
|
+
:param tags: Optional tags for categorizing and managing the Function App resources within Azure.
|
|
235
|
+
:param virtual_network_subnet_id: Optional ID of a virtual network subnet for the Function App.
|
|
236
|
+
:param zip_deploy_file: Optional path to a ZIP file for deployment to the Function App.
|
|
237
|
+
'''
|
|
238
|
+
if __debug__:
|
|
239
|
+
type_hints = typing.get_type_hints(_typecheckingstub__3daa98fefa4d3f3d51500d1006d3a5f777530be3b2749a516c39d1d661eac80e)
|
|
240
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
241
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
242
|
+
props = FunctionAppLinuxProps(
|
|
243
|
+
location=location,
|
|
244
|
+
name=name,
|
|
245
|
+
app_settings=app_settings,
|
|
246
|
+
auth_settings=auth_settings,
|
|
247
|
+
auth_settings_v2=auth_settings_v2,
|
|
248
|
+
builtin_logging_enabled=builtin_logging_enabled,
|
|
249
|
+
client_certificate_enabled=client_certificate_enabled,
|
|
250
|
+
client_certificate_exclusion_paths=client_certificate_exclusion_paths,
|
|
251
|
+
client_certificate_mode=client_certificate_mode,
|
|
252
|
+
connection_string=connection_string,
|
|
253
|
+
enabled=enabled,
|
|
254
|
+
functions_extension_version=functions_extension_version,
|
|
255
|
+
https_only=https_only,
|
|
256
|
+
identity=identity,
|
|
257
|
+
public_network_access_enabled=public_network_access_enabled,
|
|
258
|
+
resource_group=resource_group,
|
|
259
|
+
runtime_version=runtime_version,
|
|
260
|
+
service_plan=service_plan,
|
|
261
|
+
service_plan_app_service_environment_id=service_plan_app_service_environment_id,
|
|
262
|
+
service_plan_maximum_elastic_worker_count=service_plan_maximum_elastic_worker_count,
|
|
263
|
+
service_plan_per_site_scaling_enabled=service_plan_per_site_scaling_enabled,
|
|
264
|
+
service_plan_sku=service_plan_sku,
|
|
265
|
+
service_plan_worker_count=service_plan_worker_count,
|
|
266
|
+
service_plan_zone_balancing_enabled=service_plan_zone_balancing_enabled,
|
|
267
|
+
site_config=site_config,
|
|
268
|
+
storage_account=storage_account,
|
|
269
|
+
storage_account_access_key=storage_account_access_key,
|
|
270
|
+
storage_uses_managed_identity=storage_uses_managed_identity,
|
|
271
|
+
tags=tags,
|
|
272
|
+
virtual_network_subnet_id=virtual_network_subnet_id,
|
|
273
|
+
zip_deploy_file=zip_deploy_file,
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
277
|
+
|
|
278
|
+
@builtins.property
|
|
279
|
+
@jsii.member(jsii_name="defaultHostname")
|
|
280
|
+
def default_hostname(self) -> builtins.str:
|
|
281
|
+
return typing.cast(builtins.str, jsii.get(self, "defaultHostname"))
|
|
282
|
+
|
|
283
|
+
@builtins.property
|
|
284
|
+
@jsii.member(jsii_name="kind")
|
|
285
|
+
def kind(self) -> builtins.str:
|
|
286
|
+
return typing.cast(builtins.str, jsii.get(self, "kind"))
|
|
287
|
+
|
|
288
|
+
@builtins.property
|
|
289
|
+
@jsii.member(jsii_name="name")
|
|
290
|
+
def name(self) -> builtins.str:
|
|
291
|
+
return typing.cast(builtins.str, jsii.get(self, "name"))
|
|
292
|
+
|
|
293
|
+
@builtins.property
|
|
294
|
+
@jsii.member(jsii_name="servicePlan")
|
|
295
|
+
def service_plan(
|
|
296
|
+
self,
|
|
297
|
+
) -> _cdktf_cdktf_provider_azurerm_service_plan_92bbcedf.ServicePlan:
|
|
298
|
+
return typing.cast(_cdktf_cdktf_provider_azurerm_service_plan_92bbcedf.ServicePlan, jsii.get(self, "servicePlan"))
|
|
299
|
+
|
|
300
|
+
@builtins.property
|
|
301
|
+
@jsii.member(jsii_name="storageAccount")
|
|
302
|
+
def storage_account(
|
|
303
|
+
self,
|
|
304
|
+
) -> _cdktf_cdktf_provider_azurerm_storage_account_92bbcedf.StorageAccount:
|
|
305
|
+
return typing.cast(_cdktf_cdktf_provider_azurerm_storage_account_92bbcedf.StorageAccount, jsii.get(self, "storageAccount"))
|
|
306
|
+
|
|
307
|
+
@builtins.property
|
|
308
|
+
@jsii.member(jsii_name="id")
|
|
309
|
+
def id(self) -> builtins.str:
|
|
310
|
+
return typing.cast(builtins.str, jsii.get(self, "id"))
|
|
311
|
+
|
|
312
|
+
@id.setter
|
|
313
|
+
def id(self, value: builtins.str) -> None:
|
|
314
|
+
if __debug__:
|
|
315
|
+
type_hints = typing.get_type_hints(_typecheckingstub__183c1ef92f1be1b508ac4d390fa0d5cd69de1a6a3c64414c03506a4a56b1052f)
|
|
316
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
317
|
+
jsii.set(self, "id", value)
|
|
318
|
+
|
|
319
|
+
@builtins.property
|
|
320
|
+
@jsii.member(jsii_name="resourceGroup")
|
|
321
|
+
def resource_group(
|
|
322
|
+
self,
|
|
323
|
+
) -> _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup:
|
|
324
|
+
return typing.cast(_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup, jsii.get(self, "resourceGroup"))
|
|
325
|
+
|
|
326
|
+
@resource_group.setter
|
|
327
|
+
def resource_group(
|
|
328
|
+
self,
|
|
329
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
330
|
+
) -> None:
|
|
331
|
+
if __debug__:
|
|
332
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f8f13951d99b687d3f1b7c44001ed6bb8221bcdd1c348606a23c66e987a0308c)
|
|
333
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
334
|
+
jsii.set(self, "resourceGroup", value)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
@jsii.data_type(
|
|
338
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_functionapp.FunctionAppLinuxProps",
|
|
339
|
+
jsii_struct_bases=[],
|
|
340
|
+
name_mapping={
|
|
341
|
+
"location": "location",
|
|
342
|
+
"name": "name",
|
|
343
|
+
"app_settings": "appSettings",
|
|
344
|
+
"auth_settings": "authSettings",
|
|
345
|
+
"auth_settings_v2": "authSettingsV2",
|
|
346
|
+
"builtin_logging_enabled": "builtinLoggingEnabled",
|
|
347
|
+
"client_certificate_enabled": "clientCertificateEnabled",
|
|
348
|
+
"client_certificate_exclusion_paths": "clientCertificateExclusionPaths",
|
|
349
|
+
"client_certificate_mode": "clientCertificateMode",
|
|
350
|
+
"connection_string": "connectionString",
|
|
351
|
+
"enabled": "enabled",
|
|
352
|
+
"functions_extension_version": "functionsExtensionVersion",
|
|
353
|
+
"https_only": "httpsOnly",
|
|
354
|
+
"identity": "identity",
|
|
355
|
+
"public_network_access_enabled": "publicNetworkAccessEnabled",
|
|
356
|
+
"resource_group": "resourceGroup",
|
|
357
|
+
"runtime_version": "runtimeVersion",
|
|
358
|
+
"service_plan": "servicePlan",
|
|
359
|
+
"service_plan_app_service_environment_id": "servicePlanAppServiceEnvironmentId",
|
|
360
|
+
"service_plan_maximum_elastic_worker_count": "servicePlanMaximumElasticWorkerCount",
|
|
361
|
+
"service_plan_per_site_scaling_enabled": "servicePlanPerSiteScalingEnabled",
|
|
362
|
+
"service_plan_sku": "servicePlanSku",
|
|
363
|
+
"service_plan_worker_count": "servicePlanWorkerCount",
|
|
364
|
+
"service_plan_zone_balancing_enabled": "servicePlanZoneBalancingEnabled",
|
|
365
|
+
"site_config": "siteConfig",
|
|
366
|
+
"storage_account": "storageAccount",
|
|
367
|
+
"storage_account_access_key": "storageAccountAccessKey",
|
|
368
|
+
"storage_uses_managed_identity": "storageUsesManagedIdentity",
|
|
369
|
+
"tags": "tags",
|
|
370
|
+
"virtual_network_subnet_id": "virtualNetworkSubnetId",
|
|
371
|
+
"zip_deploy_file": "zipDeployFile",
|
|
372
|
+
},
|
|
373
|
+
)
|
|
374
|
+
class FunctionAppLinuxProps:
|
|
375
|
+
def __init__(
|
|
376
|
+
self,
|
|
377
|
+
*,
|
|
378
|
+
location: builtins.str,
|
|
379
|
+
name: builtins.str,
|
|
380
|
+
app_settings: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
381
|
+
auth_settings: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettings, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
382
|
+
auth_settings_v2: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettingsV2, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
383
|
+
builtin_logging_enabled: typing.Optional[builtins.bool] = None,
|
|
384
|
+
client_certificate_enabled: typing.Optional[builtins.bool] = None,
|
|
385
|
+
client_certificate_exclusion_paths: typing.Optional[builtins.str] = None,
|
|
386
|
+
client_certificate_mode: typing.Optional[builtins.str] = None,
|
|
387
|
+
connection_string: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppConnectionString, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
388
|
+
enabled: typing.Optional[builtins.bool] = None,
|
|
389
|
+
functions_extension_version: typing.Optional[builtins.str] = None,
|
|
390
|
+
https_only: typing.Optional[builtins.bool] = None,
|
|
391
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
392
|
+
public_network_access_enabled: typing.Optional[builtins.bool] = None,
|
|
393
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
394
|
+
runtime_version: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfigApplicationStack, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
395
|
+
service_plan: typing.Optional[_cdktf_cdktf_provider_azurerm_service_plan_92bbcedf.ServicePlan] = None,
|
|
396
|
+
service_plan_app_service_environment_id: typing.Optional[builtins.str] = None,
|
|
397
|
+
service_plan_maximum_elastic_worker_count: typing.Optional[jsii.Number] = None,
|
|
398
|
+
service_plan_per_site_scaling_enabled: typing.Optional[builtins.bool] = None,
|
|
399
|
+
service_plan_sku: typing.Optional[builtins.str] = None,
|
|
400
|
+
service_plan_worker_count: typing.Optional[jsii.Number] = None,
|
|
401
|
+
service_plan_zone_balancing_enabled: typing.Optional[builtins.bool] = None,
|
|
402
|
+
site_config: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
403
|
+
storage_account: typing.Optional[_cdktf_cdktf_provider_azurerm_storage_account_92bbcedf.StorageAccount] = None,
|
|
404
|
+
storage_account_access_key: typing.Optional[builtins.str] = None,
|
|
405
|
+
storage_uses_managed_identity: typing.Optional[builtins.bool] = None,
|
|
406
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
407
|
+
virtual_network_subnet_id: typing.Optional[builtins.str] = None,
|
|
408
|
+
zip_deploy_file: typing.Optional[builtins.str] = None,
|
|
409
|
+
) -> None:
|
|
410
|
+
'''Properties for the Azure Linux Function App.
|
|
411
|
+
|
|
412
|
+
:param location: The Azure Region where the Function App will be deployed, e.g., 'East US', 'West Europe'.
|
|
413
|
+
:param name: The name of the Function App. This name must be unique within Azure.
|
|
414
|
+
:param app_settings: Application settings for the Azure Function App.
|
|
415
|
+
:param auth_settings: Optional authentication settings for the Function App.
|
|
416
|
+
:param auth_settings_v2: Optional advanced version of authentication settings for the Function App.
|
|
417
|
+
:param builtin_logging_enabled: Optional flag to enable built-in logging capabilities.
|
|
418
|
+
:param client_certificate_enabled: Optional flag to enable client certificate authentication.
|
|
419
|
+
:param client_certificate_exclusion_paths: Optional paths that are excluded from client certificate authentication.
|
|
420
|
+
:param client_certificate_mode: Optional mode for client certificate requirement (e.g., 'Required', 'Optional').
|
|
421
|
+
:param connection_string: Optional connection string for external services or databases.
|
|
422
|
+
:param enabled: Optional flag to enable or disable the Function App.
|
|
423
|
+
:param functions_extension_version: Optional version setting for the Azure Functions runtime.
|
|
424
|
+
:param https_only: Optional flag to enforce HTTPS only traffic.
|
|
425
|
+
:param identity: Optional identity configuration for the Function App, for use in Managed Service Identity scenarios.
|
|
426
|
+
:param public_network_access_enabled: Optional flag to enable or disable public network access to the Function App.
|
|
427
|
+
:param resource_group: An optional reference to the resource group in which to deploy the Function App. If not provided, the Function App will be deployed in the default resource group.
|
|
428
|
+
:param runtime_version: Optional runtime version specification for the Function App, such as Node.js, .NET, or Java version.
|
|
429
|
+
:param service_plan: Optional ID of an existing App Service Plan to host the Function App. If not provided, a new plan will be created.
|
|
430
|
+
:param service_plan_app_service_environment_id: Optional ID for the App Service Environment to be used by the service plan.
|
|
431
|
+
:param service_plan_maximum_elastic_worker_count: Optional maximum count of elastic workers for the App Service Plan.
|
|
432
|
+
:param service_plan_per_site_scaling_enabled: Optional flag to enable per-site scaling for the App Service Plan.
|
|
433
|
+
:param service_plan_sku: Optional SKU for the App Service Plan, defines the pricing tier and capabilities.
|
|
434
|
+
:param service_plan_worker_count: Optional worker count for the App Service Plan.
|
|
435
|
+
:param service_plan_zone_balancing_enabled: Optional flag to enable zone balancing for the App Service Plan.
|
|
436
|
+
:param site_config: Optional site configuration for additional settings like environment variables, and connection strings.
|
|
437
|
+
:param storage_account: An optional reference to the storage account to be used by the Function App. If not provided, a new storage account will be created.
|
|
438
|
+
:param storage_account_access_key: Optional access key for the storage account.
|
|
439
|
+
:param storage_uses_managed_identity: Optional flag indicating if the storage account uses a Managed Identity.
|
|
440
|
+
:param tags: Optional tags for categorizing and managing the Function App resources within Azure.
|
|
441
|
+
:param virtual_network_subnet_id: Optional ID of a virtual network subnet for the Function App.
|
|
442
|
+
:param zip_deploy_file: Optional path to a ZIP file for deployment to the Function App.
|
|
443
|
+
'''
|
|
444
|
+
if isinstance(auth_settings, dict):
|
|
445
|
+
auth_settings = _cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettings(**auth_settings)
|
|
446
|
+
if isinstance(auth_settings_v2, dict):
|
|
447
|
+
auth_settings_v2 = _cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettingsV2(**auth_settings_v2)
|
|
448
|
+
if isinstance(identity, dict):
|
|
449
|
+
identity = _cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppIdentity(**identity)
|
|
450
|
+
if isinstance(runtime_version, dict):
|
|
451
|
+
runtime_version = _cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfigApplicationStack(**runtime_version)
|
|
452
|
+
if isinstance(site_config, dict):
|
|
453
|
+
site_config = _cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfig(**site_config)
|
|
454
|
+
if __debug__:
|
|
455
|
+
type_hints = typing.get_type_hints(_typecheckingstub__53587b2bdf36e31f15daa92fc2dde9b6de76acb6a3e642b5678ba48393cc0ee6)
|
|
456
|
+
check_type(argname="argument location", value=location, expected_type=type_hints["location"])
|
|
457
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
458
|
+
check_type(argname="argument app_settings", value=app_settings, expected_type=type_hints["app_settings"])
|
|
459
|
+
check_type(argname="argument auth_settings", value=auth_settings, expected_type=type_hints["auth_settings"])
|
|
460
|
+
check_type(argname="argument auth_settings_v2", value=auth_settings_v2, expected_type=type_hints["auth_settings_v2"])
|
|
461
|
+
check_type(argname="argument builtin_logging_enabled", value=builtin_logging_enabled, expected_type=type_hints["builtin_logging_enabled"])
|
|
462
|
+
check_type(argname="argument client_certificate_enabled", value=client_certificate_enabled, expected_type=type_hints["client_certificate_enabled"])
|
|
463
|
+
check_type(argname="argument client_certificate_exclusion_paths", value=client_certificate_exclusion_paths, expected_type=type_hints["client_certificate_exclusion_paths"])
|
|
464
|
+
check_type(argname="argument client_certificate_mode", value=client_certificate_mode, expected_type=type_hints["client_certificate_mode"])
|
|
465
|
+
check_type(argname="argument connection_string", value=connection_string, expected_type=type_hints["connection_string"])
|
|
466
|
+
check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
|
|
467
|
+
check_type(argname="argument functions_extension_version", value=functions_extension_version, expected_type=type_hints["functions_extension_version"])
|
|
468
|
+
check_type(argname="argument https_only", value=https_only, expected_type=type_hints["https_only"])
|
|
469
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
470
|
+
check_type(argname="argument public_network_access_enabled", value=public_network_access_enabled, expected_type=type_hints["public_network_access_enabled"])
|
|
471
|
+
check_type(argname="argument resource_group", value=resource_group, expected_type=type_hints["resource_group"])
|
|
472
|
+
check_type(argname="argument runtime_version", value=runtime_version, expected_type=type_hints["runtime_version"])
|
|
473
|
+
check_type(argname="argument service_plan", value=service_plan, expected_type=type_hints["service_plan"])
|
|
474
|
+
check_type(argname="argument service_plan_app_service_environment_id", value=service_plan_app_service_environment_id, expected_type=type_hints["service_plan_app_service_environment_id"])
|
|
475
|
+
check_type(argname="argument service_plan_maximum_elastic_worker_count", value=service_plan_maximum_elastic_worker_count, expected_type=type_hints["service_plan_maximum_elastic_worker_count"])
|
|
476
|
+
check_type(argname="argument service_plan_per_site_scaling_enabled", value=service_plan_per_site_scaling_enabled, expected_type=type_hints["service_plan_per_site_scaling_enabled"])
|
|
477
|
+
check_type(argname="argument service_plan_sku", value=service_plan_sku, expected_type=type_hints["service_plan_sku"])
|
|
478
|
+
check_type(argname="argument service_plan_worker_count", value=service_plan_worker_count, expected_type=type_hints["service_plan_worker_count"])
|
|
479
|
+
check_type(argname="argument service_plan_zone_balancing_enabled", value=service_plan_zone_balancing_enabled, expected_type=type_hints["service_plan_zone_balancing_enabled"])
|
|
480
|
+
check_type(argname="argument site_config", value=site_config, expected_type=type_hints["site_config"])
|
|
481
|
+
check_type(argname="argument storage_account", value=storage_account, expected_type=type_hints["storage_account"])
|
|
482
|
+
check_type(argname="argument storage_account_access_key", value=storage_account_access_key, expected_type=type_hints["storage_account_access_key"])
|
|
483
|
+
check_type(argname="argument storage_uses_managed_identity", value=storage_uses_managed_identity, expected_type=type_hints["storage_uses_managed_identity"])
|
|
484
|
+
check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
|
|
485
|
+
check_type(argname="argument virtual_network_subnet_id", value=virtual_network_subnet_id, expected_type=type_hints["virtual_network_subnet_id"])
|
|
486
|
+
check_type(argname="argument zip_deploy_file", value=zip_deploy_file, expected_type=type_hints["zip_deploy_file"])
|
|
487
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
488
|
+
"location": location,
|
|
489
|
+
"name": name,
|
|
490
|
+
}
|
|
491
|
+
if app_settings is not None:
|
|
492
|
+
self._values["app_settings"] = app_settings
|
|
493
|
+
if auth_settings is not None:
|
|
494
|
+
self._values["auth_settings"] = auth_settings
|
|
495
|
+
if auth_settings_v2 is not None:
|
|
496
|
+
self._values["auth_settings_v2"] = auth_settings_v2
|
|
497
|
+
if builtin_logging_enabled is not None:
|
|
498
|
+
self._values["builtin_logging_enabled"] = builtin_logging_enabled
|
|
499
|
+
if client_certificate_enabled is not None:
|
|
500
|
+
self._values["client_certificate_enabled"] = client_certificate_enabled
|
|
501
|
+
if client_certificate_exclusion_paths is not None:
|
|
502
|
+
self._values["client_certificate_exclusion_paths"] = client_certificate_exclusion_paths
|
|
503
|
+
if client_certificate_mode is not None:
|
|
504
|
+
self._values["client_certificate_mode"] = client_certificate_mode
|
|
505
|
+
if connection_string is not None:
|
|
506
|
+
self._values["connection_string"] = connection_string
|
|
507
|
+
if enabled is not None:
|
|
508
|
+
self._values["enabled"] = enabled
|
|
509
|
+
if functions_extension_version is not None:
|
|
510
|
+
self._values["functions_extension_version"] = functions_extension_version
|
|
511
|
+
if https_only is not None:
|
|
512
|
+
self._values["https_only"] = https_only
|
|
513
|
+
if identity is not None:
|
|
514
|
+
self._values["identity"] = identity
|
|
515
|
+
if public_network_access_enabled is not None:
|
|
516
|
+
self._values["public_network_access_enabled"] = public_network_access_enabled
|
|
517
|
+
if resource_group is not None:
|
|
518
|
+
self._values["resource_group"] = resource_group
|
|
519
|
+
if runtime_version is not None:
|
|
520
|
+
self._values["runtime_version"] = runtime_version
|
|
521
|
+
if service_plan is not None:
|
|
522
|
+
self._values["service_plan"] = service_plan
|
|
523
|
+
if service_plan_app_service_environment_id is not None:
|
|
524
|
+
self._values["service_plan_app_service_environment_id"] = service_plan_app_service_environment_id
|
|
525
|
+
if service_plan_maximum_elastic_worker_count is not None:
|
|
526
|
+
self._values["service_plan_maximum_elastic_worker_count"] = service_plan_maximum_elastic_worker_count
|
|
527
|
+
if service_plan_per_site_scaling_enabled is not None:
|
|
528
|
+
self._values["service_plan_per_site_scaling_enabled"] = service_plan_per_site_scaling_enabled
|
|
529
|
+
if service_plan_sku is not None:
|
|
530
|
+
self._values["service_plan_sku"] = service_plan_sku
|
|
531
|
+
if service_plan_worker_count is not None:
|
|
532
|
+
self._values["service_plan_worker_count"] = service_plan_worker_count
|
|
533
|
+
if service_plan_zone_balancing_enabled is not None:
|
|
534
|
+
self._values["service_plan_zone_balancing_enabled"] = service_plan_zone_balancing_enabled
|
|
535
|
+
if site_config is not None:
|
|
536
|
+
self._values["site_config"] = site_config
|
|
537
|
+
if storage_account is not None:
|
|
538
|
+
self._values["storage_account"] = storage_account
|
|
539
|
+
if storage_account_access_key is not None:
|
|
540
|
+
self._values["storage_account_access_key"] = storage_account_access_key
|
|
541
|
+
if storage_uses_managed_identity is not None:
|
|
542
|
+
self._values["storage_uses_managed_identity"] = storage_uses_managed_identity
|
|
543
|
+
if tags is not None:
|
|
544
|
+
self._values["tags"] = tags
|
|
545
|
+
if virtual_network_subnet_id is not None:
|
|
546
|
+
self._values["virtual_network_subnet_id"] = virtual_network_subnet_id
|
|
547
|
+
if zip_deploy_file is not None:
|
|
548
|
+
self._values["zip_deploy_file"] = zip_deploy_file
|
|
549
|
+
|
|
550
|
+
@builtins.property
|
|
551
|
+
def location(self) -> builtins.str:
|
|
552
|
+
'''The Azure Region where the Function App will be deployed, e.g., 'East US', 'West Europe'.'''
|
|
553
|
+
result = self._values.get("location")
|
|
554
|
+
assert result is not None, "Required property 'location' is missing"
|
|
555
|
+
return typing.cast(builtins.str, result)
|
|
556
|
+
|
|
557
|
+
@builtins.property
|
|
558
|
+
def name(self) -> builtins.str:
|
|
559
|
+
'''The name of the Function App.
|
|
560
|
+
|
|
561
|
+
This name must be unique within Azure.
|
|
562
|
+
'''
|
|
563
|
+
result = self._values.get("name")
|
|
564
|
+
assert result is not None, "Required property 'name' is missing"
|
|
565
|
+
return typing.cast(builtins.str, result)
|
|
566
|
+
|
|
567
|
+
@builtins.property
|
|
568
|
+
def app_settings(
|
|
569
|
+
self,
|
|
570
|
+
) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
571
|
+
'''Application settings for the Azure Function App.
|
|
572
|
+
|
|
573
|
+
:property:
|
|
574
|
+
|
|
575
|
+
{ [key: string]: string } appSettings - A collection of key-value pairs that contain the settings.
|
|
576
|
+
|
|
577
|
+
Note on Runtime Settings:
|
|
578
|
+
|
|
579
|
+
- 'node_version' in 'site_config' sets the Node.js version.
|
|
580
|
+
Terraform assigns this value to 'WEBSITE_NODE_DEFAULT_VERSION' in app settings.
|
|
581
|
+
- 'functions_extension_version' sets the Azure Functions runtime version.
|
|
582
|
+
Terraform assigns this value to 'FUNCTIONS_EXTENSION_VERSION' in app settings.
|
|
583
|
+
|
|
584
|
+
Note on Storage Settings:
|
|
585
|
+
|
|
586
|
+
- Properties like 'storage_account_access_key' are used for storage configurations.
|
|
587
|
+
Terraform assigns these values to keys like 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING',
|
|
588
|
+
'AzureWebJobsStorage' in app settings.
|
|
589
|
+
|
|
590
|
+
Note on Application Insights Settings:
|
|
591
|
+
|
|
592
|
+
- Use 'application_insights_connection_string' and 'application_insights_key' for Application Insights configurations.
|
|
593
|
+
Terraform assigns these to 'APPINSIGHTS_INSTRUMENTATIONKEY' and 'APPLICATIONINSIGHTS_CONNECTION_STRING' in app settings.
|
|
594
|
+
|
|
595
|
+
Note on Health Check Settings:
|
|
596
|
+
|
|
597
|
+
- 'health_check_eviction_time_in_min' configures health check settings.
|
|
598
|
+
Terraform assigns this value to 'WEBSITE_HEALTHCHECK_MAXPINGFAILURES' in app settings.
|
|
599
|
+
|
|
600
|
+
Note on Storage Account Restriction:
|
|
601
|
+
|
|
602
|
+
- To restrict your storage account to a virtual network, set 'WEBSITE_CONTENTOVERVNET' to 1 in app settings.
|
|
603
|
+
Ensure a predefined share is created for this configuration.
|
|
604
|
+
'''
|
|
605
|
+
result = self._values.get("app_settings")
|
|
606
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
607
|
+
|
|
608
|
+
@builtins.property
|
|
609
|
+
def auth_settings(
|
|
610
|
+
self,
|
|
611
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettings]:
|
|
612
|
+
'''Optional authentication settings for the Function App.'''
|
|
613
|
+
result = self._values.get("auth_settings")
|
|
614
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettings], result)
|
|
615
|
+
|
|
616
|
+
@builtins.property
|
|
617
|
+
def auth_settings_v2(
|
|
618
|
+
self,
|
|
619
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettingsV2]:
|
|
620
|
+
'''Optional advanced version of authentication settings for the Function App.'''
|
|
621
|
+
result = self._values.get("auth_settings_v2")
|
|
622
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettingsV2], result)
|
|
623
|
+
|
|
624
|
+
@builtins.property
|
|
625
|
+
def builtin_logging_enabled(self) -> typing.Optional[builtins.bool]:
|
|
626
|
+
'''Optional flag to enable built-in logging capabilities.'''
|
|
627
|
+
result = self._values.get("builtin_logging_enabled")
|
|
628
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
629
|
+
|
|
630
|
+
@builtins.property
|
|
631
|
+
def client_certificate_enabled(self) -> typing.Optional[builtins.bool]:
|
|
632
|
+
'''Optional flag to enable client certificate authentication.'''
|
|
633
|
+
result = self._values.get("client_certificate_enabled")
|
|
634
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
635
|
+
|
|
636
|
+
@builtins.property
|
|
637
|
+
def client_certificate_exclusion_paths(self) -> typing.Optional[builtins.str]:
|
|
638
|
+
'''Optional paths that are excluded from client certificate authentication.'''
|
|
639
|
+
result = self._values.get("client_certificate_exclusion_paths")
|
|
640
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
641
|
+
|
|
642
|
+
@builtins.property
|
|
643
|
+
def client_certificate_mode(self) -> typing.Optional[builtins.str]:
|
|
644
|
+
'''Optional mode for client certificate requirement (e.g., 'Required', 'Optional').'''
|
|
645
|
+
result = self._values.get("client_certificate_mode")
|
|
646
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
647
|
+
|
|
648
|
+
@builtins.property
|
|
649
|
+
def connection_string(
|
|
650
|
+
self,
|
|
651
|
+
) -> typing.Optional[typing.List[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppConnectionString]]:
|
|
652
|
+
'''Optional connection string for external services or databases.'''
|
|
653
|
+
result = self._values.get("connection_string")
|
|
654
|
+
return typing.cast(typing.Optional[typing.List[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppConnectionString]], result)
|
|
655
|
+
|
|
656
|
+
@builtins.property
|
|
657
|
+
def enabled(self) -> typing.Optional[builtins.bool]:
|
|
658
|
+
'''Optional flag to enable or disable the Function App.'''
|
|
659
|
+
result = self._values.get("enabled")
|
|
660
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
661
|
+
|
|
662
|
+
@builtins.property
|
|
663
|
+
def functions_extension_version(self) -> typing.Optional[builtins.str]:
|
|
664
|
+
'''Optional version setting for the Azure Functions runtime.'''
|
|
665
|
+
result = self._values.get("functions_extension_version")
|
|
666
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
667
|
+
|
|
668
|
+
@builtins.property
|
|
669
|
+
def https_only(self) -> typing.Optional[builtins.bool]:
|
|
670
|
+
'''Optional flag to enforce HTTPS only traffic.'''
|
|
671
|
+
result = self._values.get("https_only")
|
|
672
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
673
|
+
|
|
674
|
+
@builtins.property
|
|
675
|
+
def identity(
|
|
676
|
+
self,
|
|
677
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppIdentity]:
|
|
678
|
+
'''Optional identity configuration for the Function App, for use in Managed Service Identity scenarios.'''
|
|
679
|
+
result = self._values.get("identity")
|
|
680
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppIdentity], result)
|
|
681
|
+
|
|
682
|
+
@builtins.property
|
|
683
|
+
def public_network_access_enabled(self) -> typing.Optional[builtins.bool]:
|
|
684
|
+
'''Optional flag to enable or disable public network access to the Function App.'''
|
|
685
|
+
result = self._values.get("public_network_access_enabled")
|
|
686
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
687
|
+
|
|
688
|
+
@builtins.property
|
|
689
|
+
def resource_group(
|
|
690
|
+
self,
|
|
691
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup]:
|
|
692
|
+
'''An optional reference to the resource group in which to deploy the Function App.
|
|
693
|
+
|
|
694
|
+
If not provided, the Function App will be deployed in the default resource group.
|
|
695
|
+
'''
|
|
696
|
+
result = self._values.get("resource_group")
|
|
697
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup], result)
|
|
698
|
+
|
|
699
|
+
@builtins.property
|
|
700
|
+
def runtime_version(
|
|
701
|
+
self,
|
|
702
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfigApplicationStack]:
|
|
703
|
+
'''Optional runtime version specification for the Function App, such as Node.js, .NET, or Java version.'''
|
|
704
|
+
result = self._values.get("runtime_version")
|
|
705
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfigApplicationStack], result)
|
|
706
|
+
|
|
707
|
+
@builtins.property
|
|
708
|
+
def service_plan(
|
|
709
|
+
self,
|
|
710
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_service_plan_92bbcedf.ServicePlan]:
|
|
711
|
+
'''Optional ID of an existing App Service Plan to host the Function App.
|
|
712
|
+
|
|
713
|
+
If not provided, a new plan will be created.
|
|
714
|
+
'''
|
|
715
|
+
result = self._values.get("service_plan")
|
|
716
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_service_plan_92bbcedf.ServicePlan], result)
|
|
717
|
+
|
|
718
|
+
@builtins.property
|
|
719
|
+
def service_plan_app_service_environment_id(self) -> typing.Optional[builtins.str]:
|
|
720
|
+
'''Optional ID for the App Service Environment to be used by the service plan.'''
|
|
721
|
+
result = self._values.get("service_plan_app_service_environment_id")
|
|
722
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
723
|
+
|
|
724
|
+
@builtins.property
|
|
725
|
+
def service_plan_maximum_elastic_worker_count(self) -> typing.Optional[jsii.Number]:
|
|
726
|
+
'''Optional maximum count of elastic workers for the App Service Plan.'''
|
|
727
|
+
result = self._values.get("service_plan_maximum_elastic_worker_count")
|
|
728
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
729
|
+
|
|
730
|
+
@builtins.property
|
|
731
|
+
def service_plan_per_site_scaling_enabled(self) -> typing.Optional[builtins.bool]:
|
|
732
|
+
'''Optional flag to enable per-site scaling for the App Service Plan.'''
|
|
733
|
+
result = self._values.get("service_plan_per_site_scaling_enabled")
|
|
734
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
735
|
+
|
|
736
|
+
@builtins.property
|
|
737
|
+
def service_plan_sku(self) -> typing.Optional[builtins.str]:
|
|
738
|
+
'''Optional SKU for the App Service Plan, defines the pricing tier and capabilities.'''
|
|
739
|
+
result = self._values.get("service_plan_sku")
|
|
740
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
741
|
+
|
|
742
|
+
@builtins.property
|
|
743
|
+
def service_plan_worker_count(self) -> typing.Optional[jsii.Number]:
|
|
744
|
+
'''Optional worker count for the App Service Plan.'''
|
|
745
|
+
result = self._values.get("service_plan_worker_count")
|
|
746
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
747
|
+
|
|
748
|
+
@builtins.property
|
|
749
|
+
def service_plan_zone_balancing_enabled(self) -> typing.Optional[builtins.bool]:
|
|
750
|
+
'''Optional flag to enable zone balancing for the App Service Plan.'''
|
|
751
|
+
result = self._values.get("service_plan_zone_balancing_enabled")
|
|
752
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
753
|
+
|
|
754
|
+
@builtins.property
|
|
755
|
+
def site_config(
|
|
756
|
+
self,
|
|
757
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfig]:
|
|
758
|
+
'''Optional site configuration for additional settings like environment variables, and connection strings.'''
|
|
759
|
+
result = self._values.get("site_config")
|
|
760
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfig], result)
|
|
761
|
+
|
|
762
|
+
@builtins.property
|
|
763
|
+
def storage_account(
|
|
764
|
+
self,
|
|
765
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_storage_account_92bbcedf.StorageAccount]:
|
|
766
|
+
'''An optional reference to the storage account to be used by the Function App.
|
|
767
|
+
|
|
768
|
+
If not provided, a new storage account will be created.
|
|
769
|
+
'''
|
|
770
|
+
result = self._values.get("storage_account")
|
|
771
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_storage_account_92bbcedf.StorageAccount], result)
|
|
772
|
+
|
|
773
|
+
@builtins.property
|
|
774
|
+
def storage_account_access_key(self) -> typing.Optional[builtins.str]:
|
|
775
|
+
'''Optional access key for the storage account.'''
|
|
776
|
+
result = self._values.get("storage_account_access_key")
|
|
777
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
778
|
+
|
|
779
|
+
@builtins.property
|
|
780
|
+
def storage_uses_managed_identity(self) -> typing.Optional[builtins.bool]:
|
|
781
|
+
'''Optional flag indicating if the storage account uses a Managed Identity.'''
|
|
782
|
+
result = self._values.get("storage_uses_managed_identity")
|
|
783
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
784
|
+
|
|
785
|
+
@builtins.property
|
|
786
|
+
def tags(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
787
|
+
'''Optional tags for categorizing and managing the Function App resources within Azure.'''
|
|
788
|
+
result = self._values.get("tags")
|
|
789
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
790
|
+
|
|
791
|
+
@builtins.property
|
|
792
|
+
def virtual_network_subnet_id(self) -> typing.Optional[builtins.str]:
|
|
793
|
+
'''Optional ID of a virtual network subnet for the Function App.'''
|
|
794
|
+
result = self._values.get("virtual_network_subnet_id")
|
|
795
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
796
|
+
|
|
797
|
+
@builtins.property
|
|
798
|
+
def zip_deploy_file(self) -> typing.Optional[builtins.str]:
|
|
799
|
+
'''Optional path to a ZIP file for deployment to the Function App.'''
|
|
800
|
+
result = self._values.get("zip_deploy_file")
|
|
801
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
802
|
+
|
|
803
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
804
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
805
|
+
|
|
806
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
807
|
+
return not (rhs == self)
|
|
808
|
+
|
|
809
|
+
def __repr__(self) -> str:
|
|
810
|
+
return "FunctionAppLinuxProps(%s)" % ", ".join(
|
|
811
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
812
|
+
)
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
__all__ = [
|
|
816
|
+
"FunctionAppLinux",
|
|
817
|
+
"FunctionAppLinuxProps",
|
|
818
|
+
]
|
|
819
|
+
|
|
820
|
+
publication.publish()
|
|
821
|
+
|
|
822
|
+
def _typecheckingstub__3daa98fefa4d3f3d51500d1006d3a5f777530be3b2749a516c39d1d661eac80e(
|
|
823
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
824
|
+
id: builtins.str,
|
|
825
|
+
*,
|
|
826
|
+
location: builtins.str,
|
|
827
|
+
name: builtins.str,
|
|
828
|
+
app_settings: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
829
|
+
auth_settings: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettings, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
830
|
+
auth_settings_v2: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettingsV2, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
831
|
+
builtin_logging_enabled: typing.Optional[builtins.bool] = None,
|
|
832
|
+
client_certificate_enabled: typing.Optional[builtins.bool] = None,
|
|
833
|
+
client_certificate_exclusion_paths: typing.Optional[builtins.str] = None,
|
|
834
|
+
client_certificate_mode: typing.Optional[builtins.str] = None,
|
|
835
|
+
connection_string: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppConnectionString, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
836
|
+
enabled: typing.Optional[builtins.bool] = None,
|
|
837
|
+
functions_extension_version: typing.Optional[builtins.str] = None,
|
|
838
|
+
https_only: typing.Optional[builtins.bool] = None,
|
|
839
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
840
|
+
public_network_access_enabled: typing.Optional[builtins.bool] = None,
|
|
841
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
842
|
+
runtime_version: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfigApplicationStack, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
843
|
+
service_plan: typing.Optional[_cdktf_cdktf_provider_azurerm_service_plan_92bbcedf.ServicePlan] = None,
|
|
844
|
+
service_plan_app_service_environment_id: typing.Optional[builtins.str] = None,
|
|
845
|
+
service_plan_maximum_elastic_worker_count: typing.Optional[jsii.Number] = None,
|
|
846
|
+
service_plan_per_site_scaling_enabled: typing.Optional[builtins.bool] = None,
|
|
847
|
+
service_plan_sku: typing.Optional[builtins.str] = None,
|
|
848
|
+
service_plan_worker_count: typing.Optional[jsii.Number] = None,
|
|
849
|
+
service_plan_zone_balancing_enabled: typing.Optional[builtins.bool] = None,
|
|
850
|
+
site_config: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
851
|
+
storage_account: typing.Optional[_cdktf_cdktf_provider_azurerm_storage_account_92bbcedf.StorageAccount] = None,
|
|
852
|
+
storage_account_access_key: typing.Optional[builtins.str] = None,
|
|
853
|
+
storage_uses_managed_identity: typing.Optional[builtins.bool] = None,
|
|
854
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
855
|
+
virtual_network_subnet_id: typing.Optional[builtins.str] = None,
|
|
856
|
+
zip_deploy_file: typing.Optional[builtins.str] = None,
|
|
857
|
+
) -> None:
|
|
858
|
+
"""Type checking stubs"""
|
|
859
|
+
pass
|
|
860
|
+
|
|
861
|
+
def _typecheckingstub__183c1ef92f1be1b508ac4d390fa0d5cd69de1a6a3c64414c03506a4a56b1052f(
|
|
862
|
+
value: builtins.str,
|
|
863
|
+
) -> None:
|
|
864
|
+
"""Type checking stubs"""
|
|
865
|
+
pass
|
|
866
|
+
|
|
867
|
+
def _typecheckingstub__f8f13951d99b687d3f1b7c44001ed6bb8221bcdd1c348606a23c66e987a0308c(
|
|
868
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
869
|
+
) -> None:
|
|
870
|
+
"""Type checking stubs"""
|
|
871
|
+
pass
|
|
872
|
+
|
|
873
|
+
def _typecheckingstub__53587b2bdf36e31f15daa92fc2dde9b6de76acb6a3e642b5678ba48393cc0ee6(
|
|
874
|
+
*,
|
|
875
|
+
location: builtins.str,
|
|
876
|
+
name: builtins.str,
|
|
877
|
+
app_settings: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
878
|
+
auth_settings: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettings, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
879
|
+
auth_settings_v2: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppAuthSettingsV2, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
880
|
+
builtin_logging_enabled: typing.Optional[builtins.bool] = None,
|
|
881
|
+
client_certificate_enabled: typing.Optional[builtins.bool] = None,
|
|
882
|
+
client_certificate_exclusion_paths: typing.Optional[builtins.str] = None,
|
|
883
|
+
client_certificate_mode: typing.Optional[builtins.str] = None,
|
|
884
|
+
connection_string: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppConnectionString, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
885
|
+
enabled: typing.Optional[builtins.bool] = None,
|
|
886
|
+
functions_extension_version: typing.Optional[builtins.str] = None,
|
|
887
|
+
https_only: typing.Optional[builtins.bool] = None,
|
|
888
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
889
|
+
public_network_access_enabled: typing.Optional[builtins.bool] = None,
|
|
890
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
891
|
+
runtime_version: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfigApplicationStack, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
892
|
+
service_plan: typing.Optional[_cdktf_cdktf_provider_azurerm_service_plan_92bbcedf.ServicePlan] = None,
|
|
893
|
+
service_plan_app_service_environment_id: typing.Optional[builtins.str] = None,
|
|
894
|
+
service_plan_maximum_elastic_worker_count: typing.Optional[jsii.Number] = None,
|
|
895
|
+
service_plan_per_site_scaling_enabled: typing.Optional[builtins.bool] = None,
|
|
896
|
+
service_plan_sku: typing.Optional[builtins.str] = None,
|
|
897
|
+
service_plan_worker_count: typing.Optional[jsii.Number] = None,
|
|
898
|
+
service_plan_zone_balancing_enabled: typing.Optional[builtins.bool] = None,
|
|
899
|
+
site_config: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_function_app_92bbcedf.LinuxFunctionAppSiteConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
900
|
+
storage_account: typing.Optional[_cdktf_cdktf_provider_azurerm_storage_account_92bbcedf.StorageAccount] = None,
|
|
901
|
+
storage_account_access_key: typing.Optional[builtins.str] = None,
|
|
902
|
+
storage_uses_managed_identity: typing.Optional[builtins.bool] = None,
|
|
903
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
904
|
+
virtual_network_subnet_id: typing.Optional[builtins.str] = None,
|
|
905
|
+
zip_deploy_file: typing.Optional[builtins.str] = None,
|
|
906
|
+
) -> None:
|
|
907
|
+
"""Type checking stubs"""
|
|
908
|
+
pass
|