generated from terraform-ibm-modules/terraform-ibm-module-template
- Notifications
You must be signed in to change notification settings - Fork 6
feat: added fscloud profile #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
28 commits Select commit Hold shift + click to select a range
b6a7564 feat: added fscloud profile
Ak-sky 8b29f34 feat: fixed pr_test
Ak-sky 3c642cd feat: fixed pr_test
Ak-sky bf390d5 feat: fixed ci env vars
Ak-sky 90bc1a4 feat: added kms_encryption_enabled variable and cra ignore
Ak-sky 9c4484f feat: fscloud profile fixes
Ak-sky 03eabd4 Merge branch 'main' into es-fscloud
Ak-sky ab1cf2e feat: fscloud profile fixes
Ak-sky 9014cf7 Merge branch 'main' into es-fscloud
Ak-sky decb6dd feat: fscloud profile fixes
Ak-sky d54c1a3 feat: fscloud profile fixes
Ak-sky e07df40 feat: fscloud profile fixes
Ak-sky 7ef88a3 Merge branch 'es-fscloud' of github.com:terraform-ibm-modules/terrafo…
Ak-sky 1e9433e refactor: added standard plan for basic ex.
Ak-sky 465a5a1 refactor: removed rule form ignore file (CRA v1.36)
Ak-sky a277093 Revert "refactor: removed rule form ignore file (CRA v1.36)"
Ak-sky c742a09 refactor: addressed the review comments
Ak-sky b70d544 Merge branch 'main' into es-fscloud
Ak-sky bf87ba2 Merge branch 'es-fscloud' of github.com:terraform-ibm-modules/terrafo…
Ak-sky 200ec56 refactor: addressed the review comments
Ak-sky 1bda608 refactor: addressed the review comments
Ak-sky 069d940 refactor: addressed the review comments
Ak-sky 1e91667 doc: addressed review comments
Ak-sky 091dfec doc: addressed review comments
Ak-sky 1acf14d refactor: removed cbr from complete ex and skipping upgrade test
Ak-sky a7509ef refactor: added the complete ex back in pr test
Ak-sky 4b09014 refactor: modified readme
Ak-sky 8cad5fa refactor: modified complete ex and SKIP UPGRADE TEST due to CBR in ma…
Ak-sky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: added fscloud profile
- Loading branch information
commit b6a75646a05e3c459197b563c20245b15fc949b9
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,7 @@ | ||
| # Complete example with BYOK encryption | ||
| | ||
| An end-to-end example that creates an event streams instance with key protect. | ||
| This example uses the IBM Cloud terraform provider to: | ||
| - Create a new resource group if one is not passed in. | ||
| - Create a Key Protect instance and root key in the provided region. | ||
| - Create a new event streams instance in the resource group and region provided, encrypted with the root key created above, and configured with topics and schemas. |
This file contains hidden or 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,26 @@ | ||
| ############################################################################## | ||
| # Resource Group | ||
| ############################################################################## | ||
| | ||
| module "resource_group" { | ||
| source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-resource-group.git?ref=v1.0.5" | ||
| # if an existing resource group is not set (null) create a new one using prefix | ||
| resource_group_name = var.resource_group == null ? "${var.prefix}-resource-group" : null | ||
| existing_resource_group_name = var.resource_group | ||
| } | ||
| | ||
| # ############################################################################# | ||
| # Events-streams-instance | ||
| # ############################################################################# | ||
| | ||
| module "event_streams" { | ||
| source = "../../profiles/fscloud" | ||
| resource_group_id = module.resource_group.resource_group_id | ||
| es_name = "${var.prefix}-es" | ||
| plan = var.plan | ||
| kms_key_crn = var.kms_key_crn | ||
| existing_kms_instance_guid = var.existing_kms_instance_guid | ||
| schemas = var.schemas | ||
| tags = var.resource_tags | ||
| topics = var.topics | ||
| } |
This file contains hidden or 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,33 @@ | ||
| ############################################################################## | ||
| # Outputs | ||
| ############################################################################## | ||
| | ||
| output "resource_group_name" { | ||
| description = "Resource group name" | ||
| value = module.resource_group.resource_group_name | ||
| } | ||
| | ||
| output "resource_group_id" { | ||
| description = "Resource group ID" | ||
| value = module.resource_group.resource_group_id | ||
| } | ||
| | ||
| output "crn" { | ||
| description = "Event Streams instance crn" | ||
| value = module.event_streams.crn | ||
| } | ||
| | ||
| output "guid" { | ||
| description = "Event Streams instance guid" | ||
| value = module.event_streams.guid | ||
| } | ||
| | ||
| output "kafka_brokers_sasl" { | ||
| description = "(Array of Strings) Kafka brokers use for interacting with Kafka native API" | ||
| value = module.event_streams.kafka_brokers_sasl | ||
| } | ||
| | ||
| output "kafka_http_url" { | ||
| description = "The API endpoint to interact with Event Streams REST API" | ||
| value = module.event_streams.kafka_http_url | ||
| } |
This file contains hidden or 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,4 @@ | ||
| provider "ibm" { | ||
| ibmcloud_api_key = var.ibmcloud_api_key | ||
| region = var.region | ||
| } |
This file contains hidden or 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,113 @@ | ||
| variable "ibmcloud_api_key" { | ||
| type = string | ||
| description = "The IBM Cloud API Key" | ||
| sensitive = true | ||
| } | ||
| | ||
| variable "region" { | ||
| type = string | ||
| description = "Region to provision all resources created by this example" | ||
| default = "us-south" | ||
| } | ||
| | ||
| variable "plan" { | ||
| type = string | ||
| description = "Plan for the event stream instance. lite, standard or enterprise-3nodes-2tb" | ||
| default = "standard" | ||
| } | ||
| | ||
| variable "prefix" { | ||
| type = string | ||
| description = "Prefix to append to all resources created by this example" | ||
| default = "fs-cloud" | ||
| } | ||
| | ||
| variable "resource_group" { | ||
| type = string | ||
| description = "An existing resource group name to use for this example, if unset a new resource group will be created" | ||
| default = null | ||
| } | ||
| | ||
| variable "resource_tags" { | ||
| type = list(string) | ||
| description = "List of tags associated with the Event Steams instance" | ||
| default = [] | ||
| } | ||
| | ||
| variable "schemas" { | ||
| type = list(object( | ||
| { | ||
| schema_id = string | ||
| schema = object({ | ||
| type = string | ||
| name = string | ||
| }) | ||
| } | ||
| )) | ||
| description = "The list of schema object which contains schema id and format of the schema" | ||
| default = [{ | ||
| schema_id = "my-es-schema_1" | ||
| schema = { | ||
| type = "string" | ||
| name = "name_1" | ||
| } | ||
| }, | ||
| { | ||
| schema_id = "my-es-schema_2" | ||
| schema = { | ||
| type = "string" | ||
| name = "name_2" | ||
| } | ||
| }, | ||
| { | ||
| schema_id = "my-es-schema_3" | ||
| schema = { | ||
| type = "string" | ||
| name = "name_3" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| | ||
| variable "topics" { | ||
| type = list(object( | ||
| { | ||
| name = string | ||
| partitions = number | ||
| config = object({}) | ||
| } | ||
| )) | ||
| description = "List of topics. For lite plan only one topic is allowed." | ||
| default = [ | ||
| { | ||
| name = "topic-1" | ||
| 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" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| | ||
| variable "existing_kms_instance_guid" { | ||
| description = "The GUID of the Hyper Protect Crypto service in which the key specified in var.kms_key_crn is coming from" | ||
| type = string | ||
| } | ||
| | ||
| variable "kms_key_crn" { | ||
| type = string | ||
| description = "The root key CRN of a Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. See https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs&interface=ui for more information on integrating HPCS with MongoDB instance." | ||
| } | ||
This file contains hidden or 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,9 @@ | ||
| terraform { | ||
| required_version = ">= 1.3.0" | ||
| required_providers { | ||
| ibm = { | ||
| source = "IBM-Cloud/ibm" | ||
| version = "1.49.0" | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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,7 @@ | ||
| # Complete example with BYOK encryption | ||
| | ||
| An end-to-end example that creates an event streams instance with key protect. | ||
| This example uses the IBM Cloud terraform provider to: | ||
| - Create a new resource group if one is not passed in. | ||
| - Create a Key Protect instance and root key in the provided region. | ||
| - Create a new event streams instance in the resource group and region provided, encrypted with the root key created above, and configured with topics and schemas. |
This file contains hidden or 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,13 @@ | ||
| module "event_streams" { | ||
| source = "../../" | ||
| resource_group_id = var.resource_group_id | ||
| es_name = var.es_name | ||
| plan = var.plan | ||
| skip_iam_authorization_policy = var.skip_iam_authorization_policy | ||
| kms_key_crn = var.kms_key_crn | ||
| existing_kms_instance_guid = var.existing_kms_instance_guid | ||
| schemas = var.schemas | ||
| tags = var.tags | ||
| topics = var.topics | ||
| service_endpoints = "private" | ||
| } |
This file contains hidden or 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,23 @@ | ||
| ############################################################################## | ||
| # Outputs | ||
| ############################################################################## | ||
| | ||
ocofaigh marked this conversation as resolved. Show resolved Hide resolved | ||
| output "crn" { | ||
| description = "Event Streams instance crn" | ||
| value = module.event_streams.crn | ||
| } | ||
| | ||
| output "guid" { | ||
| description = "Event Streams instance guid" | ||
| value = module.event_streams.guid | ||
| } | ||
| | ||
| output "kafka_brokers_sasl" { | ||
| description = "(Array of Strings) Kafka brokers use for interacting with Kafka native API" | ||
| value = module.event_streams.kafka_brokers_sasl | ||
| } | ||
| | ||
| output "kafka_http_url" { | ||
| description = "The API endpoint to interact with Event Streams REST API" | ||
| value = module.event_streams.kafka_http_url | ||
| } | ||
This file contains hidden or 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,107 @@ | ||
| variable "plan" { | ||
| type = string | ||
| description = "Plan for the event stream instance. lite, standard or enterprise-3nodes-2tb" | ||
| default = "standard" | ||
| } | ||
| | ||
| variable "resource_group_id" { | ||
| description = "ID of resource group to use when creating the event stream instance" | ||
| type = string | ||
| } | ||
| | ||
| variable "tags" { | ||
| type = list(string) | ||
| description = "List of tags associated with the Event Steams instance" | ||
| default = [] | ||
| } | ||
| | ||
| variable "es_name" { | ||
| description = "Name of the event streams instance" | ||
| type = string | ||
| } | ||
| | ||
| variable "schemas" { | ||
| type = list(object( | ||
| { | ||
| schema_id = string | ||
| schema = object({ | ||
| type = string | ||
| name = string | ||
| }) | ||
| } | ||
| )) | ||
| description = "The list of schema object which contains schema id and format of the schema" | ||
| default = [{ | ||
Ak-sky marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| schema_id = "my-es-schema_1" | ||
| schema = { | ||
| type = "string" | ||
| name = "name_1" | ||
| } | ||
| }, | ||
| { | ||
| schema_id = "my-es-schema_2" | ||
| schema = { | ||
| type = "string" | ||
| name = "name_2" | ||
| } | ||
| }, | ||
| { | ||
| schema_id = "my-es-schema_3" | ||
| schema = { | ||
| type = "string" | ||
| name = "name_3" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| | ||
| variable "topics" { | ||
| type = list(object( | ||
| { | ||
| name = string | ||
| partitions = number | ||
| config = object({}) | ||
| } | ||
| )) | ||
| description = "List of topics. For lite plan only one topic is allowed." | ||
| default = [ | ||
Ak-sky marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| { | ||
| name = "topic-1" | ||
| 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" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| | ||
| variable "kms_key_crn" { | ||
| type = string | ||
| description = "(Optional) The root key CRN of a Key Management Service like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. If null, database is encrypted by using randomly generated keys. See https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-managing_encryption for more info." | ||
| default = null | ||
| } | ||
| | ||
| variable "existing_kms_instance_guid" { | ||
| description = "(Optional) The GUID of the Hyper Protect or Key Protect instance in which the key specified in var.kms_key_crn is coming from. Only required if skip_iam_authorization_policy is false" | ||
| type = string | ||
| default = null | ||
| } | ||
| | ||
| variable "skip_iam_authorization_policy" { | ||
| type = bool | ||
| description = "Set to true to skip the creation of an IAM authorization policy that permits all mongodb instances in the provided resource group reader access to the instance specified in the existing_kms_instance_guid variable." | ||
Ak-sky marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| default = false | ||
| } | ||
This file contains hidden or 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,3 @@ | ||
| terraform { | ||
| required_version = ">= 1.3.0" | ||
| } | ||
ocofaigh marked this conversation as resolved. Show resolved Hide resolved | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.