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,1185 @@
|
|
|
1
|
+
'''
|
|
2
|
+
# Azure Virtual Machine Scale Set Construct
|
|
3
|
+
|
|
4
|
+
This construct defines a scalable and managed Virtual Machine Scale Set (VMSS) in Azure, simplifying the deployment and management of multiple VMs that automatically scale in response to demand.
|
|
5
|
+
|
|
6
|
+
## What is a Virtual Machine Scale Set (VMSS)?
|
|
7
|
+
|
|
8
|
+
Azure VMSS allows you to deploy and manage a set of autoscaling virtual machines. You can scale the number of VMs in the scale set manually, or automatically based on predefined rules.
|
|
9
|
+
|
|
10
|
+
Detailed information on Azure VMSS can be found in the [official Azure documentation](https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview).
|
|
11
|
+
|
|
12
|
+
## Best Practices
|
|
13
|
+
|
|
14
|
+
* **Auto-Scaling**: Define rules for automatically scaling the number of VM instances.
|
|
15
|
+
* **Updating**: Utilize rolling upgrades for applying patches with minimal downtime.
|
|
16
|
+
* **Availability**: Distribute instances across fault domains and update domains.
|
|
17
|
+
* **Extensions**: Use VMSS extensions for automatic post-deployment configuration.
|
|
18
|
+
* **Load Balancing**: Configure load balancing to distribute traffic among instances.
|
|
19
|
+
|
|
20
|
+
## Construct Properties
|
|
21
|
+
|
|
22
|
+
The VMSS construct includes properties for configuration:
|
|
23
|
+
|
|
24
|
+
* `location`: Region for deployment.
|
|
25
|
+
* `resourceGroupName`: Resource group for VMSS.
|
|
26
|
+
* `name`: Name of the VMSS.
|
|
27
|
+
* `sku`: SKU for VM instances, like `Standard_B2s`.
|
|
28
|
+
* `instances`: Number of VM instances.
|
|
29
|
+
* `adminUsername`: Admin username.
|
|
30
|
+
* `adminPassword`: Admin password.
|
|
31
|
+
* `sourceImageReference`: Reference to the OS image.
|
|
32
|
+
* `osDisk`: Configuration for OS disk.
|
|
33
|
+
* `networkInterface`: Network interface details.
|
|
34
|
+
* `publicIPAddress`: Public IP configuration.
|
|
35
|
+
* `tags`: Key-value pairs for resource tagging.
|
|
36
|
+
* `customData`: Bootstrap script or data.
|
|
37
|
+
* `upgradePolicyMode`: Upgrade policy mode setting.
|
|
38
|
+
* `overprovision`: Overprovisioning toggle.
|
|
39
|
+
* `scaleInPolicy`: Scale-in policy.
|
|
40
|
+
* `bootDiagnosticsStorageURI`: URI for boot diagnostics.
|
|
41
|
+
|
|
42
|
+
## Usage Example
|
|
43
|
+
|
|
44
|
+
### Linux VMSS
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
const azureLinuxVMSS = new AzureLinuxVirtualMachineScaleSet(this, 'myLinuxVMSS', {
|
|
48
|
+
resourceGroupName: 'myResourceGroup',
|
|
49
|
+
location: 'West US',
|
|
50
|
+
name: 'myLinuxVMSS',
|
|
51
|
+
adminUsername: 'adminuser',
|
|
52
|
+
sku: 'Standard_B2s',
|
|
53
|
+
instances: 2,
|
|
54
|
+
// ...other configurations
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Windows VMSS
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
const azureWindowsVMSS = new AzureWindowsVirtualMachineScaleSet(this, 'myWindowsVMSS', {
|
|
62
|
+
resourceGroupName: 'myResourceGroup',
|
|
63
|
+
location: 'West US',
|
|
64
|
+
name: 'myWindowsVMSS',
|
|
65
|
+
adminUsername: 'adminuser',
|
|
66
|
+
sku: 'Standard_B2s',
|
|
67
|
+
instances: 2,
|
|
68
|
+
// ...other configurations
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
'''
|
|
72
|
+
from pkgutil import extend_path
|
|
73
|
+
__path__ = extend_path(__path__, __name__)
|
|
74
|
+
|
|
75
|
+
import abc
|
|
76
|
+
import builtins
|
|
77
|
+
import datetime
|
|
78
|
+
import enum
|
|
79
|
+
import typing
|
|
80
|
+
|
|
81
|
+
import jsii
|
|
82
|
+
import publication
|
|
83
|
+
import typing_extensions
|
|
84
|
+
|
|
85
|
+
from typeguard import check_type
|
|
86
|
+
|
|
87
|
+
from .._jsii import *
|
|
88
|
+
|
|
89
|
+
import cdktf as _cdktf_9a9027ec
|
|
90
|
+
import cdktf_cdktf_provider_azurerm.linux_virtual_machine as _cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf
|
|
91
|
+
import cdktf_cdktf_provider_azurerm.linux_virtual_machine_scale_set as _cdktf_cdktf_provider_azurerm_linux_virtual_machine_scale_set_92bbcedf
|
|
92
|
+
import cdktf_cdktf_provider_azurerm.resource_group as _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf
|
|
93
|
+
import cdktf_cdktf_provider_azurerm.subnet as _cdktf_cdktf_provider_azurerm_subnet_92bbcedf
|
|
94
|
+
import cdktf_cdktf_provider_azurerm.windows_virtual_machine as _cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf
|
|
95
|
+
import cdktf_cdktf_provider_azurerm.windows_virtual_machine_scale_set as _cdktf_cdktf_provider_azurerm_windows_virtual_machine_scale_set_92bbcedf
|
|
96
|
+
import constructs as _constructs_77d1e7e8
|
|
97
|
+
from ..core_azure import AzureResource as _AzureResource_74eec1c4
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class LinuxCluster(
|
|
101
|
+
_AzureResource_74eec1c4,
|
|
102
|
+
metaclass=jsii.JSIIMeta,
|
|
103
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualmachinescaleset.LinuxCluster",
|
|
104
|
+
):
|
|
105
|
+
def __init__(
|
|
106
|
+
self,
|
|
107
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
108
|
+
id: builtins.str,
|
|
109
|
+
*,
|
|
110
|
+
admin_password: typing.Optional[builtins.str] = None,
|
|
111
|
+
admin_ssh_key: typing.Optional[typing.Union[_cdktf_9a9027ec.IResolvable, typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineAdminSshKey, typing.Dict[builtins.str, typing.Any]]]]] = None,
|
|
112
|
+
admin_username: typing.Optional[builtins.str] = None,
|
|
113
|
+
boot_diagnostics_storage_uri: typing.Optional[builtins.str] = None,
|
|
114
|
+
custom_data: typing.Optional[builtins.str] = None,
|
|
115
|
+
enable_ssh_azure_ad_login: typing.Optional[builtins.bool] = None,
|
|
116
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
117
|
+
instances: typing.Optional[jsii.Number] = None,
|
|
118
|
+
location: typing.Optional[builtins.str] = None,
|
|
119
|
+
name: typing.Optional[builtins.str] = None,
|
|
120
|
+
os_disk: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineOsDisk, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
121
|
+
overprovision: typing.Optional[builtins.bool] = None,
|
|
122
|
+
public_ip_address: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_scale_set_92bbcedf.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
123
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
124
|
+
scale_in_policy: typing.Optional[builtins.str] = None,
|
|
125
|
+
sku: typing.Optional[builtins.str] = None,
|
|
126
|
+
source_image_id: typing.Optional[builtins.str] = None,
|
|
127
|
+
source_image_reference: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineSourceImageReference, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
128
|
+
subnet: typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet] = None,
|
|
129
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
130
|
+
upgrade_policy_mode: typing.Optional[builtins.str] = None,
|
|
131
|
+
user_data: typing.Optional[builtins.str] = None,
|
|
132
|
+
zones: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
133
|
+
) -> None:
|
|
134
|
+
'''Represents a Linux Virtual Machine Scale Set (VMSS) within Microsoft Azure.
|
|
135
|
+
|
|
136
|
+
This class is designed to provision and manage a scale set of Linux virtual machines, providing capabilities such as
|
|
137
|
+
auto-scaling, high availability, and simplified management. It supports detailed configurations like VM size, operating
|
|
138
|
+
system image, network settings, and administrative credentials. Additional functionalities include custom data scripts,
|
|
139
|
+
SSH configurations, and optional features like managed identity and boot diagnostics.
|
|
140
|
+
|
|
141
|
+
:param scope: - The scope in which to define this construct, typically representing the Cloud Development Kit (CDK) application.
|
|
142
|
+
:param id: - The unique identifier for this instance of the Linux cluster, used within the scope for reference.
|
|
143
|
+
:param admin_password: The admin password for the virtual machine.
|
|
144
|
+
:param admin_ssh_key: An array of SSH keys for the admin user.
|
|
145
|
+
:param admin_username: The admin username for the virtual machine.
|
|
146
|
+
:param boot_diagnostics_storage_uri: Boot diagnostics settings for the VMSS.
|
|
147
|
+
:param custom_data: Custom data to pass to the virtual machines upon creation.
|
|
148
|
+
:param enable_ssh_azure_ad_login: Enable SSH Azure AD Login, required managed identity to be set. Default: false
|
|
149
|
+
:param identity: Managed identity settings for the VMs.
|
|
150
|
+
:param instances: The number of VM instances in the scale set. Default: 2
|
|
151
|
+
:param location: The Azure location where the virtual machine scale set should be created. Default: "eastus"
|
|
152
|
+
:param name: The name of the virtual machine scale set. Default: - Uses the name derived from the construct path.
|
|
153
|
+
:param os_disk: The OS disk configuration for the virtual machines. Default: - Uses a disk with caching set to "ReadWrite" and storage account type "Standard_LRS".
|
|
154
|
+
:param overprovision: Specifies if the VMSS should be overprovisioned. Default: true
|
|
155
|
+
:param public_ip_address: The allocation method for the public IP.
|
|
156
|
+
:param resource_group: An optional reference to the resource group in which to deploy the Virtual Machine. If not provided, the Virtual Machine will be deployed in the default resource group.
|
|
157
|
+
:param scale_in_policy: Specifies the scale-in policy for the VMSS.
|
|
158
|
+
:param sku: The size of the virtual machines in the scale set. Default: "Standard_B2s"
|
|
159
|
+
:param source_image_id: The ID of the source image for the virtual machines.
|
|
160
|
+
:param source_image_reference: The source image reference for the virtual machines. Default: - Uses a default Ubuntu image.
|
|
161
|
+
:param subnet: The subnet in which the virtual machines will be placed.
|
|
162
|
+
:param tags: Tags to apply to the virtual machine scale set.
|
|
163
|
+
:param upgrade_policy_mode: Specifies the scale set's upgrade policy settings.
|
|
164
|
+
:param user_data: Custom data to pass to the virtual machines upon creation.
|
|
165
|
+
:param zones: The availability zone(s) in which the VMs should be placed.
|
|
166
|
+
'''
|
|
167
|
+
if __debug__:
|
|
168
|
+
type_hints = typing.get_type_hints(_typecheckingstub__7fc27996012db416df4e609b98d48137396321f694a3108be3d89d25a4942b65)
|
|
169
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
170
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
171
|
+
props = LinuxClusterProps(
|
|
172
|
+
admin_password=admin_password,
|
|
173
|
+
admin_ssh_key=admin_ssh_key,
|
|
174
|
+
admin_username=admin_username,
|
|
175
|
+
boot_diagnostics_storage_uri=boot_diagnostics_storage_uri,
|
|
176
|
+
custom_data=custom_data,
|
|
177
|
+
enable_ssh_azure_ad_login=enable_ssh_azure_ad_login,
|
|
178
|
+
identity=identity,
|
|
179
|
+
instances=instances,
|
|
180
|
+
location=location,
|
|
181
|
+
name=name,
|
|
182
|
+
os_disk=os_disk,
|
|
183
|
+
overprovision=overprovision,
|
|
184
|
+
public_ip_address=public_ip_address,
|
|
185
|
+
resource_group=resource_group,
|
|
186
|
+
scale_in_policy=scale_in_policy,
|
|
187
|
+
sku=sku,
|
|
188
|
+
source_image_id=source_image_id,
|
|
189
|
+
source_image_reference=source_image_reference,
|
|
190
|
+
subnet=subnet,
|
|
191
|
+
tags=tags,
|
|
192
|
+
upgrade_policy_mode=upgrade_policy_mode,
|
|
193
|
+
user_data=user_data,
|
|
194
|
+
zones=zones,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
198
|
+
|
|
199
|
+
@builtins.property
|
|
200
|
+
@jsii.member(jsii_name="fqn")
|
|
201
|
+
def fqn(self) -> builtins.str:
|
|
202
|
+
return typing.cast(builtins.str, jsii.get(self, "fqn"))
|
|
203
|
+
|
|
204
|
+
@builtins.property
|
|
205
|
+
@jsii.member(jsii_name="name")
|
|
206
|
+
def name(self) -> builtins.str:
|
|
207
|
+
return typing.cast(builtins.str, jsii.get(self, "name"))
|
|
208
|
+
|
|
209
|
+
@builtins.property
|
|
210
|
+
@jsii.member(jsii_name="props")
|
|
211
|
+
def props(self) -> "LinuxClusterProps":
|
|
212
|
+
return typing.cast("LinuxClusterProps", jsii.get(self, "props"))
|
|
213
|
+
|
|
214
|
+
@builtins.property
|
|
215
|
+
@jsii.member(jsii_name="id")
|
|
216
|
+
def id(self) -> builtins.str:
|
|
217
|
+
return typing.cast(builtins.str, jsii.get(self, "id"))
|
|
218
|
+
|
|
219
|
+
@id.setter
|
|
220
|
+
def id(self, value: builtins.str) -> None:
|
|
221
|
+
if __debug__:
|
|
222
|
+
type_hints = typing.get_type_hints(_typecheckingstub__8a5bab57b28263fc46a53ddf95de61b6acea41f2c0228a0ed5bcc955aac7f737)
|
|
223
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
224
|
+
jsii.set(self, "id", value)
|
|
225
|
+
|
|
226
|
+
@builtins.property
|
|
227
|
+
@jsii.member(jsii_name="resourceGroup")
|
|
228
|
+
def resource_group(
|
|
229
|
+
self,
|
|
230
|
+
) -> _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup:
|
|
231
|
+
return typing.cast(_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup, jsii.get(self, "resourceGroup"))
|
|
232
|
+
|
|
233
|
+
@resource_group.setter
|
|
234
|
+
def resource_group(
|
|
235
|
+
self,
|
|
236
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
237
|
+
) -> None:
|
|
238
|
+
if __debug__:
|
|
239
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c1a4f01c717c28ff4221ab482c74fa4fa8e2ccf900d70156ad3055dac288b58c)
|
|
240
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
241
|
+
jsii.set(self, "resourceGroup", value)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
@jsii.data_type(
|
|
245
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualmachinescaleset.LinuxClusterProps",
|
|
246
|
+
jsii_struct_bases=[],
|
|
247
|
+
name_mapping={
|
|
248
|
+
"admin_password": "adminPassword",
|
|
249
|
+
"admin_ssh_key": "adminSshKey",
|
|
250
|
+
"admin_username": "adminUsername",
|
|
251
|
+
"boot_diagnostics_storage_uri": "bootDiagnosticsStorageURI",
|
|
252
|
+
"custom_data": "customData",
|
|
253
|
+
"enable_ssh_azure_ad_login": "enableSshAzureADLogin",
|
|
254
|
+
"identity": "identity",
|
|
255
|
+
"instances": "instances",
|
|
256
|
+
"location": "location",
|
|
257
|
+
"name": "name",
|
|
258
|
+
"os_disk": "osDisk",
|
|
259
|
+
"overprovision": "overprovision",
|
|
260
|
+
"public_ip_address": "publicIPAddress",
|
|
261
|
+
"resource_group": "resourceGroup",
|
|
262
|
+
"scale_in_policy": "scaleInPolicy",
|
|
263
|
+
"sku": "sku",
|
|
264
|
+
"source_image_id": "sourceImageId",
|
|
265
|
+
"source_image_reference": "sourceImageReference",
|
|
266
|
+
"subnet": "subnet",
|
|
267
|
+
"tags": "tags",
|
|
268
|
+
"upgrade_policy_mode": "upgradePolicyMode",
|
|
269
|
+
"user_data": "userData",
|
|
270
|
+
"zones": "zones",
|
|
271
|
+
},
|
|
272
|
+
)
|
|
273
|
+
class LinuxClusterProps:
|
|
274
|
+
def __init__(
|
|
275
|
+
self,
|
|
276
|
+
*,
|
|
277
|
+
admin_password: typing.Optional[builtins.str] = None,
|
|
278
|
+
admin_ssh_key: typing.Optional[typing.Union[_cdktf_9a9027ec.IResolvable, typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineAdminSshKey, typing.Dict[builtins.str, typing.Any]]]]] = None,
|
|
279
|
+
admin_username: typing.Optional[builtins.str] = None,
|
|
280
|
+
boot_diagnostics_storage_uri: typing.Optional[builtins.str] = None,
|
|
281
|
+
custom_data: typing.Optional[builtins.str] = None,
|
|
282
|
+
enable_ssh_azure_ad_login: typing.Optional[builtins.bool] = None,
|
|
283
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
284
|
+
instances: typing.Optional[jsii.Number] = None,
|
|
285
|
+
location: typing.Optional[builtins.str] = None,
|
|
286
|
+
name: typing.Optional[builtins.str] = None,
|
|
287
|
+
os_disk: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineOsDisk, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
288
|
+
overprovision: typing.Optional[builtins.bool] = None,
|
|
289
|
+
public_ip_address: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_scale_set_92bbcedf.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
290
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
291
|
+
scale_in_policy: typing.Optional[builtins.str] = None,
|
|
292
|
+
sku: typing.Optional[builtins.str] = None,
|
|
293
|
+
source_image_id: typing.Optional[builtins.str] = None,
|
|
294
|
+
source_image_reference: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineSourceImageReference, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
295
|
+
subnet: typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet] = None,
|
|
296
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
297
|
+
upgrade_policy_mode: typing.Optional[builtins.str] = None,
|
|
298
|
+
user_data: typing.Optional[builtins.str] = None,
|
|
299
|
+
zones: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
300
|
+
) -> None:
|
|
301
|
+
'''
|
|
302
|
+
:param admin_password: The admin password for the virtual machine.
|
|
303
|
+
:param admin_ssh_key: An array of SSH keys for the admin user.
|
|
304
|
+
:param admin_username: The admin username for the virtual machine.
|
|
305
|
+
:param boot_diagnostics_storage_uri: Boot diagnostics settings for the VMSS.
|
|
306
|
+
:param custom_data: Custom data to pass to the virtual machines upon creation.
|
|
307
|
+
:param enable_ssh_azure_ad_login: Enable SSH Azure AD Login, required managed identity to be set. Default: false
|
|
308
|
+
:param identity: Managed identity settings for the VMs.
|
|
309
|
+
:param instances: The number of VM instances in the scale set. Default: 2
|
|
310
|
+
:param location: The Azure location where the virtual machine scale set should be created. Default: "eastus"
|
|
311
|
+
:param name: The name of the virtual machine scale set. Default: - Uses the name derived from the construct path.
|
|
312
|
+
:param os_disk: The OS disk configuration for the virtual machines. Default: - Uses a disk with caching set to "ReadWrite" and storage account type "Standard_LRS".
|
|
313
|
+
:param overprovision: Specifies if the VMSS should be overprovisioned. Default: true
|
|
314
|
+
:param public_ip_address: The allocation method for the public IP.
|
|
315
|
+
:param resource_group: An optional reference to the resource group in which to deploy the Virtual Machine. If not provided, the Virtual Machine will be deployed in the default resource group.
|
|
316
|
+
:param scale_in_policy: Specifies the scale-in policy for the VMSS.
|
|
317
|
+
:param sku: The size of the virtual machines in the scale set. Default: "Standard_B2s"
|
|
318
|
+
:param source_image_id: The ID of the source image for the virtual machines.
|
|
319
|
+
:param source_image_reference: The source image reference for the virtual machines. Default: - Uses a default Ubuntu image.
|
|
320
|
+
:param subnet: The subnet in which the virtual machines will be placed.
|
|
321
|
+
:param tags: Tags to apply to the virtual machine scale set.
|
|
322
|
+
:param upgrade_policy_mode: Specifies the scale set's upgrade policy settings.
|
|
323
|
+
:param user_data: Custom data to pass to the virtual machines upon creation.
|
|
324
|
+
:param zones: The availability zone(s) in which the VMs should be placed.
|
|
325
|
+
'''
|
|
326
|
+
if isinstance(identity, dict):
|
|
327
|
+
identity = _cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineIdentity(**identity)
|
|
328
|
+
if isinstance(os_disk, dict):
|
|
329
|
+
os_disk = _cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineOsDisk(**os_disk)
|
|
330
|
+
if isinstance(source_image_reference, dict):
|
|
331
|
+
source_image_reference = _cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineSourceImageReference(**source_image_reference)
|
|
332
|
+
if __debug__:
|
|
333
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c770324700497911e54255fe4669fae1f7a3e4b885fcde59827d6d885ecb64be)
|
|
334
|
+
check_type(argname="argument admin_password", value=admin_password, expected_type=type_hints["admin_password"])
|
|
335
|
+
check_type(argname="argument admin_ssh_key", value=admin_ssh_key, expected_type=type_hints["admin_ssh_key"])
|
|
336
|
+
check_type(argname="argument admin_username", value=admin_username, expected_type=type_hints["admin_username"])
|
|
337
|
+
check_type(argname="argument boot_diagnostics_storage_uri", value=boot_diagnostics_storage_uri, expected_type=type_hints["boot_diagnostics_storage_uri"])
|
|
338
|
+
check_type(argname="argument custom_data", value=custom_data, expected_type=type_hints["custom_data"])
|
|
339
|
+
check_type(argname="argument enable_ssh_azure_ad_login", value=enable_ssh_azure_ad_login, expected_type=type_hints["enable_ssh_azure_ad_login"])
|
|
340
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
341
|
+
check_type(argname="argument instances", value=instances, expected_type=type_hints["instances"])
|
|
342
|
+
check_type(argname="argument location", value=location, expected_type=type_hints["location"])
|
|
343
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
344
|
+
check_type(argname="argument os_disk", value=os_disk, expected_type=type_hints["os_disk"])
|
|
345
|
+
check_type(argname="argument overprovision", value=overprovision, expected_type=type_hints["overprovision"])
|
|
346
|
+
check_type(argname="argument public_ip_address", value=public_ip_address, expected_type=type_hints["public_ip_address"])
|
|
347
|
+
check_type(argname="argument resource_group", value=resource_group, expected_type=type_hints["resource_group"])
|
|
348
|
+
check_type(argname="argument scale_in_policy", value=scale_in_policy, expected_type=type_hints["scale_in_policy"])
|
|
349
|
+
check_type(argname="argument sku", value=sku, expected_type=type_hints["sku"])
|
|
350
|
+
check_type(argname="argument source_image_id", value=source_image_id, expected_type=type_hints["source_image_id"])
|
|
351
|
+
check_type(argname="argument source_image_reference", value=source_image_reference, expected_type=type_hints["source_image_reference"])
|
|
352
|
+
check_type(argname="argument subnet", value=subnet, expected_type=type_hints["subnet"])
|
|
353
|
+
check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
|
|
354
|
+
check_type(argname="argument upgrade_policy_mode", value=upgrade_policy_mode, expected_type=type_hints["upgrade_policy_mode"])
|
|
355
|
+
check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
|
|
356
|
+
check_type(argname="argument zones", value=zones, expected_type=type_hints["zones"])
|
|
357
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
358
|
+
if admin_password is not None:
|
|
359
|
+
self._values["admin_password"] = admin_password
|
|
360
|
+
if admin_ssh_key is not None:
|
|
361
|
+
self._values["admin_ssh_key"] = admin_ssh_key
|
|
362
|
+
if admin_username is not None:
|
|
363
|
+
self._values["admin_username"] = admin_username
|
|
364
|
+
if boot_diagnostics_storage_uri is not None:
|
|
365
|
+
self._values["boot_diagnostics_storage_uri"] = boot_diagnostics_storage_uri
|
|
366
|
+
if custom_data is not None:
|
|
367
|
+
self._values["custom_data"] = custom_data
|
|
368
|
+
if enable_ssh_azure_ad_login is not None:
|
|
369
|
+
self._values["enable_ssh_azure_ad_login"] = enable_ssh_azure_ad_login
|
|
370
|
+
if identity is not None:
|
|
371
|
+
self._values["identity"] = identity
|
|
372
|
+
if instances is not None:
|
|
373
|
+
self._values["instances"] = instances
|
|
374
|
+
if location is not None:
|
|
375
|
+
self._values["location"] = location
|
|
376
|
+
if name is not None:
|
|
377
|
+
self._values["name"] = name
|
|
378
|
+
if os_disk is not None:
|
|
379
|
+
self._values["os_disk"] = os_disk
|
|
380
|
+
if overprovision is not None:
|
|
381
|
+
self._values["overprovision"] = overprovision
|
|
382
|
+
if public_ip_address is not None:
|
|
383
|
+
self._values["public_ip_address"] = public_ip_address
|
|
384
|
+
if resource_group is not None:
|
|
385
|
+
self._values["resource_group"] = resource_group
|
|
386
|
+
if scale_in_policy is not None:
|
|
387
|
+
self._values["scale_in_policy"] = scale_in_policy
|
|
388
|
+
if sku is not None:
|
|
389
|
+
self._values["sku"] = sku
|
|
390
|
+
if source_image_id is not None:
|
|
391
|
+
self._values["source_image_id"] = source_image_id
|
|
392
|
+
if source_image_reference is not None:
|
|
393
|
+
self._values["source_image_reference"] = source_image_reference
|
|
394
|
+
if subnet is not None:
|
|
395
|
+
self._values["subnet"] = subnet
|
|
396
|
+
if tags is not None:
|
|
397
|
+
self._values["tags"] = tags
|
|
398
|
+
if upgrade_policy_mode is not None:
|
|
399
|
+
self._values["upgrade_policy_mode"] = upgrade_policy_mode
|
|
400
|
+
if user_data is not None:
|
|
401
|
+
self._values["user_data"] = user_data
|
|
402
|
+
if zones is not None:
|
|
403
|
+
self._values["zones"] = zones
|
|
404
|
+
|
|
405
|
+
@builtins.property
|
|
406
|
+
def admin_password(self) -> typing.Optional[builtins.str]:
|
|
407
|
+
'''The admin password for the virtual machine.'''
|
|
408
|
+
result = self._values.get("admin_password")
|
|
409
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
410
|
+
|
|
411
|
+
@builtins.property
|
|
412
|
+
def admin_ssh_key(
|
|
413
|
+
self,
|
|
414
|
+
) -> typing.Optional[typing.Union[_cdktf_9a9027ec.IResolvable, typing.List[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineAdminSshKey]]]:
|
|
415
|
+
'''An array of SSH keys for the admin user.'''
|
|
416
|
+
result = self._values.get("admin_ssh_key")
|
|
417
|
+
return typing.cast(typing.Optional[typing.Union[_cdktf_9a9027ec.IResolvable, typing.List[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineAdminSshKey]]], result)
|
|
418
|
+
|
|
419
|
+
@builtins.property
|
|
420
|
+
def admin_username(self) -> typing.Optional[builtins.str]:
|
|
421
|
+
'''The admin username for the virtual machine.'''
|
|
422
|
+
result = self._values.get("admin_username")
|
|
423
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
424
|
+
|
|
425
|
+
@builtins.property
|
|
426
|
+
def boot_diagnostics_storage_uri(self) -> typing.Optional[builtins.str]:
|
|
427
|
+
'''Boot diagnostics settings for the VMSS.'''
|
|
428
|
+
result = self._values.get("boot_diagnostics_storage_uri")
|
|
429
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
430
|
+
|
|
431
|
+
@builtins.property
|
|
432
|
+
def custom_data(self) -> typing.Optional[builtins.str]:
|
|
433
|
+
'''Custom data to pass to the virtual machines upon creation.'''
|
|
434
|
+
result = self._values.get("custom_data")
|
|
435
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
436
|
+
|
|
437
|
+
@builtins.property
|
|
438
|
+
def enable_ssh_azure_ad_login(self) -> typing.Optional[builtins.bool]:
|
|
439
|
+
'''Enable SSH Azure AD Login, required managed identity to be set.
|
|
440
|
+
|
|
441
|
+
:default: false
|
|
442
|
+
'''
|
|
443
|
+
result = self._values.get("enable_ssh_azure_ad_login")
|
|
444
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
445
|
+
|
|
446
|
+
@builtins.property
|
|
447
|
+
def identity(
|
|
448
|
+
self,
|
|
449
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineIdentity]:
|
|
450
|
+
'''Managed identity settings for the VMs.'''
|
|
451
|
+
result = self._values.get("identity")
|
|
452
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineIdentity], result)
|
|
453
|
+
|
|
454
|
+
@builtins.property
|
|
455
|
+
def instances(self) -> typing.Optional[jsii.Number]:
|
|
456
|
+
'''The number of VM instances in the scale set.
|
|
457
|
+
|
|
458
|
+
:default: 2
|
|
459
|
+
'''
|
|
460
|
+
result = self._values.get("instances")
|
|
461
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
462
|
+
|
|
463
|
+
@builtins.property
|
|
464
|
+
def location(self) -> typing.Optional[builtins.str]:
|
|
465
|
+
'''The Azure location where the virtual machine scale set should be created.
|
|
466
|
+
|
|
467
|
+
:default: "eastus"
|
|
468
|
+
'''
|
|
469
|
+
result = self._values.get("location")
|
|
470
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
471
|
+
|
|
472
|
+
@builtins.property
|
|
473
|
+
def name(self) -> typing.Optional[builtins.str]:
|
|
474
|
+
'''The name of the virtual machine scale set.
|
|
475
|
+
|
|
476
|
+
:default: - Uses the name derived from the construct path.
|
|
477
|
+
'''
|
|
478
|
+
result = self._values.get("name")
|
|
479
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
480
|
+
|
|
481
|
+
@builtins.property
|
|
482
|
+
def os_disk(
|
|
483
|
+
self,
|
|
484
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineOsDisk]:
|
|
485
|
+
'''The OS disk configuration for the virtual machines.
|
|
486
|
+
|
|
487
|
+
:default: - Uses a disk with caching set to "ReadWrite" and storage account type "Standard_LRS".
|
|
488
|
+
'''
|
|
489
|
+
result = self._values.get("os_disk")
|
|
490
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineOsDisk], result)
|
|
491
|
+
|
|
492
|
+
@builtins.property
|
|
493
|
+
def overprovision(self) -> typing.Optional[builtins.bool]:
|
|
494
|
+
'''Specifies if the VMSS should be overprovisioned.
|
|
495
|
+
|
|
496
|
+
:default: true
|
|
497
|
+
'''
|
|
498
|
+
result = self._values.get("overprovision")
|
|
499
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
500
|
+
|
|
501
|
+
@builtins.property
|
|
502
|
+
def public_ip_address(
|
|
503
|
+
self,
|
|
504
|
+
) -> typing.Optional[typing.List[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_scale_set_92bbcedf.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress]]:
|
|
505
|
+
'''The allocation method for the public IP.'''
|
|
506
|
+
result = self._values.get("public_ip_address")
|
|
507
|
+
return typing.cast(typing.Optional[typing.List[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_scale_set_92bbcedf.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress]], result)
|
|
508
|
+
|
|
509
|
+
@builtins.property
|
|
510
|
+
def resource_group(
|
|
511
|
+
self,
|
|
512
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup]:
|
|
513
|
+
'''An optional reference to the resource group in which to deploy the Virtual Machine.
|
|
514
|
+
|
|
515
|
+
If not provided, the Virtual Machine will be deployed in the default resource group.
|
|
516
|
+
'''
|
|
517
|
+
result = self._values.get("resource_group")
|
|
518
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup], result)
|
|
519
|
+
|
|
520
|
+
@builtins.property
|
|
521
|
+
def scale_in_policy(self) -> typing.Optional[builtins.str]:
|
|
522
|
+
'''Specifies the scale-in policy for the VMSS.'''
|
|
523
|
+
result = self._values.get("scale_in_policy")
|
|
524
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
525
|
+
|
|
526
|
+
@builtins.property
|
|
527
|
+
def sku(self) -> typing.Optional[builtins.str]:
|
|
528
|
+
'''The size of the virtual machines in the scale set.
|
|
529
|
+
|
|
530
|
+
:default: "Standard_B2s"
|
|
531
|
+
'''
|
|
532
|
+
result = self._values.get("sku")
|
|
533
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
534
|
+
|
|
535
|
+
@builtins.property
|
|
536
|
+
def source_image_id(self) -> typing.Optional[builtins.str]:
|
|
537
|
+
'''The ID of the source image for the virtual machines.'''
|
|
538
|
+
result = self._values.get("source_image_id")
|
|
539
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
540
|
+
|
|
541
|
+
@builtins.property
|
|
542
|
+
def source_image_reference(
|
|
543
|
+
self,
|
|
544
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineSourceImageReference]:
|
|
545
|
+
'''The source image reference for the virtual machines.
|
|
546
|
+
|
|
547
|
+
:default: - Uses a default Ubuntu image.
|
|
548
|
+
'''
|
|
549
|
+
result = self._values.get("source_image_reference")
|
|
550
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineSourceImageReference], result)
|
|
551
|
+
|
|
552
|
+
@builtins.property
|
|
553
|
+
def subnet(
|
|
554
|
+
self,
|
|
555
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet]:
|
|
556
|
+
'''The subnet in which the virtual machines will be placed.'''
|
|
557
|
+
result = self._values.get("subnet")
|
|
558
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet], result)
|
|
559
|
+
|
|
560
|
+
@builtins.property
|
|
561
|
+
def tags(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
562
|
+
'''Tags to apply to the virtual machine scale set.'''
|
|
563
|
+
result = self._values.get("tags")
|
|
564
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
565
|
+
|
|
566
|
+
@builtins.property
|
|
567
|
+
def upgrade_policy_mode(self) -> typing.Optional[builtins.str]:
|
|
568
|
+
'''Specifies the scale set's upgrade policy settings.'''
|
|
569
|
+
result = self._values.get("upgrade_policy_mode")
|
|
570
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
571
|
+
|
|
572
|
+
@builtins.property
|
|
573
|
+
def user_data(self) -> typing.Optional[builtins.str]:
|
|
574
|
+
'''Custom data to pass to the virtual machines upon creation.'''
|
|
575
|
+
result = self._values.get("user_data")
|
|
576
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
577
|
+
|
|
578
|
+
@builtins.property
|
|
579
|
+
def zones(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
580
|
+
'''The availability zone(s) in which the VMs should be placed.'''
|
|
581
|
+
result = self._values.get("zones")
|
|
582
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
583
|
+
|
|
584
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
585
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
586
|
+
|
|
587
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
588
|
+
return not (rhs == self)
|
|
589
|
+
|
|
590
|
+
def __repr__(self) -> str:
|
|
591
|
+
return "LinuxClusterProps(%s)" % ", ".join(
|
|
592
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
593
|
+
)
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
class WindowsCluster(
|
|
597
|
+
_AzureResource_74eec1c4,
|
|
598
|
+
metaclass=jsii.JSIIMeta,
|
|
599
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualmachinescaleset.WindowsCluster",
|
|
600
|
+
):
|
|
601
|
+
def __init__(
|
|
602
|
+
self,
|
|
603
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
604
|
+
id: builtins.str,
|
|
605
|
+
*,
|
|
606
|
+
admin_password: builtins.str,
|
|
607
|
+
admin_username: builtins.str,
|
|
608
|
+
boostrap_custom_data: typing.Optional[builtins.str] = None,
|
|
609
|
+
boot_diagnostics_storage_uri: typing.Optional[builtins.str] = None,
|
|
610
|
+
custom_data: typing.Optional[builtins.str] = None,
|
|
611
|
+
instances: typing.Optional[jsii.Number] = None,
|
|
612
|
+
location: typing.Optional[builtins.str] = None,
|
|
613
|
+
name: typing.Optional[builtins.str] = None,
|
|
614
|
+
os_disk: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineOsDisk, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
615
|
+
overprovision: typing.Optional[builtins.bool] = None,
|
|
616
|
+
public_ip_address: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_scale_set_92bbcedf.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
617
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
618
|
+
scale_in_policy: typing.Optional[builtins.str] = None,
|
|
619
|
+
sku: typing.Optional[builtins.str] = None,
|
|
620
|
+
source_image_id: typing.Optional[builtins.str] = None,
|
|
621
|
+
source_image_reference: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineSourceImageReference, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
622
|
+
subnet: typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet] = None,
|
|
623
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
624
|
+
upgrade_policy_mode: typing.Optional[builtins.str] = None,
|
|
625
|
+
zones: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
626
|
+
) -> None:
|
|
627
|
+
'''Represents a Windows Virtual Machine Scale Set (VMSS) within Microsoft Azure.
|
|
628
|
+
|
|
629
|
+
This class provides a way to deploy and manage a scale set of Windows virtual machines, allowing for configurations such as
|
|
630
|
+
auto-scaling, high availability, and simplified patch management. It supports detailed specifications including
|
|
631
|
+
VM size, the operating system image, network settings, and administrative credentials. Additional capabilities include
|
|
632
|
+
custom data scripts, automatic OS updates, and optional features like managed identity and boot diagnostics.
|
|
633
|
+
|
|
634
|
+
:param scope: - The scope in which to define this construct, typically representing the Cloud Development Kit (CDK) application.
|
|
635
|
+
:param id: - The unique identifier for this instance of the Windows cluster, used within the scope for reference.
|
|
636
|
+
:param admin_password: The admin password for the virtual machine.
|
|
637
|
+
:param admin_username: The admin username for the virtual machine.
|
|
638
|
+
:param boostrap_custom_data: Custom data to bootstrap the virtual machine. Automatically triggers Azure Custom Script extension to deploy code in custom data.
|
|
639
|
+
:param boot_diagnostics_storage_uri: Bootdiagnostics settings for the VM.
|
|
640
|
+
:param custom_data: Custom data to pass to the virtual machine upon creation.
|
|
641
|
+
:param instances: The number of VM instances in the scale set. Default: 2
|
|
642
|
+
:param location: The Azure location where the virtual machine should be created. Default: "eastus"
|
|
643
|
+
:param name: The name of the virtual machine. Default: - Uses the name derived from the construct path.
|
|
644
|
+
:param os_disk: The OS disk configuration for the virtual machine. Default: - Uses a disk with caching set to "ReadWrite" and storage account type "Standard_LRS".
|
|
645
|
+
:param overprovision: Specifies if the VMSS should be overprovisioned. Default: true
|
|
646
|
+
:param public_ip_address: The allocation method for the public IP.
|
|
647
|
+
:param resource_group: An optional reference to the resource group in which to deploy the Virtual Machine. If not provided, the Virtual Machine will be deployed in the default resource group.
|
|
648
|
+
:param scale_in_policy: Specifies the scale-in policy for the VMSS.
|
|
649
|
+
:param sku: The size of the virtual machine. Default: "Standard_B2s"
|
|
650
|
+
:param source_image_id: The ID of the source image for the virtual machine.
|
|
651
|
+
:param source_image_reference: The source image reference for the virtual machine. Default: - Uses WindowsServer2022DatacenterCore.
|
|
652
|
+
:param subnet: The subnet in which the virtual machine will be placed. Default: - Uses the default subnet from a new virtual network.
|
|
653
|
+
:param tags: Tags to apply to the virtual machine.
|
|
654
|
+
:param upgrade_policy_mode: Specifies the scale set's upgrade policy settings.
|
|
655
|
+
:param zones: The availability zone(s) in which the VMs should be placed.
|
|
656
|
+
'''
|
|
657
|
+
if __debug__:
|
|
658
|
+
type_hints = typing.get_type_hints(_typecheckingstub__aac85c808c5d3545e52ee7a89ac8b31f11b381bd3735f4a38c774454b1f45d20)
|
|
659
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
660
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
661
|
+
props = WindowsClusterProps(
|
|
662
|
+
admin_password=admin_password,
|
|
663
|
+
admin_username=admin_username,
|
|
664
|
+
boostrap_custom_data=boostrap_custom_data,
|
|
665
|
+
boot_diagnostics_storage_uri=boot_diagnostics_storage_uri,
|
|
666
|
+
custom_data=custom_data,
|
|
667
|
+
instances=instances,
|
|
668
|
+
location=location,
|
|
669
|
+
name=name,
|
|
670
|
+
os_disk=os_disk,
|
|
671
|
+
overprovision=overprovision,
|
|
672
|
+
public_ip_address=public_ip_address,
|
|
673
|
+
resource_group=resource_group,
|
|
674
|
+
scale_in_policy=scale_in_policy,
|
|
675
|
+
sku=sku,
|
|
676
|
+
source_image_id=source_image_id,
|
|
677
|
+
source_image_reference=source_image_reference,
|
|
678
|
+
subnet=subnet,
|
|
679
|
+
tags=tags,
|
|
680
|
+
upgrade_policy_mode=upgrade_policy_mode,
|
|
681
|
+
zones=zones,
|
|
682
|
+
)
|
|
683
|
+
|
|
684
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
685
|
+
|
|
686
|
+
@builtins.property
|
|
687
|
+
@jsii.member(jsii_name="name")
|
|
688
|
+
def name(self) -> builtins.str:
|
|
689
|
+
return typing.cast(builtins.str, jsii.get(self, "name"))
|
|
690
|
+
|
|
691
|
+
@builtins.property
|
|
692
|
+
@jsii.member(jsii_name="props")
|
|
693
|
+
def props(self) -> "WindowsClusterProps":
|
|
694
|
+
return typing.cast("WindowsClusterProps", jsii.get(self, "props"))
|
|
695
|
+
|
|
696
|
+
@builtins.property
|
|
697
|
+
@jsii.member(jsii_name="id")
|
|
698
|
+
def id(self) -> builtins.str:
|
|
699
|
+
return typing.cast(builtins.str, jsii.get(self, "id"))
|
|
700
|
+
|
|
701
|
+
@id.setter
|
|
702
|
+
def id(self, value: builtins.str) -> None:
|
|
703
|
+
if __debug__:
|
|
704
|
+
type_hints = typing.get_type_hints(_typecheckingstub__96215c518fbf8b1f0bbd2b408c969a832a3ea4c0d635c3959d9327a82e188f45)
|
|
705
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
706
|
+
jsii.set(self, "id", value)
|
|
707
|
+
|
|
708
|
+
@builtins.property
|
|
709
|
+
@jsii.member(jsii_name="resourceGroup")
|
|
710
|
+
def resource_group(
|
|
711
|
+
self,
|
|
712
|
+
) -> _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup:
|
|
713
|
+
return typing.cast(_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup, jsii.get(self, "resourceGroup"))
|
|
714
|
+
|
|
715
|
+
@resource_group.setter
|
|
716
|
+
def resource_group(
|
|
717
|
+
self,
|
|
718
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
719
|
+
) -> None:
|
|
720
|
+
if __debug__:
|
|
721
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9af4785819068d3059e7cd42a98719f5e72532df214dd1760024367fe39fbad2)
|
|
722
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
723
|
+
jsii.set(self, "resourceGroup", value)
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
@jsii.data_type(
|
|
727
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_virtualmachinescaleset.WindowsClusterProps",
|
|
728
|
+
jsii_struct_bases=[],
|
|
729
|
+
name_mapping={
|
|
730
|
+
"admin_password": "adminPassword",
|
|
731
|
+
"admin_username": "adminUsername",
|
|
732
|
+
"boostrap_custom_data": "boostrapCustomData",
|
|
733
|
+
"boot_diagnostics_storage_uri": "bootDiagnosticsStorageURI",
|
|
734
|
+
"custom_data": "customData",
|
|
735
|
+
"instances": "instances",
|
|
736
|
+
"location": "location",
|
|
737
|
+
"name": "name",
|
|
738
|
+
"os_disk": "osDisk",
|
|
739
|
+
"overprovision": "overprovision",
|
|
740
|
+
"public_ip_address": "publicIPAddress",
|
|
741
|
+
"resource_group": "resourceGroup",
|
|
742
|
+
"scale_in_policy": "scaleInPolicy",
|
|
743
|
+
"sku": "sku",
|
|
744
|
+
"source_image_id": "sourceImageId",
|
|
745
|
+
"source_image_reference": "sourceImageReference",
|
|
746
|
+
"subnet": "subnet",
|
|
747
|
+
"tags": "tags",
|
|
748
|
+
"upgrade_policy_mode": "upgradePolicyMode",
|
|
749
|
+
"zones": "zones",
|
|
750
|
+
},
|
|
751
|
+
)
|
|
752
|
+
class WindowsClusterProps:
|
|
753
|
+
def __init__(
|
|
754
|
+
self,
|
|
755
|
+
*,
|
|
756
|
+
admin_password: builtins.str,
|
|
757
|
+
admin_username: builtins.str,
|
|
758
|
+
boostrap_custom_data: typing.Optional[builtins.str] = None,
|
|
759
|
+
boot_diagnostics_storage_uri: typing.Optional[builtins.str] = None,
|
|
760
|
+
custom_data: typing.Optional[builtins.str] = None,
|
|
761
|
+
instances: typing.Optional[jsii.Number] = None,
|
|
762
|
+
location: typing.Optional[builtins.str] = None,
|
|
763
|
+
name: typing.Optional[builtins.str] = None,
|
|
764
|
+
os_disk: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineOsDisk, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
765
|
+
overprovision: typing.Optional[builtins.bool] = None,
|
|
766
|
+
public_ip_address: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_scale_set_92bbcedf.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
767
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
768
|
+
scale_in_policy: typing.Optional[builtins.str] = None,
|
|
769
|
+
sku: typing.Optional[builtins.str] = None,
|
|
770
|
+
source_image_id: typing.Optional[builtins.str] = None,
|
|
771
|
+
source_image_reference: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineSourceImageReference, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
772
|
+
subnet: typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet] = None,
|
|
773
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
774
|
+
upgrade_policy_mode: typing.Optional[builtins.str] = None,
|
|
775
|
+
zones: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
776
|
+
) -> None:
|
|
777
|
+
'''
|
|
778
|
+
:param admin_password: The admin password for the virtual machine.
|
|
779
|
+
:param admin_username: The admin username for the virtual machine.
|
|
780
|
+
:param boostrap_custom_data: Custom data to bootstrap the virtual machine. Automatically triggers Azure Custom Script extension to deploy code in custom data.
|
|
781
|
+
:param boot_diagnostics_storage_uri: Bootdiagnostics settings for the VM.
|
|
782
|
+
:param custom_data: Custom data to pass to the virtual machine upon creation.
|
|
783
|
+
:param instances: The number of VM instances in the scale set. Default: 2
|
|
784
|
+
:param location: The Azure location where the virtual machine should be created. Default: "eastus"
|
|
785
|
+
:param name: The name of the virtual machine. Default: - Uses the name derived from the construct path.
|
|
786
|
+
:param os_disk: The OS disk configuration for the virtual machine. Default: - Uses a disk with caching set to "ReadWrite" and storage account type "Standard_LRS".
|
|
787
|
+
:param overprovision: Specifies if the VMSS should be overprovisioned. Default: true
|
|
788
|
+
:param public_ip_address: The allocation method for the public IP.
|
|
789
|
+
:param resource_group: An optional reference to the resource group in which to deploy the Virtual Machine. If not provided, the Virtual Machine will be deployed in the default resource group.
|
|
790
|
+
:param scale_in_policy: Specifies the scale-in policy for the VMSS.
|
|
791
|
+
:param sku: The size of the virtual machine. Default: "Standard_B2s"
|
|
792
|
+
:param source_image_id: The ID of the source image for the virtual machine.
|
|
793
|
+
:param source_image_reference: The source image reference for the virtual machine. Default: - Uses WindowsServer2022DatacenterCore.
|
|
794
|
+
:param subnet: The subnet in which the virtual machine will be placed. Default: - Uses the default subnet from a new virtual network.
|
|
795
|
+
:param tags: Tags to apply to the virtual machine.
|
|
796
|
+
:param upgrade_policy_mode: Specifies the scale set's upgrade policy settings.
|
|
797
|
+
:param zones: The availability zone(s) in which the VMs should be placed.
|
|
798
|
+
'''
|
|
799
|
+
if isinstance(os_disk, dict):
|
|
800
|
+
os_disk = _cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineOsDisk(**os_disk)
|
|
801
|
+
if isinstance(source_image_reference, dict):
|
|
802
|
+
source_image_reference = _cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineSourceImageReference(**source_image_reference)
|
|
803
|
+
if __debug__:
|
|
804
|
+
type_hints = typing.get_type_hints(_typecheckingstub__ff3ab4e46dd61cb52691f16a0779d77034548eb470ba3d06e738ca02a9db7391)
|
|
805
|
+
check_type(argname="argument admin_password", value=admin_password, expected_type=type_hints["admin_password"])
|
|
806
|
+
check_type(argname="argument admin_username", value=admin_username, expected_type=type_hints["admin_username"])
|
|
807
|
+
check_type(argname="argument boostrap_custom_data", value=boostrap_custom_data, expected_type=type_hints["boostrap_custom_data"])
|
|
808
|
+
check_type(argname="argument boot_diagnostics_storage_uri", value=boot_diagnostics_storage_uri, expected_type=type_hints["boot_diagnostics_storage_uri"])
|
|
809
|
+
check_type(argname="argument custom_data", value=custom_data, expected_type=type_hints["custom_data"])
|
|
810
|
+
check_type(argname="argument instances", value=instances, expected_type=type_hints["instances"])
|
|
811
|
+
check_type(argname="argument location", value=location, expected_type=type_hints["location"])
|
|
812
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
813
|
+
check_type(argname="argument os_disk", value=os_disk, expected_type=type_hints["os_disk"])
|
|
814
|
+
check_type(argname="argument overprovision", value=overprovision, expected_type=type_hints["overprovision"])
|
|
815
|
+
check_type(argname="argument public_ip_address", value=public_ip_address, expected_type=type_hints["public_ip_address"])
|
|
816
|
+
check_type(argname="argument resource_group", value=resource_group, expected_type=type_hints["resource_group"])
|
|
817
|
+
check_type(argname="argument scale_in_policy", value=scale_in_policy, expected_type=type_hints["scale_in_policy"])
|
|
818
|
+
check_type(argname="argument sku", value=sku, expected_type=type_hints["sku"])
|
|
819
|
+
check_type(argname="argument source_image_id", value=source_image_id, expected_type=type_hints["source_image_id"])
|
|
820
|
+
check_type(argname="argument source_image_reference", value=source_image_reference, expected_type=type_hints["source_image_reference"])
|
|
821
|
+
check_type(argname="argument subnet", value=subnet, expected_type=type_hints["subnet"])
|
|
822
|
+
check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
|
|
823
|
+
check_type(argname="argument upgrade_policy_mode", value=upgrade_policy_mode, expected_type=type_hints["upgrade_policy_mode"])
|
|
824
|
+
check_type(argname="argument zones", value=zones, expected_type=type_hints["zones"])
|
|
825
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
826
|
+
"admin_password": admin_password,
|
|
827
|
+
"admin_username": admin_username,
|
|
828
|
+
}
|
|
829
|
+
if boostrap_custom_data is not None:
|
|
830
|
+
self._values["boostrap_custom_data"] = boostrap_custom_data
|
|
831
|
+
if boot_diagnostics_storage_uri is not None:
|
|
832
|
+
self._values["boot_diagnostics_storage_uri"] = boot_diagnostics_storage_uri
|
|
833
|
+
if custom_data is not None:
|
|
834
|
+
self._values["custom_data"] = custom_data
|
|
835
|
+
if instances is not None:
|
|
836
|
+
self._values["instances"] = instances
|
|
837
|
+
if location is not None:
|
|
838
|
+
self._values["location"] = location
|
|
839
|
+
if name is not None:
|
|
840
|
+
self._values["name"] = name
|
|
841
|
+
if os_disk is not None:
|
|
842
|
+
self._values["os_disk"] = os_disk
|
|
843
|
+
if overprovision is not None:
|
|
844
|
+
self._values["overprovision"] = overprovision
|
|
845
|
+
if public_ip_address is not None:
|
|
846
|
+
self._values["public_ip_address"] = public_ip_address
|
|
847
|
+
if resource_group is not None:
|
|
848
|
+
self._values["resource_group"] = resource_group
|
|
849
|
+
if scale_in_policy is not None:
|
|
850
|
+
self._values["scale_in_policy"] = scale_in_policy
|
|
851
|
+
if sku is not None:
|
|
852
|
+
self._values["sku"] = sku
|
|
853
|
+
if source_image_id is not None:
|
|
854
|
+
self._values["source_image_id"] = source_image_id
|
|
855
|
+
if source_image_reference is not None:
|
|
856
|
+
self._values["source_image_reference"] = source_image_reference
|
|
857
|
+
if subnet is not None:
|
|
858
|
+
self._values["subnet"] = subnet
|
|
859
|
+
if tags is not None:
|
|
860
|
+
self._values["tags"] = tags
|
|
861
|
+
if upgrade_policy_mode is not None:
|
|
862
|
+
self._values["upgrade_policy_mode"] = upgrade_policy_mode
|
|
863
|
+
if zones is not None:
|
|
864
|
+
self._values["zones"] = zones
|
|
865
|
+
|
|
866
|
+
@builtins.property
|
|
867
|
+
def admin_password(self) -> builtins.str:
|
|
868
|
+
'''The admin password for the virtual machine.'''
|
|
869
|
+
result = self._values.get("admin_password")
|
|
870
|
+
assert result is not None, "Required property 'admin_password' is missing"
|
|
871
|
+
return typing.cast(builtins.str, result)
|
|
872
|
+
|
|
873
|
+
@builtins.property
|
|
874
|
+
def admin_username(self) -> builtins.str:
|
|
875
|
+
'''The admin username for the virtual machine.'''
|
|
876
|
+
result = self._values.get("admin_username")
|
|
877
|
+
assert result is not None, "Required property 'admin_username' is missing"
|
|
878
|
+
return typing.cast(builtins.str, result)
|
|
879
|
+
|
|
880
|
+
@builtins.property
|
|
881
|
+
def boostrap_custom_data(self) -> typing.Optional[builtins.str]:
|
|
882
|
+
'''Custom data to bootstrap the virtual machine.
|
|
883
|
+
|
|
884
|
+
Automatically triggers Azure Custom Script extension to deploy code in custom data.
|
|
885
|
+
'''
|
|
886
|
+
result = self._values.get("boostrap_custom_data")
|
|
887
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
888
|
+
|
|
889
|
+
@builtins.property
|
|
890
|
+
def boot_diagnostics_storage_uri(self) -> typing.Optional[builtins.str]:
|
|
891
|
+
'''Bootdiagnostics settings for the VM.'''
|
|
892
|
+
result = self._values.get("boot_diagnostics_storage_uri")
|
|
893
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
894
|
+
|
|
895
|
+
@builtins.property
|
|
896
|
+
def custom_data(self) -> typing.Optional[builtins.str]:
|
|
897
|
+
'''Custom data to pass to the virtual machine upon creation.'''
|
|
898
|
+
result = self._values.get("custom_data")
|
|
899
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
900
|
+
|
|
901
|
+
@builtins.property
|
|
902
|
+
def instances(self) -> typing.Optional[jsii.Number]:
|
|
903
|
+
'''The number of VM instances in the scale set.
|
|
904
|
+
|
|
905
|
+
:default: 2
|
|
906
|
+
'''
|
|
907
|
+
result = self._values.get("instances")
|
|
908
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
909
|
+
|
|
910
|
+
@builtins.property
|
|
911
|
+
def location(self) -> typing.Optional[builtins.str]:
|
|
912
|
+
'''The Azure location where the virtual machine should be created.
|
|
913
|
+
|
|
914
|
+
:default: "eastus"
|
|
915
|
+
'''
|
|
916
|
+
result = self._values.get("location")
|
|
917
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
918
|
+
|
|
919
|
+
@builtins.property
|
|
920
|
+
def name(self) -> typing.Optional[builtins.str]:
|
|
921
|
+
'''The name of the virtual machine.
|
|
922
|
+
|
|
923
|
+
:default: - Uses the name derived from the construct path.
|
|
924
|
+
'''
|
|
925
|
+
result = self._values.get("name")
|
|
926
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
927
|
+
|
|
928
|
+
@builtins.property
|
|
929
|
+
def os_disk(
|
|
930
|
+
self,
|
|
931
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineOsDisk]:
|
|
932
|
+
'''The OS disk configuration for the virtual machine.
|
|
933
|
+
|
|
934
|
+
:default: - Uses a disk with caching set to "ReadWrite" and storage account type "Standard_LRS".
|
|
935
|
+
'''
|
|
936
|
+
result = self._values.get("os_disk")
|
|
937
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineOsDisk], result)
|
|
938
|
+
|
|
939
|
+
@builtins.property
|
|
940
|
+
def overprovision(self) -> typing.Optional[builtins.bool]:
|
|
941
|
+
'''Specifies if the VMSS should be overprovisioned.
|
|
942
|
+
|
|
943
|
+
:default: true
|
|
944
|
+
'''
|
|
945
|
+
result = self._values.get("overprovision")
|
|
946
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
947
|
+
|
|
948
|
+
@builtins.property
|
|
949
|
+
def public_ip_address(
|
|
950
|
+
self,
|
|
951
|
+
) -> typing.Optional[typing.List[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_scale_set_92bbcedf.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress]]:
|
|
952
|
+
'''The allocation method for the public IP.'''
|
|
953
|
+
result = self._values.get("public_ip_address")
|
|
954
|
+
return typing.cast(typing.Optional[typing.List[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_scale_set_92bbcedf.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress]], result)
|
|
955
|
+
|
|
956
|
+
@builtins.property
|
|
957
|
+
def resource_group(
|
|
958
|
+
self,
|
|
959
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup]:
|
|
960
|
+
'''An optional reference to the resource group in which to deploy the Virtual Machine.
|
|
961
|
+
|
|
962
|
+
If not provided, the Virtual Machine will be deployed in the default resource group.
|
|
963
|
+
'''
|
|
964
|
+
result = self._values.get("resource_group")
|
|
965
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup], result)
|
|
966
|
+
|
|
967
|
+
@builtins.property
|
|
968
|
+
def scale_in_policy(self) -> typing.Optional[builtins.str]:
|
|
969
|
+
'''Specifies the scale-in policy for the VMSS.'''
|
|
970
|
+
result = self._values.get("scale_in_policy")
|
|
971
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
972
|
+
|
|
973
|
+
@builtins.property
|
|
974
|
+
def sku(self) -> typing.Optional[builtins.str]:
|
|
975
|
+
'''The size of the virtual machine.
|
|
976
|
+
|
|
977
|
+
:default: "Standard_B2s"
|
|
978
|
+
'''
|
|
979
|
+
result = self._values.get("sku")
|
|
980
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
981
|
+
|
|
982
|
+
@builtins.property
|
|
983
|
+
def source_image_id(self) -> typing.Optional[builtins.str]:
|
|
984
|
+
'''The ID of the source image for the virtual machine.'''
|
|
985
|
+
result = self._values.get("source_image_id")
|
|
986
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
987
|
+
|
|
988
|
+
@builtins.property
|
|
989
|
+
def source_image_reference(
|
|
990
|
+
self,
|
|
991
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineSourceImageReference]:
|
|
992
|
+
'''The source image reference for the virtual machine.
|
|
993
|
+
|
|
994
|
+
:default: - Uses WindowsServer2022DatacenterCore.
|
|
995
|
+
'''
|
|
996
|
+
result = self._values.get("source_image_reference")
|
|
997
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineSourceImageReference], result)
|
|
998
|
+
|
|
999
|
+
@builtins.property
|
|
1000
|
+
def subnet(
|
|
1001
|
+
self,
|
|
1002
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet]:
|
|
1003
|
+
'''The subnet in which the virtual machine will be placed.
|
|
1004
|
+
|
|
1005
|
+
:default: - Uses the default subnet from a new virtual network.
|
|
1006
|
+
'''
|
|
1007
|
+
result = self._values.get("subnet")
|
|
1008
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet], result)
|
|
1009
|
+
|
|
1010
|
+
@builtins.property
|
|
1011
|
+
def tags(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
1012
|
+
'''Tags to apply to the virtual machine.'''
|
|
1013
|
+
result = self._values.get("tags")
|
|
1014
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
1015
|
+
|
|
1016
|
+
@builtins.property
|
|
1017
|
+
def upgrade_policy_mode(self) -> typing.Optional[builtins.str]:
|
|
1018
|
+
'''Specifies the scale set's upgrade policy settings.'''
|
|
1019
|
+
result = self._values.get("upgrade_policy_mode")
|
|
1020
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
1021
|
+
|
|
1022
|
+
@builtins.property
|
|
1023
|
+
def zones(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
1024
|
+
'''The availability zone(s) in which the VMs should be placed.'''
|
|
1025
|
+
result = self._values.get("zones")
|
|
1026
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
1027
|
+
|
|
1028
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1029
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1030
|
+
|
|
1031
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1032
|
+
return not (rhs == self)
|
|
1033
|
+
|
|
1034
|
+
def __repr__(self) -> str:
|
|
1035
|
+
return "WindowsClusterProps(%s)" % ", ".join(
|
|
1036
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1037
|
+
)
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
__all__ = [
|
|
1041
|
+
"LinuxCluster",
|
|
1042
|
+
"LinuxClusterProps",
|
|
1043
|
+
"WindowsCluster",
|
|
1044
|
+
"WindowsClusterProps",
|
|
1045
|
+
]
|
|
1046
|
+
|
|
1047
|
+
publication.publish()
|
|
1048
|
+
|
|
1049
|
+
def _typecheckingstub__7fc27996012db416df4e609b98d48137396321f694a3108be3d89d25a4942b65(
|
|
1050
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
1051
|
+
id: builtins.str,
|
|
1052
|
+
*,
|
|
1053
|
+
admin_password: typing.Optional[builtins.str] = None,
|
|
1054
|
+
admin_ssh_key: typing.Optional[typing.Union[_cdktf_9a9027ec.IResolvable, typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineAdminSshKey, typing.Dict[builtins.str, typing.Any]]]]] = None,
|
|
1055
|
+
admin_username: typing.Optional[builtins.str] = None,
|
|
1056
|
+
boot_diagnostics_storage_uri: typing.Optional[builtins.str] = None,
|
|
1057
|
+
custom_data: typing.Optional[builtins.str] = None,
|
|
1058
|
+
enable_ssh_azure_ad_login: typing.Optional[builtins.bool] = None,
|
|
1059
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1060
|
+
instances: typing.Optional[jsii.Number] = None,
|
|
1061
|
+
location: typing.Optional[builtins.str] = None,
|
|
1062
|
+
name: typing.Optional[builtins.str] = None,
|
|
1063
|
+
os_disk: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineOsDisk, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1064
|
+
overprovision: typing.Optional[builtins.bool] = None,
|
|
1065
|
+
public_ip_address: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_scale_set_92bbcedf.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
1066
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
1067
|
+
scale_in_policy: typing.Optional[builtins.str] = None,
|
|
1068
|
+
sku: typing.Optional[builtins.str] = None,
|
|
1069
|
+
source_image_id: typing.Optional[builtins.str] = None,
|
|
1070
|
+
source_image_reference: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineSourceImageReference, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1071
|
+
subnet: typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet] = None,
|
|
1072
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
1073
|
+
upgrade_policy_mode: typing.Optional[builtins.str] = None,
|
|
1074
|
+
user_data: typing.Optional[builtins.str] = None,
|
|
1075
|
+
zones: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
1076
|
+
) -> None:
|
|
1077
|
+
"""Type checking stubs"""
|
|
1078
|
+
pass
|
|
1079
|
+
|
|
1080
|
+
def _typecheckingstub__8a5bab57b28263fc46a53ddf95de61b6acea41f2c0228a0ed5bcc955aac7f737(
|
|
1081
|
+
value: builtins.str,
|
|
1082
|
+
) -> None:
|
|
1083
|
+
"""Type checking stubs"""
|
|
1084
|
+
pass
|
|
1085
|
+
|
|
1086
|
+
def _typecheckingstub__c1a4f01c717c28ff4221ab482c74fa4fa8e2ccf900d70156ad3055dac288b58c(
|
|
1087
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
1088
|
+
) -> None:
|
|
1089
|
+
"""Type checking stubs"""
|
|
1090
|
+
pass
|
|
1091
|
+
|
|
1092
|
+
def _typecheckingstub__c770324700497911e54255fe4669fae1f7a3e4b885fcde59827d6d885ecb64be(
|
|
1093
|
+
*,
|
|
1094
|
+
admin_password: typing.Optional[builtins.str] = None,
|
|
1095
|
+
admin_ssh_key: typing.Optional[typing.Union[_cdktf_9a9027ec.IResolvable, typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineAdminSshKey, typing.Dict[builtins.str, typing.Any]]]]] = None,
|
|
1096
|
+
admin_username: typing.Optional[builtins.str] = None,
|
|
1097
|
+
boot_diagnostics_storage_uri: typing.Optional[builtins.str] = None,
|
|
1098
|
+
custom_data: typing.Optional[builtins.str] = None,
|
|
1099
|
+
enable_ssh_azure_ad_login: typing.Optional[builtins.bool] = None,
|
|
1100
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1101
|
+
instances: typing.Optional[jsii.Number] = None,
|
|
1102
|
+
location: typing.Optional[builtins.str] = None,
|
|
1103
|
+
name: typing.Optional[builtins.str] = None,
|
|
1104
|
+
os_disk: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineOsDisk, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1105
|
+
overprovision: typing.Optional[builtins.bool] = None,
|
|
1106
|
+
public_ip_address: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_scale_set_92bbcedf.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
1107
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
1108
|
+
scale_in_policy: typing.Optional[builtins.str] = None,
|
|
1109
|
+
sku: typing.Optional[builtins.str] = None,
|
|
1110
|
+
source_image_id: typing.Optional[builtins.str] = None,
|
|
1111
|
+
source_image_reference: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_linux_virtual_machine_92bbcedf.LinuxVirtualMachineSourceImageReference, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1112
|
+
subnet: typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet] = None,
|
|
1113
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
1114
|
+
upgrade_policy_mode: typing.Optional[builtins.str] = None,
|
|
1115
|
+
user_data: typing.Optional[builtins.str] = None,
|
|
1116
|
+
zones: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
1117
|
+
) -> None:
|
|
1118
|
+
"""Type checking stubs"""
|
|
1119
|
+
pass
|
|
1120
|
+
|
|
1121
|
+
def _typecheckingstub__aac85c808c5d3545e52ee7a89ac8b31f11b381bd3735f4a38c774454b1f45d20(
|
|
1122
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
1123
|
+
id: builtins.str,
|
|
1124
|
+
*,
|
|
1125
|
+
admin_password: builtins.str,
|
|
1126
|
+
admin_username: builtins.str,
|
|
1127
|
+
boostrap_custom_data: typing.Optional[builtins.str] = None,
|
|
1128
|
+
boot_diagnostics_storage_uri: typing.Optional[builtins.str] = None,
|
|
1129
|
+
custom_data: typing.Optional[builtins.str] = None,
|
|
1130
|
+
instances: typing.Optional[jsii.Number] = None,
|
|
1131
|
+
location: typing.Optional[builtins.str] = None,
|
|
1132
|
+
name: typing.Optional[builtins.str] = None,
|
|
1133
|
+
os_disk: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineOsDisk, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1134
|
+
overprovision: typing.Optional[builtins.bool] = None,
|
|
1135
|
+
public_ip_address: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_scale_set_92bbcedf.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
1136
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
1137
|
+
scale_in_policy: typing.Optional[builtins.str] = None,
|
|
1138
|
+
sku: typing.Optional[builtins.str] = None,
|
|
1139
|
+
source_image_id: typing.Optional[builtins.str] = None,
|
|
1140
|
+
source_image_reference: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineSourceImageReference, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1141
|
+
subnet: typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet] = None,
|
|
1142
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
1143
|
+
upgrade_policy_mode: typing.Optional[builtins.str] = None,
|
|
1144
|
+
zones: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
1145
|
+
) -> None:
|
|
1146
|
+
"""Type checking stubs"""
|
|
1147
|
+
pass
|
|
1148
|
+
|
|
1149
|
+
def _typecheckingstub__96215c518fbf8b1f0bbd2b408c969a832a3ea4c0d635c3959d9327a82e188f45(
|
|
1150
|
+
value: builtins.str,
|
|
1151
|
+
) -> None:
|
|
1152
|
+
"""Type checking stubs"""
|
|
1153
|
+
pass
|
|
1154
|
+
|
|
1155
|
+
def _typecheckingstub__9af4785819068d3059e7cd42a98719f5e72532df214dd1760024367fe39fbad2(
|
|
1156
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
1157
|
+
) -> None:
|
|
1158
|
+
"""Type checking stubs"""
|
|
1159
|
+
pass
|
|
1160
|
+
|
|
1161
|
+
def _typecheckingstub__ff3ab4e46dd61cb52691f16a0779d77034548eb470ba3d06e738ca02a9db7391(
|
|
1162
|
+
*,
|
|
1163
|
+
admin_password: builtins.str,
|
|
1164
|
+
admin_username: builtins.str,
|
|
1165
|
+
boostrap_custom_data: typing.Optional[builtins.str] = None,
|
|
1166
|
+
boot_diagnostics_storage_uri: typing.Optional[builtins.str] = None,
|
|
1167
|
+
custom_data: typing.Optional[builtins.str] = None,
|
|
1168
|
+
instances: typing.Optional[jsii.Number] = None,
|
|
1169
|
+
location: typing.Optional[builtins.str] = None,
|
|
1170
|
+
name: typing.Optional[builtins.str] = None,
|
|
1171
|
+
os_disk: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineOsDisk, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1172
|
+
overprovision: typing.Optional[builtins.bool] = None,
|
|
1173
|
+
public_ip_address: typing.Optional[typing.Sequence[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_scale_set_92bbcedf.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
1174
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
1175
|
+
scale_in_policy: typing.Optional[builtins.str] = None,
|
|
1176
|
+
sku: typing.Optional[builtins.str] = None,
|
|
1177
|
+
source_image_id: typing.Optional[builtins.str] = None,
|
|
1178
|
+
source_image_reference: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_windows_virtual_machine_92bbcedf.WindowsVirtualMachineSourceImageReference, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1179
|
+
subnet: typing.Optional[_cdktf_cdktf_provider_azurerm_subnet_92bbcedf.Subnet] = None,
|
|
1180
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
1181
|
+
upgrade_policy_mode: typing.Optional[builtins.str] = None,
|
|
1182
|
+
zones: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
1183
|
+
) -> None:
|
|
1184
|
+
"""Type checking stubs"""
|
|
1185
|
+
pass
|