Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose cluster ids #713

Merged
merged 15 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,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 |
| <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 @@ -975,6 +976,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 |
<!-- 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
16 changes: 16 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ output "cluster_names" {
]
}

output "workload_cluster_id" {
toddgiguere marked this conversation as resolved.
Show resolved Hide resolved
description = "The id of the workload cluster"
value = flatten([
for cluster in ibm_container_vpc_cluster.cluster :
cluster.id if cluster.name == "${var.prefix}-workload-cluster"
])
Aayush-Abhyarthi marked this conversation as resolved.
Show resolved Hide resolved
}

output "management_cluster_id" {
description = "The id of the management cluster"
Aayush-Abhyarthi marked this conversation as resolved.
Show resolved Hide resolved
value = flatten([
for cluster in ibm_container_vpc_cluster.cluster :
cluster.id if cluster.name == "${var.prefix}-management-cluster"
])
}

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"
value = module.landing_zone.workload_cluster_id
}

output "management_cluster_id" {
description = "The id of the management cluster"
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"
value = module.roks_landing_zone.workload_cluster_id
}

output "management_cluster_id" {
description = "The id of the management cluster"
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