Skip to content

Commit 66cdfa6

Browse files
Add EN and Apprapp
1 parent 14780c3 commit 66cdfa6

File tree

10 files changed

+844
-223
lines changed

10 files changed

+844
-223
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Optionally, the module supports advanced security group management for the worke
3737
* <div style="display: inline-block;"><a href="./examples/cross_kms_support">Cross account KMS encryption example</a></div> <div style="display: inline-block; vertical-align: middle;"><a href="https://cloud.ibm.com/schematics/workspaces/create?workspace_name=bov-cross_kms_support-example&repository=https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/tree/main/examples/cross_kms_support" target="_blank"><img src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg" alt="Deploy to IBM Cloud button"></a></div>
3838
* <div style="display: inline-block;"><a href="./examples/custom_sg">Attaching custom security groups</a></div> <div style="display: inline-block; vertical-align: middle;"><a href="https://cloud.ibm.com/schematics/workspaces/create?workspace_name=bov-custom_sg-example&repository=https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/tree/main/examples/custom_sg" target="_blank"><img src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg" alt="Deploy to IBM Cloud button"></a></div>
3939
* <div style="display: inline-block;"><a href="./examples/fscloud">Financial Services compliant example</a></div> <div style="display: inline-block; vertical-align: middle;"><a href="https://cloud.ibm.com/schematics/workspaces/create?workspace_name=bov-fscloud-example&repository=https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/tree/main/examples/fscloud" target="_blank"><img src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg" alt="Deploy to IBM Cloud button"></a></div>
40-
* <div style="display: inline-block;"><a href="./examples/monolith">IBM Cloud OpenShift DA - Monolith Add-ons Module</a></div> <div style="display: inline-block; vertical-align: middle;"><a href="https://cloud.ibm.com/schematics/workspaces/create?workspace_name=bov-monolith-example&repository=https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/tree/main/examples/monolith" target="_blank"><img src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg" alt="Deploy to IBM Cloud button"></a></div>
40+
* <div style="display: inline-block;"><a href="./examples/monolith">IBM Cloud OpenShift DA - Monolith Add-ons Module Example</a></div> <div style="display: inline-block; vertical-align: middle;"><a href="https://cloud.ibm.com/schematics/workspaces/create?workspace_name=bov-monolith-example&repository=https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/tree/main/examples/monolith" target="_blank"><img src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg" alt="Deploy to IBM Cloud button"></a></div>
4141
* <div style="display: inline-block;"><a href="./examples/multiple_mzr_clusters">2 MZR clusters in same VPC example</a></div> <div style="display: inline-block; vertical-align: middle;"><a href="https://cloud.ibm.com/schematics/workspaces/create?workspace_name=bov-multiple_mzr_clusters-example&repository=https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/tree/main/examples/multiple_mzr_clusters" target="_blank"><img src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg" alt="Deploy to IBM Cloud button"></a></div>
4242
* [Contributing](#contributing)
4343
<!-- END OVERVIEW HOOK -->

examples/monolith/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# IBM Cloud OpenShift DA - Monolith Add-ons Module
1+
# IBM Cloud OpenShift DA - Monolith Add-ons Module Example
22

33
A simple example that shows how to provision a multi zone OCP VPC cluster as well as all foundational infrastructure and supporting services required for a secure and compliant OpenShift (OCP) cluster deployment on IBM Cloud VPC.
44

@@ -19,3 +19,5 @@ The following resources are provisioned by this example:
1919
- A COS instance along with 3 buckets for VPC flow logs, metrics/data bucket and activity tracker bucket.
2020
- A SCC-WP instance
2121
- A VPC instance
22+
- An event notifications instance
23+
- An app configuration service with aggregator enabled

examples/monolith/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,23 @@ module "monolith_add_ons" {
2525
kms_encryption_enabled_boot_volume = var.kms_encryption_enabled_boot_volume
2626
existing_boot_volume_kms_key_crn = var.existing_boot_volume_kms_key_crn
2727
kms_plan = var.kms_plan
28+
en_service_plan = var.en_service_plan
29+
en_service_endpoints = var.en_service_endpoints
2830
existing_secrets_manager_crn = var.existing_secrets_manager_crn
2931
secrets_manager_service_plan = var.secrets_manager_service_plan
3032
secrets_manager_endpoint_type = var.secrets_manager_endpoint_type
3133
secrets_manager_allowed_network = var.secrets_manager_allowed_network
3234
existing_event_notifications_instance_crn = var.existing_event_notifications_instance_crn
3335
existing_cos_instance_crn = var.existing_cos_instance_crn
3436
cos_instance_plan = var.cos_instance_plan
37+
management_endpoint_type_for_buckets = var.management_endpoint_type_for_buckets
3538
existing_cloud_monitoring_crn = var.existing_cloud_monitoring_crn
3639
cloud_monitoring_plan = var.cloud_monitoring_plan
3740
existing_cloud_logs_crn = var.existing_cloud_logs_crn
3841
scc_workload_protection_service_plan = var.scc_workload_protection_service_plan
3942
enable_vpc_flow_logs = var.enable_vpc_flow_logs
43+
app_config_plan = var.app_config_plan
44+
app_config_service_endpoints = var.app_config_service_endpoints
4045
}
4146

4247
########################################################################################################################

examples/monolith/outputs.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,20 @@ output "kms_instance_crn" {
130130
description = "The CRN of the Hyper Protect Crypto Service instance or Key Protect instance"
131131
}
132132

133+
##############################################################################
134+
# EN Outputs
135+
##############################################################################
136+
137+
output "en_crn" {
138+
description = "Event Notification crn"
139+
value = module.monolith_add_ons.en_crn
140+
}
141+
142+
output "en_guid" {
143+
description = "Event Notification guid"
144+
value = module.monolith_add_ons.en_guid
145+
}
146+
133147
##############################################################################
134148
# SM Outputs
135149
##############################################################################

examples/monolith/variables.tf

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,26 @@ variable "kms_plan" {
155155
# validation performed in terraform-ibm-key-protect module
156156
}
157157

158+
variable "en_service_plan" {
159+
type = string
160+
description = "The pricing plan of the Event Notifications instance. Possible values: `Lite`, `Standard`."
161+
default = "standard"
162+
validation {
163+
condition = contains(["lite", "standard"], var.en_service_plan)
164+
error_message = "The specified pricing plan is not available. The following plans are supported: `Lite`, `Standard`"
165+
}
166+
}
167+
168+
variable "en_service_endpoints" {
169+
type = string
170+
description = "Specify whether you want to enable public, private, or both public and private service endpoints. Possible values: `public`, `private`, `public-and-private`."
171+
default = "public-and-private"
172+
validation {
173+
condition = contains(["public", "private", "public-and-private"], var.en_service_endpoints)
174+
error_message = "The specified service endpoint is not supported. The following endpoint options are supported: `public`, `private`, `public-and-private`"
175+
}
176+
}
177+
158178
variable "existing_secrets_manager_crn" {
159179
type = string
160180
description = "The CRN of an existing Secrets Manager instance. If not supplied, a new instance is created."
@@ -207,6 +227,16 @@ variable "cos_instance_plan" {
207227
}
208228
}
209229

230+
variable "management_endpoint_type_for_buckets" {
231+
description = "The type of endpoint for the IBM Terraform provider to use to manage Object Storage buckets. Possible values: `public`, `private`, `direct`. If you specify `private`, enable virtual routing and forwarding in your account, and the Terraform runtime must have access to the the IBM Cloud private network."
232+
type = string
233+
default = "direct"
234+
validation {
235+
condition = contains(["public", "private", "direct"], var.management_endpoint_type_for_buckets)
236+
error_message = "The specified management_endpoint_type_for_buckets is not a valid selection!"
237+
}
238+
}
239+
210240
variable "existing_cloud_monitoring_crn" {
211241
type = string
212242
default = null
@@ -255,6 +285,25 @@ variable "enable_vpc_flow_logs" {
255285
default = true
256286
}
257287

288+
variable "app_config_plan" {
289+
type = string
290+
description = "Plan for the App Configuration service instance."
291+
default = "enterprise"
292+
nullable = false
293+
}
294+
295+
variable "app_config_service_endpoints" {
296+
type = string
297+
description = "Service Endpoints for the App Configuration service instance, valid endpoints are public or public-and-private."
298+
default = "public"
299+
nullable = false
300+
301+
validation {
302+
condition = contains(["public", "public-and-private"], var.app_config_service_endpoints)
303+
error_message = "Value for service endpoints must be one of the following: \"public\" or \"public-and-private\"."
304+
}
305+
}
306+
258307
########################################################################################################################
259308
# OCP VPC cluster
260309
########################################################################################################################

0 commit comments

Comments
 (0)