generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 15
feat: Monolith example for base-ocp-vpc DA #883
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 all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
36ccc09
feat: Monolith example for base-ocp-vpc DA
mukulpalit-ibm fe2cbc7
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm 14780c3
merge changes
mukulpalit-ibm 66cdfa6
Add EN and Apprapp
mukulpalit-ibm 2e1a549
remove existing resources
mukulpalit-ibm defc0c9
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm ed93cb9
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm cf01b7c
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm 6e4dbb1
add monitoring and logs agent
mukulpalit-ibm 092fc2c
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm 5119f27
PR changes
mukulpalit-ibm f8a14cb
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm b3a60e6
pre-commit changes
mukulpalit-ibm a5309f7
pre-commit changes
mukulpalit-ibm 603ecaa
Update folder name
mukulpalit-ibm 8a920bf
Update folder name
mukulpalit-ibm 4de060a
PR changes
mukulpalit-ibm 8c2241e
README changes
mukulpalit-ibm c2dc842
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm b104239
pre-commit changes
mukulpalit-ibm 0a0dc0d
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm 7cf500e
remove monolith submodule
mukulpalit-ibm 20d634f
update monolith example
mukulpalit-ibm 784faa5
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm 2d37bb2
Merge branch 'main' into 16039/monolith-terraform
mukulpalit-ibm 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
examples/containerized_app_landing_zone/kubeconfig/.gitignore
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,6 @@ | ||
| # Ignore everything | ||
| * | ||
|
|
||
| # But not these files... | ||
| !.gitignore | ||
| !README.md |
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,2 @@ | ||
| This directory must exist in source control so the `ibm_container_cluster_config` data lookup can use it to place the | ||
| config.yml used to connect to a kubernetes cluster. |
Large diffs are not rendered by default.
Oops, something went wrong.
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,294 @@ | ||
| ############################################################################## | ||
| # Cluster Outputs | ||
| ############################################################################## | ||
|
|
||
| output "cluster_name" { | ||
| value = module.ocp_base.cluster_name | ||
| description = "The name of the provisioned OpenShift cluster." | ||
| } | ||
|
|
||
| output "cluster_id" { | ||
| value = module.ocp_base.cluster_id | ||
| description = "The unique identifier assigned to the provisioned OpenShift cluster." | ||
| } | ||
|
|
||
| output "cluster_crn" { | ||
| description = "The Cloud Resource Name (CRN) of the provisioned OpenShift cluster." | ||
| value = module.ocp_base.cluster_crn | ||
| } | ||
|
|
||
| output "workerpools" { | ||
| description = "A list of worker pools associated with the provisioned cluster" | ||
| value = module.ocp_base.workerpools | ||
| } | ||
|
|
||
| output "ocp_version" { | ||
| description = "The version of OpenShift running on the provisioned cluster." | ||
| value = module.ocp_base.ocp_version | ||
| } | ||
|
|
||
|
|
||
| ############################################################################## | ||
| # VPC | ||
| ############################################################################## | ||
|
|
||
| output "vpc_name" { | ||
| description = "Name of the VPC created." | ||
| value = module.vpc.vpc_name | ||
| } | ||
|
|
||
| output "vpc_id" { | ||
| description = "ID of the VPC created." | ||
| value = module.vpc.vpc_id | ||
| } | ||
|
|
||
| output "vpc_crn" { | ||
| description = "CRN of the VPC created." | ||
| value = module.vpc.vpc_crn | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # Public Gateways | ||
| ############################################################################## | ||
|
|
||
| output "public_gateways" { | ||
| description = "Map of the public gateways by zone." | ||
| value = module.vpc.public_gateways | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # VPC flow logs | ||
| ############################################################################## | ||
|
|
||
| output "vpc_flow_logs" { | ||
| description = "Details of the VPC flow logs collector." | ||
| value = module.vpc.vpc_flow_logs | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # Network ACLs | ||
| ############################################################################## | ||
|
|
||
| output "network_acls" { | ||
| description = "List of shortnames and IDs of network ACLs." | ||
| value = module.vpc.network_acls | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # Subnet Outputs | ||
| ############################################################################## | ||
|
|
||
| output "subnet_ids" { | ||
| description = "The IDs of the subnets." | ||
| value = module.vpc.subnet_ids | ||
| } | ||
|
|
||
| output "private_path_subnet_id" { | ||
| description = "The IDs of the subnets." | ||
| value = length(module.vpc.subnet_ids) > 0 ? module.vpc.subnet_ids[0] : null | ||
| } | ||
|
|
||
| output "subnet_detail_list" { | ||
| description = "A list of subnets containing names, CIDR blocks, and zones." | ||
| value = module.vpc.subnet_detail_list | ||
| } | ||
|
|
||
| output "subnet_zone_list" { | ||
| description = "A list of subnet IDs and subnet zones." | ||
| value = module.vpc.subnet_zone_list | ||
| } | ||
|
|
||
| output "subnet_detail_map" { | ||
| description = "A map of subnets containing IDs, CIDR blocks, and zones." | ||
| value = module.vpc.subnet_detail_map | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # VPN Gateways Outputs | ||
| ############################################################################## | ||
|
|
||
| output "vpn_gateways_name" { | ||
| description = "List of names of VPN gateways." | ||
| value = module.vpc.vpn_gateways_name | ||
| } | ||
|
|
||
| output "vpn_gateways_data" { | ||
| description = "Details of VPN gateways data." | ||
| value = module.vpc.vpn_gateways_data | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # VPE Outputs | ||
| ############################################################################## | ||
|
|
||
| output "vpe_ips" { | ||
| description = "The reserved IPs for endpoint gateways." | ||
| value = module.vpe_gateway.vpe_ips | ||
| } | ||
|
|
||
| output "vpe_crn" { | ||
| description = "The CRN of the endpoint gateway." | ||
| value = module.vpe_gateway.crn | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # KMS Outputs | ||
| ############################################################################## | ||
|
|
||
| output "kms_guid" { | ||
| description = "KMS instance GUID" | ||
| value = module.kms.kms_guid | ||
| } | ||
|
|
||
| output "kms_account_id" { | ||
| description = "The account ID of the KMS instance." | ||
| value = module.kms.kms_account_id | ||
| } | ||
|
|
||
| output "kms_instance_crn" { | ||
| value = module.kms.key_protect_crn | ||
| description = "The CRN of the KMS instance" | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # Events Notification Outputs | ||
| ############################################################################## | ||
|
|
||
| output "events_notification_crn" { | ||
| description = "Event Notification crn" | ||
| value = module.event_notifications.crn | ||
| } | ||
|
|
||
| output "events_notification_guid" { | ||
| description = "Event Notification guid" | ||
| value = module.event_notifications.guid | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # Secrets Manager Outputs | ||
| ############################################################################## | ||
|
|
||
| output "secrets_manager_guid" { | ||
| description = "GUID of Secrets Manager instance" | ||
| value = module.secrets_manager.secrets_manager_guid | ||
| } | ||
|
|
||
| output "secrets_manager_crn" { | ||
| value = module.secrets_manager.secrets_manager_crn | ||
| description = "CRN of the Secrets Manager instance" | ||
| } | ||
|
|
||
| output "secrets_manager_region" { | ||
| value = module.secrets_manager.secrets_manager_region | ||
| description = "Region of the Secrets Manager instance" | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # COS Outputs | ||
| ############################################################################## | ||
|
|
||
| output "cos_instance_crn" { | ||
| description = "COS instance crn" | ||
| value = module.cos.cos_instance_crn | ||
| } | ||
|
|
||
| output "cos_instance_guid" { | ||
| description = "COS instance guid" | ||
| value = module.cos.cos_instance_guid | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # Cloud Monitoring Outputs | ||
| ############################################################################## | ||
|
|
||
| output "cloud_monitoring_crn" { | ||
| value = module.cloud_monitoring.crn | ||
| description = "The id of the provisioned IBM Cloud Monitoring instance." | ||
| } | ||
| output "cloud_monitoring_name" { | ||
| value = module.cloud_monitoring.name | ||
| description = "The name of the provisioned IBM Cloud Monitoring instance." | ||
| } | ||
|
|
||
| output "cloud_monitoring_guid" { | ||
| value = module.cloud_monitoring.guid | ||
| description = "The guid of the provisioned IBM Cloud Monitoring instance." | ||
| } | ||
|
|
||
| output "cloud_monitoring_access_key_name" { | ||
| value = module.cloud_monitoring.access_key_name | ||
| description = "The name of the IBM Cloud Monitoring access key for agents to use" | ||
| } | ||
|
|
||
| output "cloud_monitoring_access_key" { | ||
| value = module.cloud_monitoring.access_key | ||
| description = "The IBM Cloud Monitoring access key for agents to use" | ||
| sensitive = true | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # Cloud Logs Outputs | ||
| ############################################################################## | ||
|
|
||
| output "cloud_logs_crn" { | ||
| value = module.cloud_logs.crn | ||
| description = "The id of the provisioned IBM Cloud Logs instance." | ||
| } | ||
|
|
||
| output "cloud_logs_guid" { | ||
| value = module.cloud_logs.guid | ||
| description = "The guid of the provisioned IBM Cloud Logs instance." | ||
| } | ||
|
|
||
| output "cloud_logs_name" { | ||
| value = module.cloud_logs.name | ||
| description = "The name of the provisioned IBM Cloud Logs instance." | ||
| } | ||
|
|
||
| output "logs_bucket_crn" { | ||
| description = "Logs Cloud Object Storage bucket CRN" | ||
| value = module.cloud_logs_buckets.buckets[local.data_bucket_name].bucket_crn | ||
| } | ||
|
|
||
| output "metrics_bucket_crn" { | ||
| description = "Metrics Cloud Object Storage bucket CRN" | ||
| value = module.cloud_logs_buckets.buckets[local.metrics_bucket_name].bucket_crn | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # Activity Tracker Event Routing Outputs | ||
| ############################################################################## | ||
|
|
||
| output "activity_tracker_cos_target_bucket_name" { | ||
| value = module.at_cos_bucket.buckets[local.activity_tracker_cos_target_bucket_name].bucket_name | ||
| description = "he name of the object storage bucket which is set as activity tracker event routing target to collect audit events." | ||
| } | ||
|
|
||
| output "activity_tracker_targets" { | ||
| value = module.activity_tracker.activity_tracker_targets | ||
| description = "The map of created Activity Tracker Event Routing targets" | ||
| } | ||
|
|
||
| output "activity_tracker_routes" { | ||
| value = module.activity_tracker.activity_tracker_routes | ||
| description = "The map of created Activity Tracker Event Routing routes" | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # SCC-WP Outputs | ||
| ############################################################################## | ||
|
|
||
| output "scc_workload_protection_id" { | ||
| description = "SCC Workload Protection instance ID" | ||
| value = module.scc_wp.id | ||
| } | ||
|
|
||
| output "scc_workload_protection_crn" { | ||
| description = "SCC Workload Protection instance CRN" | ||
| value = module.scc_wp.crn | ||
| } | ||
|
|
||
| output "scc_workload_protection_name" { | ||
| description = "SCC Workload Protection instance name" | ||
| value = module.scc_wp.name | ||
| } |
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,28 @@ | ||
| provider "ibm" { | ||
| ibmcloud_api_key = var.ibmcloud_api_key | ||
| region = var.region | ||
| } | ||
|
|
||
| data "ibm_iam_auth_token" "auth_token" {} | ||
|
|
||
| provider "restapi" { | ||
| uri = "https://resource-controller.cloud.ibm.com" | ||
| headers = { | ||
| Authorization = data.ibm_iam_auth_token.auth_token.iam_access_token | ||
| } | ||
| write_returns_object = true | ||
| } | ||
|
|
||
| provider "helm" { | ||
| kubernetes = { | ||
| host = data.ibm_container_cluster_config.cluster_config.host | ||
| token = data.ibm_container_cluster_config.cluster_config.token | ||
| cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate | ||
| } | ||
| } | ||
|
|
||
| provider "kubernetes" { | ||
| host = data.ibm_container_cluster_config.cluster_config.host | ||
| token = data.ibm_container_cluster_config.cluster_config.token | ||
| cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate | ||
| } |
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,47 @@ | ||
| ######################################################################################################################## | ||
| # Input variables | ||
| ######################################################################################################################## | ||
|
|
||
| variable "ibmcloud_api_key" { | ||
| type = string | ||
| description = "The IBM Cloud api token" | ||
| sensitive = true | ||
| } | ||
|
|
||
| variable "prefix" { | ||
| type = string | ||
| description = "Prefix for name of all resource created by this example" | ||
| default = "ocp-lz" | ||
| validation { | ||
| error_message = "Prefix must begin and end with a letter and contain only letters, numbers, and - characters." | ||
| condition = can(regex("^([A-z]|[a-z][-a-z0-9]*[a-z0-9])$", var.prefix)) | ||
| } | ||
| } | ||
|
|
||
| variable "region" { | ||
| type = string | ||
| description = "Region where resources are created" | ||
| default = "us-south" | ||
| } | ||
|
|
||
| variable "provider_visibility" { | ||
| description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`." | ||
| type = string | ||
| default = "private" | ||
| validation { | ||
| condition = contains(["public", "private", "public-and-private"], var.provider_visibility) | ||
| error_message = "Invalid visibility option. Allowed values are `public`, `private`, or `public-and-private`." | ||
| } | ||
| } | ||
|
|
||
| variable "existing_resource_group_name" { | ||
| type = string | ||
| description = "The name of an existing resource group to provision the resources." | ||
| default = "Default" | ||
| } | ||
|
|
||
| variable "event_notifications_email_list" { | ||
| type = list(string) | ||
| description = "The list of email address to target out when an event is triggered" | ||
| default = [] | ||
| } | ||
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.