Skip to content

Commit 5e53301

Browse files
feat: Added new outputs: event_notifications_private_endpoint and event_notifications_public_endpoint (#551)
1 parent 4067132 commit 5e53301

File tree

6 files changed

+42
-0
lines changed

6 files changed

+42
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ To create service credentials, access the Event Notifications service, and acces
124124
| <a name="output_account_id"></a> [account\_id](#output\_account\_id) | The Event Notifications account ID. |
125125
| <a name="output_crn"></a> [crn](#output\_crn) | The Event Notifications instance CRN. |
126126
| <a name="output_event_notification_instance_name"></a> [event\_notification\_instance\_name](#output\_event\_notification\_instance\_name) | The name of the Event Notifications instance. |
127+
| <a name="output_event_notifications_private_endpoint"></a> [event\_notifications\_private\_endpoint](#output\_event\_notifications\_private\_endpoint) | Instance private endpoint URL |
128+
| <a name="output_event_notifications_public_endpoint"></a> [event\_notifications\_public\_endpoint](#output\_event\_notifications\_public\_endpoint) | Instance public endpoint URL |
127129
| <a name="output_guid"></a> [guid](#output\_guid) | The globally unique identifier of the Event Notifications instance. |
128130
| <a name="output_service_credentials_json"></a> [service\_credentials\_json](#output\_service\_credentials\_json) | The service credentials JSON map. |
129131
| <a name="output_service_credentials_object"></a> [service\_credentials\_object](#output\_service\_credentials\_object) | The service credentials object. |

examples/basic/outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@ output "guid" {
2525
description = "Event Notification guid"
2626
value = module.event_notification.guid
2727
}
28+
29+
output "event_notifications_private_endpoint" {
30+
description = "Event Notifications instance private endpoint URL"
31+
value = module.event_notification.event_notifications_private_endpoint
32+
}
33+
34+
output "event_notifications_public_endpoint" {
35+
description = "Event Notifications instance public endpoint URL"
36+
value = module.event_notification.event_notifications_public_endpoint
37+
}

main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ locals {
1919

2020
# Get account ID
2121
account_id = ibm_resource_instance.en_instance.account_id
22+
23+
# temporary workaround until https://github.ibm.com/Notification-Hub/adopters/issues/150 is implemented
24+
# Get public/private endpoint
25+
en_private_endpoint = "https://private.${var.region}.event-notifications.cloud.ibm.com"
26+
en_public_endpoint = "https://${var.region}.event-notifications.cloud.ibm.com"
2227
}
2328

2429
resource "ibm_resource_instance" "en_instance" {

outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,13 @@ output "service_credentials_object" {
3333
value = local.service_credentials_object
3434
sensitive = true
3535
}
36+
37+
output "event_notifications_private_endpoint" {
38+
description = "Instance private endpoint URL"
39+
value = local.en_private_endpoint
40+
}
41+
42+
output "event_notifications_public_endpoint" {
43+
description = "Instance public endpoint URL"
44+
value = local.en_public_endpoint
45+
}

solutions/fully-configurable/outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,13 @@ output "service_credential_secret_groups" {
4444
description = "Service credential secret groups"
4545
value = length(local.service_credential_secrets) > 0 ? module.secrets_manager_service_credentials[0].secret_groups : null
4646
}
47+
48+
output "event_notifications_private_endpoint" {
49+
description = "Event Notifications instance private endpoint URL"
50+
value = local.use_existing_en_instance ? null : module.event_notifications[0].event_notifications_private_endpoint
51+
}
52+
53+
output "event_notifications_public_endpoint" {
54+
description = "Event Notifications instance public endpoint URL"
55+
value = local.use_existing_en_instance ? null : module.event_notifications[0].event_notifications_public_endpoint
56+
}

solutions/security-enforced/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ output "service_credential_secret_groups" {
4444
description = "Service credential secret groups"
4545
value = module.event_notifications.service_credential_secret_groups
4646
}
47+
48+
output "event_notifications_private_endpoint" {
49+
description = "Event Notifications instance private endpoint URL"
50+
value = module.event_notifications.event_notifications_private_endpoint
51+
}

0 commit comments

Comments
 (0)