Skip to content

Commit

Permalink
feat: added workload_cluster_id and management_cluster_id outputs (
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush-Abhyarthi authored Mar 13, 2024
1 parent c7d443d commit cae6de7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ module "cluster_pattern" {
| <a name="output_key_management_name"></a> [key\_management\_name](#output\_key\_management\_name) | Name of key management service |
| <a name="output_key_map"></a> [key\_map](#output\_key\_map) | Map of ids and keys for keys created |
| <a name="output_key_rings"></a> [key\_rings](#output\_key\_rings) | Key rings created by module |
| <a name="output_management_cluster_id"></a> [management\_cluster\_id](#output\_management\_cluster\_id) | The id of the management cluster. If the cluster name does not exactly match the prefix-management-cluster pattern it will be null. |
| <a name="output_placement_groups"></a> [placement\_groups](#output\_placement\_groups) | List of placement groups. |
| <a name="output_resource_group_data"></a> [resource\_group\_data](#output\_resource\_group\_data) | List of resource groups data used within landing zone. |
| <a name="output_resource_group_names"></a> [resource\_group\_names](#output\_resource\_group\_names) | List of resource groups names used within landing zone. |
Expand All @@ -979,6 +980,7 @@ module "cluster_pattern" {
| <a name="output_vpn_names"></a> [vpn\_names](#output\_vpn\_names) | List of VPN names |
| <a name="output_vsi_data"></a> [vsi\_data](#output\_vsi\_data) | A list of VSI with name, id, zone, and primary ipv4 address, VPC Name, and floating IP. |
| <a name="output_vsi_names"></a> [vsi\_names](#output\_vsi\_names) | List of VSI names |
| <a name="output_workload_cluster_id"></a> [workload\_cluster\_id](#output\_workload\_cluster\_id) | The id of the workload cluster. If the cluster name does not exactly match the prefix-workload-cluster pattern it will be null. |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

<!-- Leave this section as is so that your module has a link to local development environment set up steps for contributors to follow -->
Expand Down
10 changes: 10 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ output "cluster_names" {
]
}

output "workload_cluster_id" {
description = "The id of the workload cluster. If the cluster name does not exactly match the prefix-workload-cluster pattern it will be null."
value = lookup(ibm_container_vpc_cluster.cluster, "${var.prefix}-workload-cluster", null) != null ? ibm_container_vpc_cluster.cluster["${var.prefix}-workload-cluster"].id : null
}

output "management_cluster_id" {
description = "The id of the management cluster. If the cluster name does not exactly match the prefix-management-cluster pattern it will be null."
value = lookup(ibm_container_vpc_cluster.cluster, "${var.prefix}-management-cluster", null) != null ? ibm_container_vpc_cluster.cluster["${var.prefix}-management-cluster"].id : null
}

output "cluster_data" {
description = "List of cluster data"
value = {
Expand Down
10 changes: 10 additions & 0 deletions patterns/roks/module/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ output "cluster_data" {
value = module.landing_zone.cluster_data
}

output "workload_cluster_id" {
description = "The id of the worload cluster. If the cluster name does not exactly match the prefix-workload-cluster pattern it will be null."
value = module.landing_zone.workload_cluster_id
}

output "management_cluster_id" {
description = "The id of the management cluster. If the cluster name does not exactly match the prefix-management-cluster pattern it will be null."
value = module.landing_zone.management_cluster_id
}

output "key_management_name" {
description = "Name of key management service"
value = module.landing_zone.key_management_name
Expand Down
10 changes: 10 additions & 0 deletions patterns/roks/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ output "cluster_data" {
value = module.roks_landing_zone.cluster_data
}

output "workload_cluster_id" {
description = "The id of the workload cluster. If the cluster name does not exactly match the prefix-workload-cluster pattern it will be null."
value = module.roks_landing_zone.workload_cluster_id
}

output "management_cluster_id" {
description = "The id of the management cluster. If the cluster name does not exactly match the prefix-management-cluster pattern it will be null."
value = module.roks_landing_zone.management_cluster_id
}

output "key_management_name" {
description = "Name of key management service"
value = module.roks_landing_zone.key_management_name
Expand Down

0 comments on commit cae6de7

Please sign in to comment.