You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Configuring complex inputs in Event Notifications
2
+
3
+
Several optional input variables in the IBM Cloud [Event Notifications deployable architecture](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-event-notifications-c7ac3ee6-4f48-4236-b974-b0cd8c624a46-global) use complex object types. You specify these inputs when you configure you deployable architecture.
## Service credentials <aname="svc-credential-name"></a>
9
+
10
+
You can specify a set of IAM credentials to connect to the instance with the `service_credential_names` input variable. Include a credential name and IAM service role for each key-value pair. Each role provides a specific level of access to the instance. For more information, see [Adding and viewing credentials](https://cloud.ibm.com/docs/account?topic=account-service_credentials&interface=ui). If you want to add service credentials to secret manager and to allow secret manager to manage it, you should use `service_credential_secrets` , see [Service credential secrets](#service-credential-secrets)
11
+
12
+
- Variable name: `service_credential_names`.
13
+
- Type: A map. The key is the name of the service credential. The value is the role that is assigned to that credential.
14
+
- Default value: An empty map (`{}`).
15
+
16
+
### Options for service_credential_names
17
+
18
+
- Key (required): The name of the service credential.
19
+
- Value (required): The IAM service role that is assigned to the credential. The following values are valid for service credential roles: 'Manager', 'Writer', 'Reader', 'Event Source Manager', 'Channel Editor', 'Event Notification Publisher', 'Status Reporter', 'Device Manager', 'Email Sender', 'Custom Email Status Reporter'. For more information, see [IBM Cloud IAM roles](https://cloud.ibm.com/docs/account?topic=account-userroles).
20
+
21
+
### Example service credentials
22
+
23
+
```hcl
24
+
{
25
+
"en_manager" : "Manager",
26
+
"en_reader" : "Reader",
27
+
"en_writer" : "Writer",
28
+
"en_email_sender" : "Email Sender"
29
+
}
30
+
```
31
+
32
+
## Service credential secrets <aname="service-credential-secrets"></a>
33
+
34
+
When you add an IBM Event Notification deployable architecture from the IBM Cloud catalog to IBM Cloud Project, you can configure service credentials. In edit mode for the projects configuration, from the configure panel click the optional tab.
35
+
36
+
To enter a custom value, use the edit action to open the "Edit Array" panel. Add the service credential secrets configurations to the array here.
37
+
38
+
In the configuration, specify the secret group name, whether it already exists or will be created and include all the necessary service credential secrets that need to be created within that secret group.
39
+
40
+
[Learn more](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-getting-started#getting-started) about service credential secrets.
41
+
42
+
- Variable name: `service_credential_secrets`.
43
+
- Type: A list of objects that represent service credential secret groups and secrets
44
+
- Default value: An empty list (`[]`)
45
+
46
+
### Options for service_credential_secrets
47
+
48
+
-`secret_group_name` (required): A unique human-readable name that identifies this service credential secret group.
49
+
-`secret_group_description` (optional, default = `null`): A human-readable description for this secret group.
50
+
-`existing_secret_group`: (optional, default = `false`): Set to true, if secret group name provided in the variable `secret_group_name` already exists.
51
+
-`service_credentials`: (required): A list of object that represents a service credential secret.
52
+
53
+
#### Options for service_credentials
54
+
55
+
-`secret_name`: (required): A unique human-readable name of the secret to create.
56
+
-`service_credentials_source_service_role`: (required): The role to give the service credential in the Event Notification service. Acceptable values are `Writer`, `Reader`, `Manager`, `None`, `Event Source Manager`, `Channel Editor`, `Event Notification Publisher`, `Status Reporter`, `Device Manager`, `Email Sender`, `Custom Email Status Reporter` , and `Pool ID Manager`
57
+
-`secret_labels`: (optional, default = `[]`): Labels of the secret to create. Up to 30 labels can be created. Labels can be 2 - 30 characters, including spaces. Special characters that are not permitted include the angled brackets (<>), comma (,), colon (:), ampersand (&), and vertical pipe character (|).
58
+
-`secret_auto_rotation`: (optional, default = `true`): Whether to configure automatic rotation of service credential.
59
+
-`secret_auto_rotation_unit`: (optional, default = `day`): Specifies the unit of time for rotation of a secret. Acceptable values are `day` or `month`.
60
+
-`secret_auto_rotation_interval`: (optional, default = `89`): Specifies the rotation interval for the rotation unit.
61
+
-`service_credentials_ttl`: (optional, default = `7776000`): The time-to-live (TTL) to assign to generated service credentials (in seconds).
62
+
-`service_credential_secret_description`: (optional, default = `null`): Description of the secret to create.
63
+
64
+
The following example includes all the configuration options for four service credentials and two secret groups.
validate_sm_crn=length(local.service_credential_secrets) >0&& var.existing_secrets_manager_instance_crn==null?tobool("`existing_secrets_manager_instance_crn` is required when adding service credentials to a secrets manager secret.") :false
validate_cos_regions=var.cos_bucket_region!=null&& var.cross_region_location!=null?tobool("Cannot provide values for var.cos_bucket_region and var.cross_region_location") :true
141
+
validate_cos_regions=var.cos_bucket_region!=null&& var.cross_region_location!=null?tobool("Cannot provide values for var.cos_bucket_region and var.cross_region_location") :true
Copy file name to clipboardExpand all lines: solutions/standard/variables.tf
+60-1Lines changed: 60 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ variable "prefix" {
44
44
45
45
variable"service_credential_names" {
46
46
type=map(string)
47
-
description="The mapping of names and roles for service credentials that you want to create for the Event Notifications instance."
47
+
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/standard/DA-types.md#service-credential-secrets"
description="The endpoint URL for your bucket region. [Learn more](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpoints). Only required if using an existing bucket with the `existing_cos_bucket_name` variable."
error_message="service_credentials_source_service_role role must be one of 'Writer', 'Reader', 'Manager', 'None', 'Event Source Manager', 'Channel Editor', 'Event Notification Publisher', 'Status Reporter', 'Device Manager', 'Email Sender', 'Custom Email Status Reporter' and 'Pool ID Manager'."
333
+
334
+
}
335
+
}
336
+
337
+
variable"skip_en_sm_auth_policy" {
338
+
type=bool
339
+
default=false
340
+
description="Whether an IAM authorization policy is created for Secrets Manager instance to create a service credential secrets for Event Notification.If set to false, the Secrets Manager instance passed by the user is granted the Key Manager access to the Event Notifications instance created by the Deployable Architecture. Set to `true` to use an existing policy. The value of this is ignored if any value for 'existing_secrets_manager_instance_crn' is not passed."
0 commit comments