-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME.yaml
130 lines (110 loc) · 4.02 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name : Terraform AZURE KUBERNETES SERVICE
# License of this project
license: "APACHE"
# Canonical GitHub repo
github_repo: clouddrove/terraform-azure-aks
# Badges to display
badges:
- name: "Terraform"
image: "https://img.shields.io/badge/Terraform-v1.1.7-green"
url: "https://www.terraform.io"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
# description of this project
description: |-
Terraform module to create Azure kubernetes service resource on AZURE.
# extra content
include:
- "terraform.md"
# How to use this project
# How to use this project
usage: |-
Here are some examples of how you can use this module in your inventory structure:
### private_cluster
```hcl
module "aks" {
source = "clouddrove/aks/azure"
name = "app"
environment = "test"
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
kubernetes_version = "1.25.5"
default_node_pool = {
name = "agentpool"
max_pods = 200
os_disk_size_gb = 64
vm_size = "Standard_B2s"
count = 1
enable_node_public_ip = false
}
##### if requred more than one node group.
nodes_pools = [
{
name = "nodegroup1"
max_pods = 200
os_disk_size_gb = 64
vm_size = "Standard_B2s"
count = 1
enable_node_public_ip = false
mode = "User"
},
]
#networking
vnet_id = module.vnet.vnet_id
nodes_subnet_id = module.subnet.default_subnet_id[0]
# acr_id = "****" #pass this value if you want aks to pull image from acr else remove it
# key_vault_id = module.vault.id #pass this value of variable 'cmk_enabled = true' if you want to enable Encryption with a Customer-managed key else remove it.
#### enable diagnostic setting.
microsoft_defender_enabled = true
diagnostic_setting_enable = true
log_analytics_workspace_id = module.log-analytics.workspace_id # when diagnostic_setting_enable = true && oms_agent_enabled = true
}
```
# public_cluster
```hcl
module "aks" {
source = "clouddrove/aks/azure"
name = "app"
environment = "test"
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
kubernetes_version = "1.25.5"
private_cluster_enabled = false
default_node_pool = {
name = "agentpool1"
max_pods = 200
os_disk_size_gb = 64
vm_size = "Standard_B4ms"
count = 1
enable_node_public_ip = false
}
##### if requred more than one node group.
nodes_pools = [
{
name = "nodegroup2"
max_pods = 200
os_disk_size_gb = 64
vm_size = "Standard_B4ms"
count = 1
enable_node_public_ip = false
mode = "User"
},
]
#networking
vnet_id = module.vnet.vnet_id
nodes_subnet_id = module.subnet.default_subnet_id[0]
# acr_id = "****" #pass this value if you want aks to pull image from acr else remove it
# key_vault_id = module.vault.id #pass this value of variable 'cmk_enabled = true' if you want to enable Encryption with a Customer-managed key else remove it.
#### enable diagnostic setting.
microsoft_defender_enabled = true
diagnostic_setting_enable = true
log_analytics_workspace_id = module.log-analytics.workspace_id # when diagnostic_setting_enable = true && oms_agent_enabled = true
}
```