Skip to content

Commit

Permalink
fix: added outputs for workload/management cluster names (#875)
Browse files Browse the repository at this point in the history
* fix: added outputs for cluster names
  • Loading branch information
toddgiguere authored Sep 10, 2024
1 parent 1f305c1 commit a6b3f6e
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 @@ -962,6 +962,7 @@ module "cluster_pattern" {
| <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_management_cluster_name"></a> [management\_cluster\_name](#output\_management\_cluster\_name) | The name 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 @@ -986,6 +987,7 @@ module "cluster_pattern" {
| <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. |
| <a name="output_workload_cluster_name"></a> [workload\_cluster\_name](#output\_workload\_cluster\_name) | The name 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 @@ -79,11 +79,21 @@ output "workload_cluster_id" {
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 "workload_cluster_name" {
description = "The name 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"].name : 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 "management_cluster_name" {
description = "The name 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"].name : 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 @@ -87,11 +87,21 @@ output "workload_cluster_id" {
value = module.landing_zone.workload_cluster_id
}

output "workload_cluster_name" {
description = "The name 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_name
}

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 "management_cluster_name" {
description = "The name 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_name
}

output "workload_cluster_ingress_hostname" {
description = "The hostname assigned for the Workload cluster ingress subdomain, if not then null."
value = one(
Expand Down
10 changes: 10 additions & 0 deletions patterns/roks/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,21 @@ output "workload_cluster_id" {
value = module.roks_landing_zone.workload_cluster_id
}

output "workload_cluster_name" {
description = "The name 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_name
}

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 "management_cluster_name" {
description = "The name 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_name
}

output "workload_cluster_ingress_hostname" {
description = "The hostname assigned for the Workload cluster ingress subdomain, if not then null."
value = module.roks_landing_zone.workload_cluster_ingress_hostname
Expand Down

0 comments on commit a6b3f6e

Please sign in to comment.