generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added quickstart variation of the DA (#259)
- Loading branch information
1 parent
3e53b88
commit bc8f7c0
Showing
19 changed files
with
253 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Configuring topics in Event Streams | ||
|
||
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. | ||
|
||
To enter a custom value, use the edit action to open the "Edit Array" panel. Add the topics configurations to the array. | ||
|
||
|
||
## Options with topics | ||
|
||
- `name` (required): The name of the topic. | ||
- `partitions` (optional): The number of partitions of the topic. The default value is `1`. | ||
- `config` (optional): The configuration parameters of the topic. Supported configurations are: `cleanup.policy`, `retention.ms`, `retention.bytes`, `segment.bytes`, `segment.ms`, `segment.index.bytes`. | ||
|
||
The following example includes all the configuration options for topics. | ||
|
||
```hcl | ||
[ | ||
{ | ||
name = "my-es-topic" | ||
partitions = 1 | ||
config = { | ||
"cleanup.policy" = "delete" | ||
"retention.ms" = "86400000" | ||
"retention.bytes" = "10485760" | ||
"segment.bytes" = "10485760" | ||
} | ||
}, | ||
{ | ||
name = "topic-2" | ||
partitions = 1 | ||
config = { | ||
"cleanup.policy" = "compact,delete" | ||
"retention.ms" = "86400000" | ||
"retention.bytes" = "1073741824" | ||
"segment.bytes" = "536870912" | ||
} | ||
} | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Event Streams on IBM Cloud | ||
|
||
This architecture creates an instance of IBM Event Streams for IBM Cloud. | ||
|
||
The solution provisions the following resources: | ||
|
||
- A resource group, if one is not passed in. | ||
- An Event Streams instance using `lite` or `standard` plan. | ||
- Topics to apply to resources. Only one topic is allowed for `lite` plan instances. | ||
|
||
 |
3 changes: 1 addition & 2 deletions
3
...ard/catalogValidationValues.json.template → ...art/catalogValidationValues.json.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"ibmcloud_api_key": $VALIDATION_APIKEY, | ||
"resource_tags": $TAGS, | ||
"es_name": $PREFIX, | ||
"kms_key_crn": $HPCS_US_SOUTH_ROOT_KEY_CRN, | ||
"prefix": $PREFIX, | ||
"resource_group_name": $PREFIX | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
####################################################################################################################### | ||
# Resource Group | ||
####################################################################################################################### | ||
module "resource_group" { | ||
source = "terraform-ibm-modules/resource-group/ibm" | ||
version = "1.1.6" | ||
resource_group_name = var.use_existing_resource_group == false ? (var.prefix != null ? "${var.prefix}-${var.resource_group_name}" : var.resource_group_name) : null | ||
existing_resource_group_name = var.use_existing_resource_group == true ? var.resource_group_name : null | ||
} | ||
|
||
####################################################################################################################### | ||
# Event Streams Instance | ||
####################################################################################################################### | ||
module "event_streams" { | ||
source = "../../" | ||
resource_group_id = module.resource_group.resource_group_id | ||
es_name = var.prefix != null ? "${var.prefix}-${var.es_name}" : var.es_name | ||
plan = var.plan | ||
region = var.region | ||
topics = var.topics | ||
tags = var.resource_tags | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
variable "ibmcloud_api_key" { | ||
type = string | ||
description = "The IBM Cloud API key." | ||
sensitive = true | ||
} | ||
|
||
variable "prefix" { | ||
type = string | ||
description = "Optional. The prefix to append to all resources that this solution creates." | ||
default = null | ||
} | ||
|
||
variable "use_existing_resource_group" { | ||
type = bool | ||
description = "Whether to use an existing resource group." | ||
default = false | ||
} | ||
|
||
variable "resource_group_name" { | ||
type = string | ||
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." | ||
default = null | ||
} | ||
|
||
variable "es_name" { | ||
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." | ||
type = string | ||
default = "event-streams" | ||
} | ||
|
||
variable "region" { | ||
type = string | ||
description = "The region where the Event Streams are created." | ||
default = "us-south" | ||
} | ||
|
||
variable "resource_tags" { | ||
type = list(string) | ||
description = "The list of tags associated with the Event Streams instance." | ||
default = [] | ||
} | ||
|
||
variable "plan" { | ||
type = string | ||
description = "The plan for the Event Streams instance. Possible values: `lite` and `standard`." | ||
default = "standard" | ||
validation { | ||
condition = contains(["lite", "standard"], var.plan) | ||
error_message = "The specified plan is not a valid selection! Supported plans are: lite, standard." | ||
} | ||
} | ||
|
||
variable "topics" { | ||
type = list(object( | ||
{ | ||
name = string | ||
partitions = number | ||
config = object({}) | ||
} | ||
)) | ||
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)." | ||
default = [] | ||
} |
File renamed without changes.
Oops, something went wrong.