Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit c2700c6

Browse files
authored
feat: add scc cos related outputs (#126)
1 parent e2e3659 commit c2700c6

File tree

2 files changed

+52
-11
lines changed

2 files changed

+52
-11
lines changed

solutions/instances/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,14 @@ This solution supports the following:
8989
|------|-------------|
9090
| <a name="output_resource_group_id"></a> [resource\_group\_id](#output\_resource\_group\_id) | Resource group ID |
9191
| <a name="output_resource_group_name"></a> [resource\_group\_name](#output\_resource\_group\_name) | Resource group name |
92+
| <a name="output_scc_cos_bucket_config"></a> [scc\_cos\_bucket\_config](#output\_scc\_cos\_bucket\_config) | List of buckets created |
9293
| <a name="output_scc_cos_bucket_name"></a> [scc\_cos\_bucket\_name](#output\_scc\_cos\_bucket\_name) | SCC COS bucket name |
94+
| <a name="output_scc_cos_instance_crn"></a> [scc\_cos\_instance\_crn](#output\_scc\_cos\_instance\_crn) | SCC COS instance crn |
95+
| <a name="output_scc_cos_instance_guid"></a> [scc\_cos\_instance\_guid](#output\_scc\_cos\_instance\_guid) | SCC COS instance guid |
96+
| <a name="output_scc_cos_instance_id"></a> [scc\_cos\_instance\_id](#output\_scc\_cos\_instance\_id) | SCC COS instance id |
97+
| <a name="output_scc_cos_instance_name"></a> [scc\_cos\_instance\_name](#output\_scc\_cos\_instance\_name) | SCC COS instance name |
9398
| <a name="output_scc_cos_kms_key_crn"></a> [scc\_cos\_kms\_key\_crn](#output\_scc\_cos\_kms\_key\_crn) | SCC COS KMS Key CRN |
99+
| <a name="output_scc_cos_resource_keys"></a> [scc\_cos\_resource\_keys](#output\_scc\_cos\_resource\_keys) | List of resource keys |
94100
| <a name="output_scc_crn"></a> [scc\_crn](#output\_scc\_crn) | SCC instance CRN |
95101
| <a name="output_scc_guid"></a> [scc\_guid](#output\_scc\_guid) | SCC instance guid |
96102
| <a name="output_scc_id"></a> [scc\_id](#output\_scc\_id) | SCC instance ID |

solutions/instances/outputs.tf

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ output "resource_group_id" {
1212
value = module.resource_group.resource_group_id
1313
}
1414

15-
output "scc_cos_kms_key_crn" {
16-
description = "SCC COS KMS Key CRN"
17-
# if passing an existing bucket, then no KMS key is in play here, so output will be null
18-
value = var.existing_scc_cos_bucket_name != null ? null : local.scc_cos_kms_key_crn
19-
}
20-
21-
output "scc_cos_bucket_name" {
22-
description = "SCC COS bucket name"
23-
value = var.existing_scc_cos_bucket_name != null ? var.existing_scc_cos_bucket_name : module.cos[0].buckets[local.scc_cos_bucket_name].bucket_name
24-
}
25-
2615
output "scc_id" {
2716
description = "SCC instance ID"
2817
value = module.scc.id
@@ -74,3 +63,49 @@ output "scc_workload_protection_access_key" {
7463
value = var.provision_scc_workload_protection ? module.scc_wp[0].access_key : null
7564
sensitive = true
7665
}
66+
67+
########################################################################################################################
68+
# SCC COS
69+
########################################################################################################################
70+
71+
output "scc_cos_kms_key_crn" {
72+
description = "SCC COS KMS Key CRN"
73+
# if passing an existing bucket, then no KMS key is in play here, so output will be null
74+
value = var.existing_scc_cos_bucket_name != null ? null : local.scc_cos_kms_key_crn
75+
}
76+
77+
output "scc_cos_bucket_name" {
78+
description = "SCC COS bucket name"
79+
value = var.existing_scc_cos_bucket_name != null ? var.existing_scc_cos_bucket_name : module.cos[0].buckets[local.scc_cos_bucket_name].bucket_name
80+
}
81+
82+
output "scc_cos_bucket_config" {
83+
description = "List of buckets created"
84+
value = var.existing_scc_cos_bucket_name != null ? null : module.cos[0].buckets[local.scc_cos_bucket_name]
85+
}
86+
87+
output "scc_cos_instance_id" {
88+
description = "SCC COS instance id"
89+
value = var.existing_scc_cos_bucket_name != null ? null : module.cos[0].cos_instance_id
90+
}
91+
92+
output "scc_cos_instance_guid" {
93+
description = "SCC COS instance guid"
94+
value = var.existing_scc_cos_bucket_name != null ? null : module.cos[0].cos_instance_guid
95+
}
96+
97+
output "scc_cos_instance_name" {
98+
description = "SCC COS instance name"
99+
value = var.existing_scc_cos_bucket_name != null ? null : local.cos_instance_name
100+
}
101+
102+
output "scc_cos_instance_crn" {
103+
description = "SCC COS instance crn"
104+
value = var.existing_scc_cos_bucket_name != null ? null : module.cos[0].cos_instance_crn
105+
}
106+
107+
output "scc_cos_resource_keys" {
108+
description = "List of resource keys"
109+
value = var.existing_scc_cos_bucket_name != null ? null : module.cos[0].resource_keys
110+
sensitive = true
111+
}

0 commit comments

Comments
 (0)