Skip to content

Commit 1920e18

Browse files
committed
feat: updating Readme files
1 parent 491e71a commit 1920e18

File tree

3 files changed

+243
-86
lines changed

3 files changed

+243
-86
lines changed

modules/azure/aks/backplane/README.md

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,64 @@ No modules.
2323

2424
| Name | Type |
2525
|------|------|
26-
| [azurerm_role_assignment.buildingblock_deploy](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
27-
| [azurerm_role_assignment.buildingblock_deploy_hub](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
26+
| [azuread_application.buildingblock_deploy](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application) | resource |
27+
| [azuread_application.buildingblock_deploy_hub](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application) | resource |
28+
| [azuread_application_federated_identity_credential.buildingblock_deploy](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_federated_identity_credential) | resource |
29+
| [azuread_application_federated_identity_credential.buildingblock_deploy_hub](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_federated_identity_credential) | resource |
30+
| [azuread_application_password.buildingblock_deploy](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_password) | resource |
31+
| [azuread_application_password.buildingblock_deploy_hub](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_password) | resource |
32+
| [azuread_service_principal.buildingblock_deploy](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/service_principal) | resource |
33+
| [azuread_service_principal.buildingblock_deploy_hub](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/service_principal) | resource |
34+
| [azurerm_role_assignment.created_principal](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
35+
| [azurerm_role_assignment.created_principal_hub](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
36+
| [azurerm_role_assignment.created_principal_hub_to_landingzone](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
37+
| [azurerm_role_assignment.created_principal_landingzone_to_hub](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
38+
| [azurerm_role_assignment.existing_principals](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
39+
| [azurerm_role_assignment.existing_principals_hub](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
40+
| [azurerm_role_assignment.existing_principals_hub_to_landingzone](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
41+
| [azurerm_role_assignment.existing_principals_landingzone_to_hub](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
2842
| [azurerm_role_definition.buildingblock_deploy](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_definition) | resource |
2943
| [azurerm_role_definition.buildingblock_deploy_hub](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_definition) | resource |
44+
| [azurerm_role_definition.buildingblock_hub_to_landingzone](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_definition) | resource |
45+
| [azurerm_role_definition.buildingblock_landingzone_to_hub](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_definition) | resource |
46+
| [azurerm_subscription.current](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subscription) | data source |
3047

3148
## Inputs
3249

3350
| Name | Description | Type | Default | Required |
3451
|------|-------------|------|---------|:--------:|
52+
| <a name="input_create_hub_service_principal_name"></a> [create\_hub\_service\_principal\_name](#input\_create\_hub\_service\_principal\_name) | name of a separate service principal to create for hub VNet peering (least privilege) | `string` | `null` | no |
53+
| <a name="input_create_service_principal_name"></a> [create\_service\_principal\_name](#input\_create\_service\_principal\_name) | name of a service principal to create and grant permissions to deploy the building block | `string` | `null` | no |
54+
| <a name="input_existing_hub_principal_ids"></a> [existing\_hub\_principal\_ids](#input\_existing\_hub\_principal\_ids) | set of existing principal ids that will be granted permissions to peer with the hub VNet | `set(string)` | `[]` | no |
55+
| <a name="input_existing_principal_ids"></a> [existing\_principal\_ids](#input\_existing\_principal\_ids) | set of existing principal ids that will be granted permissions to deploy the building block | `set(string)` | `[]` | no |
56+
| <a name="input_hub_scope"></a> [hub\_scope](#input\_hub\_scope) | Scope for hub VNet peering permissions (management group or subscription). Typically a hub subscription, but can be a management group containing hub resources. | `string` | n/a | yes |
57+
| <a name="input_hub_workload_identity_federation"></a> [hub\_workload\_identity\_federation](#input\_hub\_workload\_identity\_federation) | Configuration for workload identity federation for hub service principal. If not provided, an application password will be created instead. | <pre>object({<br> issuer = string<br> subject = string<br> })</pre> | `null` | no |
3558
| <a name="input_name"></a> [name](#input\_name) | name of the building block, used for naming resources | `string` | `"aks"` | no |
36-
| <a name="input_principal_ids"></a> [principal\_ids](#input\_principal\_ids) | set of principal ids that will be granted permissions to deploy the building block | `set(string)` | n/a | yes |
37-
| <a name="input_scope"></a> [scope](#input\_scope) | Scope where the building block should be deployable, typically the parent of all Landing Zones. | `string` | n/a | yes |
59+
| <a name="input_scope"></a> [scope](#input\_scope) | Scope where the building block should be deployable (management group or subscription), typically the parent of all Landing Zones. | `string` | n/a | yes |
60+
| <a name="input_workload_identity_federation"></a> [workload\_identity\_federation](#input\_workload\_identity\_federation) | Configuration for workload identity federation. If not provided, an application password will be created instead. | <pre>object({<br> issuer = string<br> subject = string<br> })</pre> | `null` | no |
3861

3962
## Outputs
4063

4164
| Name | Description |
4265
|------|-------------|
66+
| <a name="output_application_password"></a> [application\_password](#output\_application\_password) | Information about the created application password (excludes the actual password value for security). |
67+
| <a name="output_created_application"></a> [created\_application](#output\_created\_application) | Information about the created Azure AD application. |
68+
| <a name="output_created_hub_application"></a> [created\_hub\_application](#output\_created\_hub\_application) | Information about the created hub Azure AD application. |
69+
| <a name="output_created_hub_service_principal"></a> [created\_hub\_service\_principal](#output\_created\_hub\_service\_principal) | Information about the created hub service principal. |
70+
| <a name="output_created_service_principal"></a> [created\_service\_principal](#output\_created\_service\_principal) | Information about the created service principal. |
4371
| <a name="output_documentation_md"></a> [documentation\_md](#output\_documentation\_md) | Markdown documentation with information about the AKS Building Block building block backplane |
44-
| <a name="output_hub_role_assignment_ids"></a> [hub\_role\_assignment\_ids](#output\_hub\_role\_assignment\_ids) | The IDs of the hub role assignments for the service principals. |
45-
| <a name="output_hub_role_assignment_principal_ids"></a> [hub\_role\_assignment\_principal\_ids](#output\_hub\_role\_assignment\_principal\_ids) | The principal IDs of the service principals that have been assigned the hub role. |
72+
| <a name="output_hub_application_password"></a> [hub\_application\_password](#output\_hub\_application\_password) | Information about the created hub application password (excludes the actual password value for security). |
73+
| <a name="output_hub_role_assignment_ids"></a> [hub\_role\_assignment\_ids](#output\_hub\_role\_assignment\_ids) | The IDs of the hub role assignments for all service principals. |
74+
| <a name="output_hub_role_assignment_principal_ids"></a> [hub\_role\_assignment\_principal\_ids](#output\_hub\_role\_assignment\_principal\_ids) | The principal IDs of all service principals that have been assigned the hub role. |
4675
| <a name="output_hub_role_definition_id"></a> [hub\_role\_definition\_id](#output\_hub\_role\_definition\_id) | The ID of the role definition that enables deployment of the building block to the hub. |
4776
| <a name="output_hub_role_definition_name"></a> [hub\_role\_definition\_name](#output\_hub\_role\_definition\_name) | The name of the role definition that enables deployment of the building block to the hub. |
48-
| <a name="output_role_assignment_ids"></a> [role\_assignment\_ids](#output\_role\_assignment\_ids) | The IDs of the role assignments for the service principals. |
49-
| <a name="output_role_assignment_principal_ids"></a> [role\_assignment\_principal\_ids](#output\_role\_assignment\_principal\_ids) | The principal IDs of the service principals that have been assigned the role. |
50-
| <a name="output_role_definition_id"></a> [role\_definition\_id](#output\_role\_definition\_id) | The ID of the role definition that enables deployment of the building block to subscriptions. |
51-
| <a name="output_role_definition_name"></a> [role\_definition\_name](#output\_role\_definition\_name) | The name of the role definition that enables deployment of the building block to subscriptions. |
77+
| <a name="output_hub_scope"></a> [hub\_scope](#output\_hub\_scope) | The scope (management group or subscription) where VNet peering role is applied. |
78+
| <a name="output_hub_workload_identity_federation"></a> [hub\_workload\_identity\_federation](#output\_hub\_workload\_identity\_federation) | Information about the created hub workload identity federation credential. |
79+
| <a name="output_provider_tf"></a> [provider\_tf](#output\_provider\_tf) | Ready-to-use provider.tf configuration for buildingblock deployment |
80+
| <a name="output_role_assignment_ids"></a> [role\_assignment\_ids](#output\_role\_assignment\_ids) | The IDs of the role assignments for all service principals. |
81+
| <a name="output_role_assignment_principal_ids"></a> [role\_assignment\_principal\_ids](#output\_role\_assignment\_principal\_ids) | The principal IDs of all service principals that have been assigned the role. |
82+
| <a name="output_role_definition_id"></a> [role\_definition\_id](#output\_role\_definition\_id) | The ID of the role definition that enables deployment of the building block. |
83+
| <a name="output_role_definition_name"></a> [role\_definition\_name](#output\_role\_definition\_name) | The name of the role definition that enables deployment of the building block. |
5284
| <a name="output_scope"></a> [scope](#output\_scope) | The scope where the role definition and role assignments are applied. |
85+
| <a name="output_workload_identity_federation"></a> [workload\_identity\_federation](#output\_workload\_identity\_federation) | Information about the created workload identity federation credential. |
5386
<!-- END_TF_DOCS -->

modules/azure/aks/buildingblock/APP_TEAM_README.md

Lines changed: 27 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -66,80 +66,41 @@ This building block is for application teams that need to deploy containerized a
6666
- **Diagnostic Settings**: Cluster metrics and logs forwarded to Log Analytics
6767

6868
### Networking
69-
- **Custom VNet**: Dedicated virtual network and subnet for cluster isolation
69+
- **Flexible VNet Options**:
70+
- Create new VNet and subnet automatically (default)
71+
- Use existing VNet and subnet (for shared platform networking)
7072
- **Azure CNI**: Advanced networking capabilities with pod-level networking
7173
- **Private Cluster**: Optional private API server accessible only via private endpoint
7274
- **Hub Connectivity**: Optional VNet peering to central hub network for on-premises connectivity
75+
- Only created when deploying with new VNet (`vnet_name == null`)
76+
- Use existing VNet scenario for centrally-managed peering
7377

7478
### Auto-Scaling
7579
- **Cluster Autoscaler**: Automatically adjusts node count based on resource requirements (when enabled)
7680
- **System Node Pool**: Dedicated node pool for system workloads with optional auto-scaling
7781

78-
## Deployment Scenarios
79-
80-
### Public Cluster (Default)
81-
```hcl
82-
module "aks" {
83-
source = "./buildingblock"
84-
85-
aks_cluster_name = "my-public-aks"
86-
resource_group_name = "aks-rg"
87-
location = "West Europe"
88-
aks_admin_group_object_id = "12345678-1234-1234-1234-123456789012"
89-
log_analytics_workspace_name = "my-law"
90-
}
91-
```
92-
93-
### Private Cluster with Hub Connectivity
94-
```hcl
95-
provider "azurerm" {
96-
alias = "hub"
97-
subscription_id = "hub-subscription-id"
98-
# hub credentials
99-
}
100-
101-
module "aks" {
102-
source = "./buildingblock"
103-
104-
providers = {
105-
azurerm = azurerm
106-
azurerm.hub = azurerm.hub
107-
}
108-
109-
aks_cluster_name = "my-private-aks"
110-
resource_group_name = "aks-rg"
111-
location = "West Europe"
112-
113-
# Private cluster settings
114-
private_cluster_enabled = true
115-
private_dns_zone_id = "System"
116-
private_cluster_public_fqdn_enabled = false
117-
118-
# Hub connectivity
119-
hub_subscription_id = "hub-subscription-id"
120-
hub_resource_group_name = "hub-network-rg"
121-
hub_vnet_name = "hub-vnet"
122-
123-
# Azure AD and monitoring
124-
aks_admin_group_object_id = "12345678-1234-1234-1234-123456789012"
125-
log_analytics_workspace_name = "my-law"
126-
}
127-
```
128-
129-
### Private Cluster without Hub (Isolated)
130-
```hcl
131-
module "aks" {
132-
source = "./buildingblock"
133-
134-
aks_cluster_name = "my-isolated-aks"
135-
resource_group_name = "aks-rg"
136-
location = "West Europe"
137-
private_cluster_enabled = true
138-
private_dns_zone_id = "System"
139-
aks_admin_group_object_id = "12345678-1234-1234-1234-123456789012"
140-
log_analytics_workspace_name = "my-law"
141-
}
142-
```
82+
## Configuration Variables
83+
84+
### Networking Configuration
85+
86+
| Variable | Description | Required | Default |
87+
|----------|-------------|----------|---------|
88+
| `vnet_name` | Name of existing VNet to use. If `null`, creates new VNet. | No | `null` (creates new) |
89+
| `existing_vnet_resource_group_name` | Resource group of existing VNet. Only used when `vnet_name` is provided. | No | Same as AKS RG |
90+
| `subnet_name` | Name of existing subnet to use. If `null`, creates new subnet. | No | `null` (creates new) |
91+
| `vnet_address_space` | Address space for new VNet. Only used when `vnet_name == null`. | No | `10.240.0.0/16` |
92+
| `subnet_address_prefix` | Address prefix for new subnet. Only used when `subnet_name == null`. | No | `10.240.0.0/20` |
93+
| `allow_gateway_transit_from_hub` | Allow gateway transit from hub for on-premises connectivity. | No | `true` |
94+
95+
### Hub Connectivity (for Private Clusters)
96+
97+
| Variable | Description | Required | Default |
98+
|----------|-------------|----------|---------|
99+
| `hub_subscription_id` | Subscription ID of hub network. Required for hub peering. | Conditional | `null` |
100+
| `hub_resource_group_name` | Resource group of hub VNet. Required for hub peering. | Conditional | `null` |
101+
| `hub_vnet_name` | Name of hub VNet to peer with. Set to `null` to disable peering. | No | `null` |
102+
103+
**Note:** Hub peering is **only created when `vnet_name == null`** (new VNet scenario). If using an existing VNet, peering must be managed externally.
143104

144105
## Getting Started
145106

0 commit comments

Comments
 (0)