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,400 @@
|
|
|
1
|
+
'''
|
|
2
|
+
# Azure Kubernetes Service (AKS) Construct
|
|
3
|
+
|
|
4
|
+
This documentation details the Azure Kubernetes Service (AKS) Construct, a specialized class designed to simplify the deployment and management of AKS clusters in Azure. It encapsulates the complexities of AKS configuration into an easy-to-use construct, making it straightforward to create and manage Kubernetes clusters.
|
|
5
|
+
|
|
6
|
+
## What is Azure Kubernetes Service (AKS)?
|
|
7
|
+
|
|
8
|
+
Azure Kubernetes Service (AKS) is a managed container orchestration service, based on Kubernetes, that facilitates the deployment, management, and scaling of containerized applications on Azure. It eliminates the complexity of handling the Kubernetes infrastructure, providing users with a serverless Kubernetes, an integrated continuous integration and continuous delivery (CI/CD) experience, and enterprise-grade security and governance.
|
|
9
|
+
|
|
10
|
+
Learn more about AKS in the official Azure documentation.
|
|
11
|
+
|
|
12
|
+
## Best Practices for AKS
|
|
13
|
+
|
|
14
|
+
* **Node Pool Management**: Utilize multiple node pools to separate workloads and manage them efficiently.
|
|
15
|
+
* **Security and Identity**: Leverage Azure Active Directory (AAD) integration for AKS to manage user access and maintain security.
|
|
16
|
+
* **Monitoring and Diagnostics**: Implement Azure Monitor for containers to gain insights into your AKS clusters and workloads.
|
|
17
|
+
* **Cost Management**: Use Azure Advisor to optimize your AKS cluster's performance and manage costs effectively.
|
|
18
|
+
|
|
19
|
+
## AKS Class Properties
|
|
20
|
+
|
|
21
|
+
The class offers numerous properties for tailoring the AKS cluster:
|
|
22
|
+
|
|
23
|
+
* **name**: The unique name of the AKS cluster.
|
|
24
|
+
* **location**: The Azure region where the AKS cluster will be deployed.
|
|
25
|
+
* **resourceGroup**: The Azure Resource Group that the AKS cluster belongs to.
|
|
26
|
+
* **defaultNodePool**: Configuration for the default node pool, including size, type, and other settings.
|
|
27
|
+
* **identity**: Specifies the identity used for the AKS cluster, such as SystemAssigned or UserAssigned.
|
|
28
|
+
* **tags**: Key-value pairs for resource tagging and categorization.
|
|
29
|
+
|
|
30
|
+
## Deploying the AKS Cluster
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
const myAKSCluster = new Cluster(this, 'myAKSCluster', {
|
|
34
|
+
name: 'myCluster',
|
|
35
|
+
location: 'East US',
|
|
36
|
+
defaultNodePool: {
|
|
37
|
+
name: "default",
|
|
38
|
+
nodeCount: 3,
|
|
39
|
+
vmSize: "Standard_DS2_v2",
|
|
40
|
+
},
|
|
41
|
+
resourceGroup: myResourceGroup,
|
|
42
|
+
identity: {
|
|
43
|
+
type: "SystemAssigned",
|
|
44
|
+
},
|
|
45
|
+
// Additional properties
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This code snippet demonstrates how to create a new AKS cluster with specified properties, including the setup of a default node pool.
|
|
50
|
+
|
|
51
|
+
## Setting Up a Resource Group
|
|
52
|
+
|
|
53
|
+
If a resource group is not specified, the construct will automatically create one based on the AKS cluster's name and location. This is handled within the setupResourceGroup method, ensuring that the AKS cluster is associated with a resource group, either existing or newly created.
|
|
54
|
+
|
|
55
|
+
## Integrating with Azure Active Directory (AAD)
|
|
56
|
+
|
|
57
|
+
For enhanced security, integrate AKS with Azure Active Directory (AAD) for authentication and authorization. This can be specified in the identity property of the AKS class.
|
|
58
|
+
|
|
59
|
+
## Monitoring and Management
|
|
60
|
+
|
|
61
|
+
Leverage Azure Monitor and Azure Policy to monitor the health and performance of your AKS cluster and enforce organizational policies. These services help maintain the security and compliance of your Kubernetes applications.
|
|
62
|
+
|
|
63
|
+
By using this AKS Construct, developers can more efficiently manage Kubernetes clusters in Azure, benefiting from the scalability, reliability, and security features of AKS. This construct abstracts away the complexity, making it easier to deploy and operate Kubernetes workloads in the cloud.
|
|
64
|
+
'''
|
|
65
|
+
from pkgutil import extend_path
|
|
66
|
+
__path__ = extend_path(__path__, __name__)
|
|
67
|
+
|
|
68
|
+
import abc
|
|
69
|
+
import builtins
|
|
70
|
+
import datetime
|
|
71
|
+
import enum
|
|
72
|
+
import typing
|
|
73
|
+
|
|
74
|
+
import jsii
|
|
75
|
+
import publication
|
|
76
|
+
import typing_extensions
|
|
77
|
+
|
|
78
|
+
from typeguard import check_type
|
|
79
|
+
|
|
80
|
+
from .._jsii import *
|
|
81
|
+
|
|
82
|
+
import cdktf_cdktf_provider_azurerm.kubernetes_cluster as _cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf
|
|
83
|
+
import cdktf_cdktf_provider_azurerm.resource_group as _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf
|
|
84
|
+
import constructs as _constructs_77d1e7e8
|
|
85
|
+
from ..core_azure import AzureResource as _AzureResource_74eec1c4
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class Cluster(
|
|
89
|
+
_AzureResource_74eec1c4,
|
|
90
|
+
metaclass=jsii.JSIIMeta,
|
|
91
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_kubernetes.Cluster",
|
|
92
|
+
):
|
|
93
|
+
'''Class representing the AKS cluster resource.'''
|
|
94
|
+
|
|
95
|
+
def __init__(
|
|
96
|
+
self,
|
|
97
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
98
|
+
id: builtins.str,
|
|
99
|
+
*,
|
|
100
|
+
default_node_pool: typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterDefaultNodePool, typing.Dict[builtins.str, typing.Any]],
|
|
101
|
+
location: builtins.str,
|
|
102
|
+
name: builtins.str,
|
|
103
|
+
api_server_authorized_ip_ranges: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
104
|
+
azure_active_directory_role_based_access_control: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterAzureActiveDirectoryRoleBasedAccessControl, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
105
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
106
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
107
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
108
|
+
) -> None:
|
|
109
|
+
'''Represents an Azure Kubernetes Service (AKS) cluster resource in Azure.
|
|
110
|
+
|
|
111
|
+
This class is responsible for the creation and management of an AKS cluster, allowing for the deployment and orchestration
|
|
112
|
+
of containerized applications using Kubernetes within the Azure cloud platform.
|
|
113
|
+
|
|
114
|
+
:param scope: - The scope in which to define this construct, typically representing the Cloud Development Kit (CDK) stack.
|
|
115
|
+
:param id: - The unique identifier for this instance of the AKS cluster.
|
|
116
|
+
:param default_node_pool: Configuration for the default node pool of the AKS cluster.
|
|
117
|
+
:param location: The Azure region where the AKS cluster will be deployed.
|
|
118
|
+
:param name: The name of the AKS cluster. Must be unique within the Azure region.
|
|
119
|
+
:param api_server_authorized_ip_ranges: A list of IP address ranges that are authorized to access the AKS API server. This enhances the security of your cluster by ensuring that only traffic from these IP ranges can communicate with the Kubernetes API server. Specifying this list helps to protect your cluster from unauthorized access attempts. It's a critical security measure for clusters that are exposed to the internet. If you specify an empty array, no IP addresses will be allowed to access the API server, effectively blocking all access. If this property is not defined, all IP addresses are allowed by default, which is not recommended for production environments. Example: apiServerAuthorizedIpRanges: ['203.0.113.0/24', '198.51.100.0/24'] It's important to configure this property carefully, based on your organization's network policies and access requirements.
|
|
120
|
+
:param azure_active_directory_role_based_access_control: Configures integration of Azure Active Directory (AAD) with Kubernetes Role-Based Access Control (RBAC) for the AKS cluster. This feature enables the use of AAD to manage user and group access permissions to the Kubernetes cluster resources, leveraging AAD's robust identity and access management capabilities. Utilizing AAD with Kubernetes RBAC provides: - Enhanced security through AAD's identity protection features. - Simplified user and group management by leveraging existing AAD definitions. - Streamlined access control for Kubernetes resources, allowing for the definition of roles and role bindings based on AAD identities. This property is optional but highly recommended for clusters where security and access governance are a priority. It allows for finer-grained access control and integrates the cluster's authentication and authorization processes with corporate identity management systems. Example configuration might include specifying the AAD tenant details, enabling Azure RBAC for Kubernetes authorization, and optionally defining specific AAD groups for cluster admin roles.
|
|
121
|
+
:param identity: The identity used for the AKS cluster. Can be either SystemAssigned or UserAssigned. Optional.
|
|
122
|
+
:param resource_group: The Azure Resource Group where the AKS cluster will be deployed. Optional. If not provided, a new resource group will be created.
|
|
123
|
+
:param tags: Tags to be applied to the AKS cluster resources for organizational purposes. Key-value pairs. Optional.
|
|
124
|
+
'''
|
|
125
|
+
if __debug__:
|
|
126
|
+
type_hints = typing.get_type_hints(_typecheckingstub__a6b77c9c195f92f6162e6aea4254e8f0f8e70d38a830c7d18363eb25079b709e)
|
|
127
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
128
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
129
|
+
props = ClusterProps(
|
|
130
|
+
default_node_pool=default_node_pool,
|
|
131
|
+
location=location,
|
|
132
|
+
name=name,
|
|
133
|
+
api_server_authorized_ip_ranges=api_server_authorized_ip_ranges,
|
|
134
|
+
azure_active_directory_role_based_access_control=azure_active_directory_role_based_access_control,
|
|
135
|
+
identity=identity,
|
|
136
|
+
resource_group=resource_group,
|
|
137
|
+
tags=tags,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
141
|
+
|
|
142
|
+
@builtins.property
|
|
143
|
+
@jsii.member(jsii_name="id")
|
|
144
|
+
def id(self) -> builtins.str:
|
|
145
|
+
'''The unique identifier of the AKS cluster resource.'''
|
|
146
|
+
return typing.cast(builtins.str, jsii.get(self, "id"))
|
|
147
|
+
|
|
148
|
+
@id.setter
|
|
149
|
+
def id(self, value: builtins.str) -> None:
|
|
150
|
+
if __debug__:
|
|
151
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9f9dd7483ce17741f78c42ef8a805c73d4067ad671051e85a0fa94f6bd7ab3c8)
|
|
152
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
153
|
+
jsii.set(self, "id", value)
|
|
154
|
+
|
|
155
|
+
@builtins.property
|
|
156
|
+
@jsii.member(jsii_name="resourceGroup")
|
|
157
|
+
def resource_group(
|
|
158
|
+
self,
|
|
159
|
+
) -> _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup:
|
|
160
|
+
'''The Resource Group associated with the AKS cluster.'''
|
|
161
|
+
return typing.cast(_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup, jsii.get(self, "resourceGroup"))
|
|
162
|
+
|
|
163
|
+
@resource_group.setter
|
|
164
|
+
def resource_group(
|
|
165
|
+
self,
|
|
166
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
167
|
+
) -> None:
|
|
168
|
+
if __debug__:
|
|
169
|
+
type_hints = typing.get_type_hints(_typecheckingstub__b1b786454b7f043135b451fd7668fc137f16801e24c654bc75aa7933876273f6)
|
|
170
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
171
|
+
jsii.set(self, "resourceGroup", value)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
@jsii.data_type(
|
|
175
|
+
jsii_type="@microsoft/terraform-cdk-constructs.azure_kubernetes.ClusterProps",
|
|
176
|
+
jsii_struct_bases=[],
|
|
177
|
+
name_mapping={
|
|
178
|
+
"default_node_pool": "defaultNodePool",
|
|
179
|
+
"location": "location",
|
|
180
|
+
"name": "name",
|
|
181
|
+
"api_server_authorized_ip_ranges": "apiServerAuthorizedIpRanges",
|
|
182
|
+
"azure_active_directory_role_based_access_control": "azureActiveDirectoryRoleBasedAccessControl",
|
|
183
|
+
"identity": "identity",
|
|
184
|
+
"resource_group": "resourceGroup",
|
|
185
|
+
"tags": "tags",
|
|
186
|
+
},
|
|
187
|
+
)
|
|
188
|
+
class ClusterProps:
|
|
189
|
+
def __init__(
|
|
190
|
+
self,
|
|
191
|
+
*,
|
|
192
|
+
default_node_pool: typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterDefaultNodePool, typing.Dict[builtins.str, typing.Any]],
|
|
193
|
+
location: builtins.str,
|
|
194
|
+
name: builtins.str,
|
|
195
|
+
api_server_authorized_ip_ranges: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
196
|
+
azure_active_directory_role_based_access_control: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterAzureActiveDirectoryRoleBasedAccessControl, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
197
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
198
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
199
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
200
|
+
) -> None:
|
|
201
|
+
'''Interface defining the properties required to create an AKS cluster.
|
|
202
|
+
|
|
203
|
+
:param default_node_pool: Configuration for the default node pool of the AKS cluster.
|
|
204
|
+
:param location: The Azure region where the AKS cluster will be deployed.
|
|
205
|
+
:param name: The name of the AKS cluster. Must be unique within the Azure region.
|
|
206
|
+
:param api_server_authorized_ip_ranges: A list of IP address ranges that are authorized to access the AKS API server. This enhances the security of your cluster by ensuring that only traffic from these IP ranges can communicate with the Kubernetes API server. Specifying this list helps to protect your cluster from unauthorized access attempts. It's a critical security measure for clusters that are exposed to the internet. If you specify an empty array, no IP addresses will be allowed to access the API server, effectively blocking all access. If this property is not defined, all IP addresses are allowed by default, which is not recommended for production environments. Example: apiServerAuthorizedIpRanges: ['203.0.113.0/24', '198.51.100.0/24'] It's important to configure this property carefully, based on your organization's network policies and access requirements.
|
|
207
|
+
:param azure_active_directory_role_based_access_control: Configures integration of Azure Active Directory (AAD) with Kubernetes Role-Based Access Control (RBAC) for the AKS cluster. This feature enables the use of AAD to manage user and group access permissions to the Kubernetes cluster resources, leveraging AAD's robust identity and access management capabilities. Utilizing AAD with Kubernetes RBAC provides: - Enhanced security through AAD's identity protection features. - Simplified user and group management by leveraging existing AAD definitions. - Streamlined access control for Kubernetes resources, allowing for the definition of roles and role bindings based on AAD identities. This property is optional but highly recommended for clusters where security and access governance are a priority. It allows for finer-grained access control and integrates the cluster's authentication and authorization processes with corporate identity management systems. Example configuration might include specifying the AAD tenant details, enabling Azure RBAC for Kubernetes authorization, and optionally defining specific AAD groups for cluster admin roles.
|
|
208
|
+
:param identity: The identity used for the AKS cluster. Can be either SystemAssigned or UserAssigned. Optional.
|
|
209
|
+
:param resource_group: The Azure Resource Group where the AKS cluster will be deployed. Optional. If not provided, a new resource group will be created.
|
|
210
|
+
:param tags: Tags to be applied to the AKS cluster resources for organizational purposes. Key-value pairs. Optional.
|
|
211
|
+
'''
|
|
212
|
+
if isinstance(default_node_pool, dict):
|
|
213
|
+
default_node_pool = _cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterDefaultNodePool(**default_node_pool)
|
|
214
|
+
if isinstance(azure_active_directory_role_based_access_control, dict):
|
|
215
|
+
azure_active_directory_role_based_access_control = _cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterAzureActiveDirectoryRoleBasedAccessControl(**azure_active_directory_role_based_access_control)
|
|
216
|
+
if isinstance(identity, dict):
|
|
217
|
+
identity = _cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterIdentity(**identity)
|
|
218
|
+
if __debug__:
|
|
219
|
+
type_hints = typing.get_type_hints(_typecheckingstub__0dcfbe3e3bbbed5a4eec60aa68b388884bb7f833bc1d27e64e538b3ca65ba191)
|
|
220
|
+
check_type(argname="argument default_node_pool", value=default_node_pool, expected_type=type_hints["default_node_pool"])
|
|
221
|
+
check_type(argname="argument location", value=location, expected_type=type_hints["location"])
|
|
222
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
223
|
+
check_type(argname="argument api_server_authorized_ip_ranges", value=api_server_authorized_ip_ranges, expected_type=type_hints["api_server_authorized_ip_ranges"])
|
|
224
|
+
check_type(argname="argument azure_active_directory_role_based_access_control", value=azure_active_directory_role_based_access_control, expected_type=type_hints["azure_active_directory_role_based_access_control"])
|
|
225
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
226
|
+
check_type(argname="argument resource_group", value=resource_group, expected_type=type_hints["resource_group"])
|
|
227
|
+
check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
|
|
228
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
229
|
+
"default_node_pool": default_node_pool,
|
|
230
|
+
"location": location,
|
|
231
|
+
"name": name,
|
|
232
|
+
}
|
|
233
|
+
if api_server_authorized_ip_ranges is not None:
|
|
234
|
+
self._values["api_server_authorized_ip_ranges"] = api_server_authorized_ip_ranges
|
|
235
|
+
if azure_active_directory_role_based_access_control is not None:
|
|
236
|
+
self._values["azure_active_directory_role_based_access_control"] = azure_active_directory_role_based_access_control
|
|
237
|
+
if identity is not None:
|
|
238
|
+
self._values["identity"] = identity
|
|
239
|
+
if resource_group is not None:
|
|
240
|
+
self._values["resource_group"] = resource_group
|
|
241
|
+
if tags is not None:
|
|
242
|
+
self._values["tags"] = tags
|
|
243
|
+
|
|
244
|
+
@builtins.property
|
|
245
|
+
def default_node_pool(
|
|
246
|
+
self,
|
|
247
|
+
) -> _cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterDefaultNodePool:
|
|
248
|
+
'''Configuration for the default node pool of the AKS cluster.'''
|
|
249
|
+
result = self._values.get("default_node_pool")
|
|
250
|
+
assert result is not None, "Required property 'default_node_pool' is missing"
|
|
251
|
+
return typing.cast(_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterDefaultNodePool, result)
|
|
252
|
+
|
|
253
|
+
@builtins.property
|
|
254
|
+
def location(self) -> builtins.str:
|
|
255
|
+
'''The Azure region where the AKS cluster will be deployed.'''
|
|
256
|
+
result = self._values.get("location")
|
|
257
|
+
assert result is not None, "Required property 'location' is missing"
|
|
258
|
+
return typing.cast(builtins.str, result)
|
|
259
|
+
|
|
260
|
+
@builtins.property
|
|
261
|
+
def name(self) -> builtins.str:
|
|
262
|
+
'''The name of the AKS cluster.
|
|
263
|
+
|
|
264
|
+
Must be unique within the Azure region.
|
|
265
|
+
'''
|
|
266
|
+
result = self._values.get("name")
|
|
267
|
+
assert result is not None, "Required property 'name' is missing"
|
|
268
|
+
return typing.cast(builtins.str, result)
|
|
269
|
+
|
|
270
|
+
@builtins.property
|
|
271
|
+
def api_server_authorized_ip_ranges(
|
|
272
|
+
self,
|
|
273
|
+
) -> typing.Optional[typing.List[builtins.str]]:
|
|
274
|
+
'''A list of IP address ranges that are authorized to access the AKS API server.
|
|
275
|
+
|
|
276
|
+
This enhances the security of your cluster by ensuring that only traffic from these IP ranges can communicate with the Kubernetes API server.
|
|
277
|
+
|
|
278
|
+
Specifying this list helps to protect your cluster from unauthorized access attempts. It's a critical security measure for clusters that are exposed to the internet. If you specify an empty array, no IP addresses will be allowed to access the API server, effectively blocking all access. If this property is not defined, all IP addresses are allowed by default, which is not recommended for production environments.
|
|
279
|
+
|
|
280
|
+
Example:
|
|
281
|
+
apiServerAuthorizedIpRanges: ['203.0.113.0/24', '198.51.100.0/24']
|
|
282
|
+
|
|
283
|
+
It's important to configure this property carefully, based on your organization's network policies and access requirements.
|
|
284
|
+
'''
|
|
285
|
+
result = self._values.get("api_server_authorized_ip_ranges")
|
|
286
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
287
|
+
|
|
288
|
+
@builtins.property
|
|
289
|
+
def azure_active_directory_role_based_access_control(
|
|
290
|
+
self,
|
|
291
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterAzureActiveDirectoryRoleBasedAccessControl]:
|
|
292
|
+
'''Configures integration of Azure Active Directory (AAD) with Kubernetes Role-Based Access Control (RBAC) for the AKS cluster.
|
|
293
|
+
|
|
294
|
+
This feature enables the use of AAD to manage user and group access permissions to the Kubernetes cluster resources, leveraging AAD's robust identity and access management capabilities.
|
|
295
|
+
|
|
296
|
+
Utilizing AAD with Kubernetes RBAC provides:
|
|
297
|
+
|
|
298
|
+
- Enhanced security through AAD's identity protection features.
|
|
299
|
+
- Simplified user and group management by leveraging existing AAD definitions.
|
|
300
|
+
- Streamlined access control for Kubernetes resources, allowing for the definition of roles and role bindings based on AAD identities.
|
|
301
|
+
|
|
302
|
+
This property is optional but highly recommended for clusters where security and access governance are a priority. It allows for finer-grained access control and integrates the cluster's authentication and authorization processes with corporate identity management systems.
|
|
303
|
+
|
|
304
|
+
Example configuration might include specifying the AAD tenant details, enabling Azure RBAC for Kubernetes authorization, and optionally defining specific AAD groups for cluster admin roles.
|
|
305
|
+
'''
|
|
306
|
+
result = self._values.get("azure_active_directory_role_based_access_control")
|
|
307
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterAzureActiveDirectoryRoleBasedAccessControl], result)
|
|
308
|
+
|
|
309
|
+
@builtins.property
|
|
310
|
+
def identity(
|
|
311
|
+
self,
|
|
312
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterIdentity]:
|
|
313
|
+
'''The identity used for the AKS cluster.
|
|
314
|
+
|
|
315
|
+
Can be either SystemAssigned or UserAssigned.
|
|
316
|
+
Optional.
|
|
317
|
+
'''
|
|
318
|
+
result = self._values.get("identity")
|
|
319
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterIdentity], result)
|
|
320
|
+
|
|
321
|
+
@builtins.property
|
|
322
|
+
def resource_group(
|
|
323
|
+
self,
|
|
324
|
+
) -> typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup]:
|
|
325
|
+
'''The Azure Resource Group where the AKS cluster will be deployed.
|
|
326
|
+
|
|
327
|
+
Optional. If not provided, a new resource group will be created.
|
|
328
|
+
'''
|
|
329
|
+
result = self._values.get("resource_group")
|
|
330
|
+
return typing.cast(typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup], result)
|
|
331
|
+
|
|
332
|
+
@builtins.property
|
|
333
|
+
def tags(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
334
|
+
'''Tags to be applied to the AKS cluster resources for organizational purposes.
|
|
335
|
+
|
|
336
|
+
Key-value pairs. Optional.
|
|
337
|
+
'''
|
|
338
|
+
result = self._values.get("tags")
|
|
339
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
340
|
+
|
|
341
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
342
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
343
|
+
|
|
344
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
345
|
+
return not (rhs == self)
|
|
346
|
+
|
|
347
|
+
def __repr__(self) -> str:
|
|
348
|
+
return "ClusterProps(%s)" % ", ".join(
|
|
349
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
__all__ = [
|
|
354
|
+
"Cluster",
|
|
355
|
+
"ClusterProps",
|
|
356
|
+
]
|
|
357
|
+
|
|
358
|
+
publication.publish()
|
|
359
|
+
|
|
360
|
+
def _typecheckingstub__a6b77c9c195f92f6162e6aea4254e8f0f8e70d38a830c7d18363eb25079b709e(
|
|
361
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
362
|
+
id: builtins.str,
|
|
363
|
+
*,
|
|
364
|
+
default_node_pool: typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterDefaultNodePool, typing.Dict[builtins.str, typing.Any]],
|
|
365
|
+
location: builtins.str,
|
|
366
|
+
name: builtins.str,
|
|
367
|
+
api_server_authorized_ip_ranges: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
368
|
+
azure_active_directory_role_based_access_control: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterAzureActiveDirectoryRoleBasedAccessControl, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
369
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
370
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
371
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
372
|
+
) -> None:
|
|
373
|
+
"""Type checking stubs"""
|
|
374
|
+
pass
|
|
375
|
+
|
|
376
|
+
def _typecheckingstub__9f9dd7483ce17741f78c42ef8a805c73d4067ad671051e85a0fa94f6bd7ab3c8(
|
|
377
|
+
value: builtins.str,
|
|
378
|
+
) -> None:
|
|
379
|
+
"""Type checking stubs"""
|
|
380
|
+
pass
|
|
381
|
+
|
|
382
|
+
def _typecheckingstub__b1b786454b7f043135b451fd7668fc137f16801e24c654bc75aa7933876273f6(
|
|
383
|
+
value: _cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup,
|
|
384
|
+
) -> None:
|
|
385
|
+
"""Type checking stubs"""
|
|
386
|
+
pass
|
|
387
|
+
|
|
388
|
+
def _typecheckingstub__0dcfbe3e3bbbed5a4eec60aa68b388884bb7f833bc1d27e64e538b3ca65ba191(
|
|
389
|
+
*,
|
|
390
|
+
default_node_pool: typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterDefaultNodePool, typing.Dict[builtins.str, typing.Any]],
|
|
391
|
+
location: builtins.str,
|
|
392
|
+
name: builtins.str,
|
|
393
|
+
api_server_authorized_ip_ranges: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
394
|
+
azure_active_directory_role_based_access_control: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterAzureActiveDirectoryRoleBasedAccessControl, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
395
|
+
identity: typing.Optional[typing.Union[_cdktf_cdktf_provider_azurerm_kubernetes_cluster_92bbcedf.KubernetesClusterIdentity, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
396
|
+
resource_group: typing.Optional[_cdktf_cdktf_provider_azurerm_resource_group_92bbcedf.ResourceGroup] = None,
|
|
397
|
+
tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
398
|
+
) -> None:
|
|
399
|
+
"""Type checking stubs"""
|
|
400
|
+
pass
|