Skip to content

Commit e348b9d

Browse files
authored
fix: removed workaround for virtual inputs + improved DA user experience (#524)
1 parent 8e0b219 commit e348b9d

File tree

10 files changed

+201
-327
lines changed

10 files changed

+201
-327
lines changed

.secrets.baseline

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2025-07-25T11:36:11Z",
6+
"generated_at": "2025-08-07T08:56:33Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -86,26 +86,6 @@
8686
"type": "Secret Keyword",
8787
"verified_result": null
8888
}
89-
],
90-
"solutions/fully-configurable/README.md": [
91-
{
92-
"hashed_secret": "99046450b7d19bfd57bfe3773719f57af84c7f12",
93-
"is_secret": false,
94-
"is_verified": false,
95-
"line_number": 92,
96-
"type": "Secret Keyword",
97-
"verified_result": null
98-
}
99-
],
100-
"solutions/security-enforced/README.md": [
101-
{
102-
"hashed_secret": "99046450b7d19bfd57bfe3773719f57af84c7f12",
103-
"is_secret": false,
104-
"is_verified": false,
105-
"line_number": 68,
106-
"type": "Secret Keyword",
107-
"verified_result": null
108-
}
10989
]
11090
},
11191
"version": "0.13.1+ibm.62.dss",

examples/fscloud/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ module "event_notification" {
138138
rule_contexts = [{
139139
attributes = [
140140
{
141-
"name" : "endpointType",
142-
"value" : "private"
141+
name = "endpointType",
142+
value = "private"
143143
},
144144
{
145145
name = "networkZoneId"
@@ -148,8 +148,8 @@ module "event_notification" {
148148
}, {
149149
attributes = [
150150
{
151-
"name" : "endpointType",
152-
"value" : "private"
151+
name = "endpointType",
152+
value = "private"
153153
},
154154
{
155155
name = "networkZoneId"

ibm_catalog.json

Lines changed: 136 additions & 64 deletions
Large diffs are not rendered by default.

reference-architectures/en.svg

Lines changed: 2 additions & 2 deletions
Loading

solutions/fully-configurable/DA-cbr_rules.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ The `cbr_rules` input variable allows you to provide a rule for the target servi
3434
### Example Rule For Context-Based Restrictions Configuration
3535

3636
```hcl
37-
cbr_rules = [
37+
[
3838
{
3939
description = "Event Notifications can be accessed from xyz"
40-
account_id = "defc0df06b644a9cabc6e44f55b3880s."
40+
account_id = "<REPLACE ME>"
4141
rule_contexts= [{
4242
attributes = [
4343
{
44-
"name" : "endpointType",
45-
"value" : "private"
44+
name = "endpointType",
45+
value = "private"
4646
},
4747
{
4848
name = "networkZoneId"

solutions/fully-configurable/README.md

Lines changed: 1 addition & 110 deletions
Large diffs are not rendered by default.

solutions/fully-configurable/variables.tf

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ variable "provider_visibility" {
2626

2727
variable "region" {
2828
type = string
29-
description = "The region in which the Event Notifications resources are provisioned."
29+
description = "The region in which the Event Notifications resources are provisioned. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/region) about how to select different regions for different services."
3030
default = "us-south"
3131
}
3232

@@ -39,28 +39,30 @@ variable "existing_monitoring_crn" {
3939

4040
variable "prefix" {
4141
type = string
42-
description = "Prefix to add to all resources created by this solution. To not use any prefix value, you can set this value to `null` or an empty string."
42+
description = "The prefix to be added to all resources created by this solution. To skip using a prefix, set this value to null or an empty string. The prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It should not exceed 16 characters, must not end with a hyphen('-'), and can not contain consecutive hyphens ('--'). Example: en-0435. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix)."
4343
validation {
44-
condition = (var.prefix == null ? true :
45-
alltrue([
46-
can(regex("^[a-z]{0,1}[-a-z0-9]{0,14}[a-z0-9]{0,1}$", var.prefix)),
47-
length(regexall("^.*--.*", var.prefix)) == 0
48-
])
49-
)
50-
error_message = "Prefix must begin with a lowercase letter, contain only lowercase letters, numbers, and - characters. Prefixes must end with a lowercase letter or number and be 16 or fewer characters."
44+
condition = var.prefix == null || var.prefix == "" ? true : alltrue([
45+
can(regex("^[a-z][-a-z0-9]*[a-z0-9]$", var.prefix)), length(regexall("--", var.prefix)) == 0
46+
])
47+
error_message = "Prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It must not end with a hyphen('-'), and cannot contain consecutive hyphens ('--')."
48+
}
49+
50+
validation {
51+
condition = var.prefix == null || var.prefix == "" ? true : length(var.prefix) <= 16
52+
error_message = "Prefix must not exceed 16 characters."
5153
}
5254
}
5355

5456
variable "event_notifications_access_tags" {
5557
type = list(string)
56-
description = "A list of access tags to apply to the Event Notifications instance created by the module. For more information, see https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial."
58+
description = "A list of access tags to apply to the Event Notifications instance created by the solution. For more information, [see here](https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial)."
5759
default = []
5860

5961
validation {
6062
condition = alltrue([
6163
for tag in var.event_notifications_access_tags : can(regex("[\\w\\-_\\.]+:[\\w\\-_\\.]+", tag)) && length(tag) <= 128
6264
])
63-
error_message = "Tags must match the regular expression \"[\\w\\-_\\.]+:[\\w\\-_\\.]+\", see https://cloud.ibm.com/docs/account?topic=account-tag&interface=ui#limits for more details"
65+
error_message = "Tags must match the regular expression \"[\\w\\-_\\.]+:[\\w\\-_\\.]+\". For more information, [see here](https://cloud.ibm.com/docs/account?topic=account-tag&interface=ui#limit)."
6466
}
6567
}
6668

@@ -70,7 +72,7 @@ variable "event_notifications_access_tags" {
7072

7173
variable "service_credential_names" {
7274
type = map(string)
73-
description = "The mapping of names and roles for service credentials that you want to create for the Event Notifications instance. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-event-notifications/tree/main/solutions/fully-configurable/DA-types.md#service-credential-secrets"
75+
description = "A mapping of names and associated roles for service credentials that you want to create for the Event Notifications instance. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-event-notifications/blob/main/solutions/fully-configurable/DA-types.md#service-credentials-)."
7476
default = {}
7577

7678
validation {
@@ -87,7 +89,7 @@ variable "event_notifications_instance_name" {
8789

8890
variable "service_plan" {
8991
type = string
90-
description = "The pricing plan of the Event Notifications instance. Possible values: `Lite`, `Standard`"
92+
description = "The pricing plan of the Event Notifications instance. Possible values: `Lite`, `Standard`."
9193
default = "standard"
9294
validation {
9395
condition = contains(["lite", "standard"], var.service_plan)
@@ -97,7 +99,7 @@ variable "service_plan" {
9799

98100
variable "service_endpoints" {
99101
type = string
100-
description = "Specify whether you want to enable public, private, or both public and private service endpoints. Possible values: `public`, `private`, `public-and-private`"
102+
description = "Specify whether you want to enable public, private, or both public and private service endpoints. Possible values: `public`, `private`, `public-and-private`."
101103
default = "private"
102104
validation {
103105
condition = contains(["public", "private", "public-and-private"], var.service_endpoints)
@@ -237,7 +239,7 @@ variable "ibmcloud_kms_api_key" {
237239

238240
variable "enable_collecting_failed_events" {
239241
type = bool
240-
description = "Set to true to enable Cloud Object Storage integration. If true a Cloud Object Storage instance to store failed events in should also be passed using variable `existing_cos_instance_crn`. For more info see https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-en-cfe-integrations."
242+
description = "Set to true to enable Cloud Object Storage integration. If enabled, you must also provide a Cloud Object Storage instance (for storing failed events) using the `existing_cos_instance_crn` variable. For more information, [see here](https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-en-cfe-integrations)."
241243
default = false
242244
validation {
243245
condition = var.enable_collecting_failed_events == true ? length(var.existing_cos_instance_crn) > 0 : true
@@ -276,14 +278,14 @@ variable "cos_bucket_class" {
276278

277279
variable "cos_bucket_access_tags" {
278280
type = list(string)
279-
description = "A list of access tags to apply to the Cloud Object Storage bucket created by the module. For more information, see https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial."
281+
description = "A list of access tags to apply to the Cloud Object Storage bucket created by the solution. For more information, [see here](https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial)."
280282
default = []
281283

282284
validation {
283285
condition = alltrue([
284286
for tag in var.cos_bucket_access_tags : can(regex("[\\w\\-_\\.]+:[\\w\\-_\\.]+", tag)) && length(tag) <= 128
285287
])
286-
error_message = "Tags must match the regular expression \"[\\w\\-_\\.]+:[\\w\\-_\\.]+\", see https://cloud.ibm.com/docs/account?topic=account-tag&interface=ui#limits for more details"
288+
error_message = "Tags must match the regular expression \"[\\w\\-_\\.]+:[\\w\\-_\\.]+\". For more information, [see here](https://cloud.ibm.com/docs/account?topic=account-tag&interface=ui#limits)."
287289
}
288290
}
289291

@@ -306,11 +308,11 @@ variable "cos_bucket_region" {
306308
}
307309

308310
variable "management_endpoint_type_for_bucket" {
309-
description = "The type of endpoint for the IBM Terraform provider to use to manage Object Storage buckets. Available values: `public` or `direct`."
311+
description = "The type of endpoint for the IBM Terraform provider to use to manage Object Storage buckets. Available values: `public`, `private` or `direct`."
310312
type = string
311313
default = "direct"
312314
validation {
313-
condition = contains(["public", "direct"], var.management_endpoint_type_for_bucket)
315+
condition = contains(["public", "private", "direct"], var.management_endpoint_type_for_bucket)
314316
error_message = "The specified `management_endpoint_type_for_bucket` is not a valid selection."
315317
}
316318
}
@@ -363,7 +365,7 @@ variable "service_credential_secrets" {
363365
for credential in group.service_credentials : can(regex("^crn:v[0-9]:bluemix(:..*){2}(:.*){3}:(serviceRole|role):..*$", credential.service_credentials_source_service_role_crn))
364366
])
365367
])
366-
error_message = "service_credentials_source_service_role_crn must be a serviceRole CRN. See https://cloud.ibm.com/iam/roles"
368+
error_message = "Provided value of `service_credentials_source_service_role_crn` is not valid. Refer [this](https://cloud.ibm.com/iam/roles) for allowed role/values."
367369
}
368370
validation {
369371
condition = length(var.service_credential_secrets) > 0 ? var.existing_secrets_manager_instance_crn != null : true
@@ -393,6 +395,6 @@ variable "cbr_rules" {
393395
}))
394396
})))
395397
}))
396-
description = "The list of context-based restrictions rules to create. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-event-notifications/tree/main/solutions/fully-configurable/DA-cbr_rules.md)"
398+
description = "The list of context-based restrictions rules to create. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-event-notifications/tree/main/solutions/fully-configurable/DA-cbr_rules.md)."
397399
default = []
398400
}

0 commit comments

Comments
 (0)