Skip to content

Commit 9f536bf

Browse files
feat: Added Event Routing account settings variation to the DA (#48)
1 parent 9d4404d commit 9f536bf

File tree

11 files changed

+243
-3
lines changed

11 files changed

+243
-3
lines changed

.catalog-onboard-pipeline.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ offerings:
1212
scc:
1313
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
1414
region: us-south
15+
- name: event-routing-account-settings
16+
mark_ready: true
17+
install_type: fullstack

ibm_catalog.json

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@
493493
"features": [
494494
{
495495
"title": " ",
496-
"description": "Configured to use IBM secure by default standards, but can be edited to fit your use case."
496+
"description": "Configures the Activity Tracker Event Routing service to route auditing events to an Object Storage bucket and Cloud Logs target"
497497
}
498498
],
499499
"diagrams": [
@@ -507,6 +507,97 @@
507507
}
508508
]
509509
}
510+
},
511+
{
512+
"label": "Event Routing account settings",
513+
"name": "event-routing-account-settings",
514+
"index": 2,
515+
"install_type": "fullstack",
516+
"working_directory": "solutions/event-routing-account-settings",
517+
"configuration": [
518+
{
519+
"key": "ibmcloud_api_key"
520+
},
521+
{
522+
"key": "default_targets",
523+
"custom_config": {
524+
"grouping": "deployment",
525+
"original_grouping": "deployment",
526+
"config_constraints": {
527+
"type": "string"
528+
}
529+
}
530+
},
531+
{
532+
"key": "primary_metadata_region"
533+
},
534+
{
535+
"key": "backup_metadata_region"
536+
},
537+
{
538+
"key": "permitted_target_regions",
539+
"custom_config": {
540+
"grouping": "deployment",
541+
"original_grouping": "deployment",
542+
"config_constraints": {
543+
"type": "string"
544+
}
545+
}
546+
},
547+
{
548+
"key": "private_api_endpoint_only"
549+
},
550+
{
551+
"key": "provider_visibility",
552+
"hidden": true,
553+
"options": [
554+
{
555+
"displayname": "private",
556+
"value": "private"
557+
},
558+
{
559+
"displayname": "public",
560+
"value": "public"
561+
},
562+
{
563+
"displayname": "public-and-private",
564+
"value": "public-and-private"
565+
}
566+
]
567+
}
568+
],
569+
"iam_permissions": [
570+
{
571+
"service_name": "All account management services",
572+
"role_crns": [
573+
"crn:v1:bluemix:public:iam::::role:Administrator"
574+
]
575+
},
576+
{
577+
"service_name": "atracker",
578+
"role_crns": [
579+
"crn:v1:bluemix:public:iam::::role:Administrator"
580+
]
581+
}
582+
],
583+
"architecture": {
584+
"features": [
585+
{
586+
"title": " ",
587+
"description": "Configures account settings for Activity Tracker Event Routing."
588+
}
589+
],
590+
"diagrams": [
591+
{
592+
"diagram": {
593+
"caption": "Event Routing Account Settings",
594+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-activity-tracker/main/reference-architecture/deployable-architecture-account-settings.svg",
595+
"type": "image/svg+xml"
596+
},
597+
"description": "This architecture supports configuring the Activity Tracker Event Routing Account Settings."
598+
}
599+
]
600+
}
510601
}
511602
]
512603
}

reference-architecture/deployable-architecture-account-settings.svg

Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Cloud automation for Cloud Monitoring (Event Routing Account Settings)
2+
3+
:exclamation: **Important:** This solution is not intended to be called by other modules because it contains a provider configuration and is not compatible with the `for_each`, `count`, and `depends_on` arguments. For more information, see [Providers Within Modules](https://developer.hashicorp.com/terraform/language/modules/develop/providers).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ibmcloud_api_key": $VALIDATION_APIKEY"
3+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#######################################################################################################################
2+
# IBM Cloud Activity Tracker Event Routing
3+
#######################################################################################################################
4+
5+
module "account_routing_settings" {
6+
source = "../.."
7+
8+
global_event_routing_settings = {
9+
default_targets = var.default_targets
10+
metadata_region_primary = var.primary_metadata_region
11+
metadata_region_backup = var.backup_metadata_region
12+
permitted_target_regions = var.permitted_target_regions
13+
private_api_endpoint_only = var.private_api_endpoint_only
14+
}
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
##############################################################################
2+
# Outputs
3+
##############################################################################
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
provider "ibm" {
2+
ibmcloud_api_key = var.ibmcloud_api_key
3+
visibility = var.provider_visibility
4+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
########################################################################################################################
2+
# Common variables
3+
########################################################################################################################
4+
5+
variable "ibmcloud_api_key" {
6+
type = string
7+
description = "The IBM Cloud API key with access to configure Activity Tracker Event Routing account settings."
8+
sensitive = true
9+
}
10+
11+
variable "provider_visibility" {
12+
description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)."
13+
type = string
14+
default = "public"
15+
16+
validation {
17+
condition = contains(["public", "private", "public-and-private"], var.provider_visibility)
18+
error_message = "Invalid visibility option. Allowed values are 'public', 'private', or 'public-and-private'."
19+
}
20+
}
21+
########################################################################################################################
22+
# IBM Cloud Activity Tracker Event Routing
23+
########################################################################################################################
24+
25+
variable "default_targets" {
26+
description = "Where activity events that are not explicitly managed in the account's routing rules are routed. You can define up to 2 default targets per account. Consider defining a second default target when you want to collect the data in a backup location."
27+
type = list(string)
28+
default = []
29+
}
30+
31+
variable "primary_metadata_region" {
32+
description = "Storage location for target, route, and settings metadata in your IBM Cloud account. To store all configuration metadata in a single region, set this value explicitly."
33+
type = string
34+
default = "us-south"
35+
}
36+
37+
variable "backup_metadata_region" {
38+
description = "You can also configure a backup location where the metadata is stored for recovery purposes. The `backup_metadata_region` can't be the same as `primary_metadata_region`."
39+
type = string
40+
default = null
41+
validation {
42+
error_message = "`metadata_region_backup` cannot be the same as `metadata_region_primary`."
43+
condition = var.backup_metadata_region == null || var.primary_metadata_region != var.backup_metadata_region
44+
}
45+
}
46+
47+
variable "permitted_target_regions" {
48+
description = "Control where targets collecting audit events can be located. To allow targets in any region (i.e., No restrictions), configure this field as an empty list `[]`."
49+
type = list(string)
50+
default = []
51+
}
52+
53+
variable "private_api_endpoint_only" {
54+
description = "Public endpoints can be disabled for managing Activity Tracker Event Routing configuration via the CLI or REST API. When public endpoints are disabled, the Activity Tracker Event Routing UI will be inaccessible."
55+
type = bool
56+
default = false
57+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
terraform {
2+
required_version = ">= 1.9.0"
3+
required_providers {
4+
# Lock DA into an exact provider version - renovate automation will keep it updated
5+
ibm = {
6+
source = "ibm-cloud/ibm"
7+
version = "1.80.4"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)