Skip to content

Commit bc8f7c0

Browse files
feat: added quickstart variation of the DA (#259)
1 parent 3e53b88 commit bc8f7c0

19 files changed

+253
-284
lines changed

.catalog-onboard-pipeline.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ offerings:
66
catalog_id: 7df1e4ca-d54c-4fd0-82ce-3d13247308cd
77
offering_id: 8272d54f-b54f-46a6-8dd6-772c6db82e87
88
variations:
9-
- name: standard
9+
- name: quickstart
1010
mark_ready: true
1111
install_type: fullstack
1212
scc:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ You need the following permissions to run this module.
133133
| <a name="input_create_timeout"></a> [create\_timeout](#input\_create\_timeout) | The timeout value for creating an Event Streams instance. Specify `3h` for an Enterprise plan instance. Add 1 h for each level of non-default throughput. Add 30 min for each level of non-default storage size. | `string` | `"3h"` | no |
134134
| <a name="input_delete_timeout"></a> [delete\_timeout](#input\_delete\_timeout) | The timeout value for deleting an Event Streams instance. | `string` | `"15m"` | no |
135135
| <a name="input_es_name"></a> [es\_name](#input\_es\_name) | The name to give the Event Streams instance created by this module. | `string` | n/a | yes |
136-
| <a name="input_kms_key_crn"></a> [kms\_key\_crn](#input\_kms\_key\_crn) | The root key CRN of the key management service (Key Protect or Hyper Protect Crypto Services) to use to encrypt the payload data. Applies only if `kms_encryption_enabled` is set to `true`. [Learn more](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-managing_encryption) about integrating Hyper Protect Crypto Services with Event Streams. Configure an authorization policy to allow the Event Streams service to access the key management service instance with the reader role ([Learn more](https://cloud.ibm.com/docs/account?topic=account-serviceauth)). You can't manage the policy in the same Terraform state file as the Event Streams service instance ([Learn more](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-managing_encryption#using\_encryption)). | `string` | `null` | no |
136+
| <a name="input_kms_key_crn"></a> [kms\_key\_crn](#input\_kms\_key\_crn) | The root key CRN of the key management service (Key Protect or Hyper Protect Crypto Services) to use to encrypt the payload data. [Learn more](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-managing_encryption) about integrating Hyper Protect Crypto Services with Event Streams. Configure an authorization policy to allow the Event Streams service to access the key management service instance with the reader role ([Learn more](https://cloud.ibm.com/docs/account?topic=account-serviceauth)). You can't manage the policy in the same Terraform state file as the Event Streams service instance ([Learn more](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-managing_encryption#using\_encryption)). | `string` | `null` | no |
137137
| <a name="input_plan"></a> [plan](#input\_plan) | The plan for the Event Streams instance. Possible values: `lite`, `standard`, `enterprise-3nodes-2tb`. | `string` | `"standard"` | no |
138138
| <a name="input_region"></a> [region](#input\_region) | The region where the Event Streams are created. | `string` | `"us-south"` | no |
139139
| <a name="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id) | The resource group ID where the Event Streams instance is created. | `string` | n/a | yes |

ibm_catalog.json

+102-36
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,113 @@
2121
"fscloud"
2222
],
2323
"short_description": "Supports provisioning and configuring IBM Event Streams for IBM Cloud.",
24-
"long_description": "This architecture supports creating Event Streams with topics, partitions, throughput, storage size, cleanup policy, retention time, retention size, segment size, and schema.",
24+
"long_description": "This architecture supports creation and configuration of IBM Cloud Event Streams.",
2525
"offering_docs_url": "https://github.com/terraform-ibm-modules/terraform-ibm-event-streams/blob/main/README.md",
2626
"offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-event-streams/main/images/event_streams.svg",
2727
"provider_name": "IBM",
2828
"features": [
2929
{
3030
"title": "Create IBM Event Streams for IBM Cloud",
31-
"description": "Create IBM Event Streams to build responsive, durable, and highly available architecture deployments."
31+
"description": "Create and configure IBM Event Streams to build responsive, durable, and highly available architecture deployments."
3232
},
3333
{
34-
"title": "Configure Event Streams",
35-
"description": "Creates topics, partitions, throughput, storage size, cleanup policy, retention time, retention size, segment size, and schemas."
36-
},
37-
{
38-
"title": "Create context-based restrictions",
39-
"description": "Enhance cloud security by defining and enforcing access restrictions for Event Streams based on the context of the access request."
34+
"title": "Creates topics in the Event Streams instance",
35+
"description": "Creates topics in IBM Cloud Event Streams instance."
4036
}
4137
],
4238
"flavors": [
4339
{
44-
"label": "standard",
45-
"name": "standard",
40+
"label": "quickstart",
41+
"name": "quickstart",
4642
"install_type": "fullstack",
47-
"working_directory": "solutions/standard",
48-
"compliance": {
49-
"authority": "scc-v3",
50-
"profiles": [
51-
{
52-
"profile_name": "IBM Cloud Framework for Financial Services",
53-
"profile_version": "1.6.0"
54-
}
55-
]
56-
},
43+
"working_directory": "solutions/quickstart",
44+
"configuration": [
45+
{
46+
"key": "ibmcloud_api_key"
47+
},
48+
{
49+
"key": "prefix"
50+
},
51+
{
52+
"key": "use_existing_resource_group"
53+
},
54+
{
55+
"key": "resource_group_name"
56+
},
57+
{
58+
"key": "es_name"
59+
},
60+
{
61+
"key": "region",
62+
"required": true,
63+
"default_value": "",
64+
"options": [
65+
{
66+
"displayname": "Dallas (us-south)",
67+
"value": "us-south"
68+
},
69+
{
70+
"displayname": "Frankfurt (eu-de)",
71+
"value": "eu-de"
72+
},
73+
{
74+
"displayname": "London (eu-gb)",
75+
"value": "eu-gb"
76+
},
77+
{
78+
"displayname": "Madrid (eu-es)",
79+
"value": "eu-es"
80+
},
81+
{
82+
"displayname": "Osaka (jp-osa)",
83+
"value": "jp-osa"
84+
},
85+
{
86+
"displayname": "Sydney (au-syd)",
87+
"value": "au-syd"
88+
},
89+
{
90+
"displayname": "Tokyo (jp-tok)",
91+
"value": "jp-tok"
92+
},
93+
{
94+
"displayname": "Osaka (jp-osa)",
95+
"value": "jp-osa"
96+
},
97+
{
98+
"displayname": "Sao Paulo (br-sao)",
99+
"value": "br-sao"
100+
},
101+
{
102+
"displayname": "Toronto (ca-tor)",
103+
"value": "ca-tor"
104+
},
105+
{
106+
"displayname": "Washington (us-east)",
107+
"value": "us-east"
108+
}
109+
]
110+
},
111+
{
112+
"key": "resource_tags"
113+
},
114+
{
115+
"key": "plan",
116+
"options": [
117+
{
118+
"displayname": "lite",
119+
"value": "lite"
120+
},
121+
{
122+
"displayname": "standard",
123+
"value": "standard"
124+
}
125+
]
126+
},
127+
{
128+
"key": "topics"
129+
}
130+
],
57131
"iam_permissions": [
58132
{
59133
"role_crns": [
@@ -69,33 +143,25 @@
69143
}
70144
],
71145
"architecture": {
72-
"descriptions": "This architecture creates an Enterprise plan instance of IBM Event Streams for IBM Cloud that is IBM Cloud® Financial Services certified.",
146+
"descriptions": "This architecture creates an instance of IBM Event Streams for IBM Cloud in lite and standard plan. It also supports the creation of topics in the Event Streams instance.",
73147
"features": [
74148
{
75-
"title": "Event Streams instance",
76-
"description": "Yes"
77-
},
78-
{
79-
"title": "KMS encryption to encrypt data",
80-
"description": "Yes"
81-
},
82-
{
83-
"title": "Context-based restriction rules for the Event Streams instance",
84-
"description": "Yes"
149+
"title": "Creates an Event Streams instance",
150+
"description": "Creates and configures the IBM Cloud Event Streams instance."
85151
},
86152
{
87-
"title": "Event Streams topics and schemas",
88-
"description": "Yes"
153+
"title": "Creates topics in the Event Streams instance",
154+
"description": "Creates topics in IBM Cloud Event Streams instance."
89155
}
90156
],
91157
"diagrams": [
92158
{
93159
"diagram": {
94-
"caption": "IBM Event Streams for IBM Cloud Enterprise plan instance that is IBM Cloud® Financial Services certified.",
95-
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-event-streams/main/reference-architecture/da-fscloud.svg",
160+
"caption": "IBM Event Streams for IBM Cloud.",
161+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-event-streams/main/reference-architecture/da-quickstart.svg",
96162
"type": "image/svg+xml"
97163
},
98-
"description": "This architecture creates an Enterprise plan instance of IBM Event Streams for IBM Cloud that is IBM Cloud® Financial Services certified."
164+
"description": "This architecture creates an instance of IBM Event Streams for IBM Cloud."
99165
}
100166
]
101167
}

reference-architecture/da-fscloud.svg

-4
This file was deleted.

reference-architecture/da-quickstart.svg

+4
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Configuring topics in Event Streams
2+
3+
When you add a Event Streams deployable architecture from the IBM Cloud catalog to IBM Cloud Projects, you can configure topics. When you edit your project configuration, select the **Configure** panel, and then click the **Optional** tab.
4+
5+
To enter a custom value, use the edit action to open the "Edit Array" panel. Add the topics configurations to the array.
6+
7+
8+
## Options with topics
9+
10+
- `name` (required): The name of the topic.
11+
- `partitions` (optional): The number of partitions of the topic. The default value is `1`.
12+
- `config` (optional): The configuration parameters of the topic. Supported configurations are: `cleanup.policy`, `retention.ms`, `retention.bytes`, `segment.bytes`, `segment.ms`, `segment.index.bytes`.
13+
14+
The following example includes all the configuration options for topics.
15+
16+
```hcl
17+
[
18+
{
19+
name = "my-es-topic"
20+
partitions = 1
21+
config = {
22+
"cleanup.policy" = "delete"
23+
"retention.ms" = "86400000"
24+
"retention.bytes" = "10485760"
25+
"segment.bytes" = "10485760"
26+
}
27+
},
28+
{
29+
name = "topic-2"
30+
partitions = 1
31+
config = {
32+
"cleanup.policy" = "compact,delete"
33+
"retention.ms" = "86400000"
34+
"retention.bytes" = "1073741824"
35+
"segment.bytes" = "536870912"
36+
}
37+
}
38+
]
39+
```

solutions/quickstart/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Event Streams on IBM Cloud
2+
3+
This architecture creates an instance of IBM Event Streams for IBM Cloud.
4+
5+
The solution provisions the following resources:
6+
7+
- A resource group, if one is not passed in.
8+
- An Event Streams instance using `lite` or `standard` plan.
9+
- Topics to apply to resources. Only one topic is allowed for `lite` plan instances.
10+
11+
![da-quickstart](../../reference-architecture/da-quickstart.svg)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"ibmcloud_api_key": $VALIDATION_APIKEY,
33
"resource_tags": $TAGS,
4-
"es_name": $PREFIX,
5-
"kms_key_crn": $HPCS_US_SOUTH_ROOT_KEY_CRN,
4+
"prefix": $PREFIX,
65
"resource_group_name": $PREFIX
76
}

solutions/quickstart/main.tf

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#######################################################################################################################
2+
# Resource Group
3+
#######################################################################################################################
4+
module "resource_group" {
5+
source = "terraform-ibm-modules/resource-group/ibm"
6+
version = "1.1.6"
7+
resource_group_name = var.use_existing_resource_group == false ? (var.prefix != null ? "${var.prefix}-${var.resource_group_name}" : var.resource_group_name) : null
8+
existing_resource_group_name = var.use_existing_resource_group == true ? var.resource_group_name : null
9+
}
10+
11+
#######################################################################################################################
12+
# Event Streams Instance
13+
#######################################################################################################################
14+
module "event_streams" {
15+
source = "../../"
16+
resource_group_id = module.resource_group.resource_group_id
17+
es_name = var.prefix != null ? "${var.prefix}-${var.es_name}" : var.es_name
18+
plan = var.plan
19+
region = var.region
20+
topics = var.topics
21+
tags = var.resource_tags
22+
}
File renamed without changes.
File renamed without changes.

solutions/quickstart/variables.tf

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
variable "ibmcloud_api_key" {
2+
type = string
3+
description = "The IBM Cloud API key."
4+
sensitive = true
5+
}
6+
7+
variable "prefix" {
8+
type = string
9+
description = "Optional. The prefix to append to all resources that this solution creates."
10+
default = null
11+
}
12+
13+
variable "use_existing_resource_group" {
14+
type = bool
15+
description = "Whether to use an existing resource group."
16+
default = false
17+
}
18+
19+
variable "resource_group_name" {
20+
type = string
21+
description = "The name of a new or the existing resource group to provision the Event Streams instance. If a prefix input variable is passed, it is prefixed to the value in the `<prefix>-value` format."
22+
default = null
23+
}
24+
25+
variable "es_name" {
26+
description = "The name of the Event Streams instance to create. If a prefix input variable is passed, it is prefixed to the value in the `<prefix>-value` format."
27+
type = string
28+
default = "event-streams"
29+
}
30+
31+
variable "region" {
32+
type = string
33+
description = "The region where the Event Streams are created."
34+
default = "us-south"
35+
}
36+
37+
variable "resource_tags" {
38+
type = list(string)
39+
description = "The list of tags associated with the Event Streams instance."
40+
default = []
41+
}
42+
43+
variable "plan" {
44+
type = string
45+
description = "The plan for the Event Streams instance. Possible values: `lite` and `standard`."
46+
default = "standard"
47+
validation {
48+
condition = contains(["lite", "standard"], var.plan)
49+
error_message = "The specified plan is not a valid selection! Supported plans are: lite, standard."
50+
}
51+
}
52+
53+
variable "topics" {
54+
type = list(object(
55+
{
56+
name = string
57+
partitions = number
58+
config = object({})
59+
}
60+
))
61+
description = "The list of topics to apply to resources. Only one topic is allowed for Lite plan instances. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-event-streams/tree/main/solutions/quickstart/DA-schemas-topics-cbr.md)."
62+
default = []
63+
}
File renamed without changes.

0 commit comments

Comments
 (0)