Skip to content

Commit 5509539

Browse files
committed
chore: adding var for namespace
chore: adding var for namespace
1 parent d178c1c commit 5509539

File tree

3 files changed

+9
-36
lines changed

3 files changed

+9
-36
lines changed

README.md

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,6 @@ To integrate an AKS cluster, you additionally need:
1515
- An AKS cluster with [Azure AD enabled](https://learn.microsoft.com/en-us/azure/aks/managed-aad)
1616
- Integrate [RBAC based user access](https://learn.microsoft.com/en-us/azure/aks/manage-azure-rbac) with the AKS cluster
1717

18-
## How to Use This Module
19-
20-
### Using CLI
21-
22-
1. Download the example `main.tf` and `outputs.tf` files.
23-
24-
```powershell
25-
# Downloads main.tf and outputs.tf files into ~/terraform-aks-meshplatform
26-
wget https://raw.githubusercontent.com/meshcloud/terraform-aks-meshplatform/main/examples/basic-aks-integration/main.tf -P ~/terraform-aks-meshplatform
27-
wget https://raw.githubusercontent.com/meshcloud/terraform-aks-meshplatform/main/examples/basic-aks-integration/outputs.tf -P ~/terraform-aks-meshplatform
28-
```
29-
30-
2. Open `~/terraform-aks-meshplatform/main.tf` with a text editor. Modify the module variables and Terraform state backend settings in the file.
31-
32-
3. Execute the module.
33-
34-
```powershell
35-
# Changes into ~/terraform-aks-meshplatform and applies terraform
36-
cd ~/terraform-aks-meshplatform
37-
terraform init
38-
terraform apply
39-
```
40-
41-
4. Configure the meshPlatform with the output provided by terraform.
42-
43-
```sh
44-
# The JSON output contains sensitive values that must not be transmitted to meshcloud in plain text.
45-
terraform output -json
46-
```
47-
48-
## Example Usages
49-
50-
Check [examples](./examples/) for examples.
51-
5218
<!-- BEGIN_TF_DOCS -->
5319
## Requirements
5420

@@ -81,6 +47,7 @@ Check [examples](./examples/) for examples.
8147
| <a name="input_create_password"></a> [create\_password](#input\_create\_password) | Create a password for the enterprise application. | `bool` | n/a | yes |
8248
| <a name="input_metering_additional_rules"></a> [metering\_additional\_rules](#input\_metering\_additional\_rules) | n/a | <pre>list(object({<br/> api_groups = list(string)<br/> resources = list(string)<br/> verbs = list(string)<br/> resource_names = optional(list(string))<br/> non_resource_urls = optional(list(string))<br/> }))</pre> | `[]` | no |
8349
| <a name="input_metering_enabled"></a> [metering\_enabled](#input\_metering\_enabled) | n/a | `bool` | `true` | no |
50+
| <a name="input_namespace"></a> [namespace](#input\_namespace) | name of the namespace where the replicator and metering components should be deployed | `string` | `"meshcloud"` | no |
8451
| <a name="input_replicator_additional_rules"></a> [replicator\_additional\_rules](#input\_replicator\_additional\_rules) | n/a | <pre>list(object({<br/> api_groups = list(string)<br/> resources = list(string)<br/> verbs = list(string)<br/> resource_names = optional(list(string))<br/> non_resource_urls = optional(list(string))<br/> }))</pre> | `[]` | no |
8552
| <a name="input_replicator_enabled"></a> [replicator\_enabled](#input\_replicator\_enabled) | n/a | `bool` | `true` | no |
8653
| <a name="input_scope"></a> [scope](#input\_scope) | The scope of the service principal. The scope is usually the id of the aks subscription | `string` | n/a | yes |
@@ -97,4 +64,4 @@ Check [examples](./examples/) for examples.
9764
| <a name="output_replicator_service_principal"></a> [replicator\_service\_principal](#output\_replicator\_service\_principal) | Replicator Service Principal. |
9865
| <a name="output_replicator_service_principal_password"></a> [replicator\_service\_principal\_password](#output\_replicator\_service\_principal\_password) | Password for Replicator Service Principal. |
9966
| <a name="output_replicator_token"></a> [replicator\_token](#output\_replicator\_token) | n/a |
100-
<!-- END_TF_DOCS -->
67+
<!-- END_TF_DOCS -->

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Kubernetes Namespace
22
resource "kubernetes_namespace" "meshcloud" {
33
metadata {
4-
name = "meshcloud"
4+
name = var.namespace
55
}
66
}
77

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
variable "namespace" {
2+
type = string
3+
default = "meshcloud"
4+
description = "name of the namespace where the replicator and metering components should be deployed"
5+
}
6+
17
variable "metering_enabled" {
28
type = bool
39
default = true

0 commit comments

Comments
 (0)