Skip to content

Conversation

@iamar7
Copy link
Member

@iamar7 iamar7 commented Mar 14, 2025

Description

Cloud Monitoring & Metrics Router code from the observabilities-instances repo has been moved here and examples for this module created.

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@iamar7 iamar7 changed the title migrate cloud monitoring from observability-instances [WIP] migrate cloud monitoring from observability-instances Mar 14, 2025
Copy link
Contributor

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Metrics routing should still be its own submodule. Otherwise we have no migration path for consumers migrating from old repo

@iamar7
Copy link
Member Author

iamar7 commented Mar 21, 2025

/run pipeline

@iamar7 iamar7 self-assigned this Mar 21, 2025
@iamar7
Copy link
Member Author

iamar7 commented Mar 21, 2025

/run pipeline

@iamar7
Copy link
Member Author

iamar7 commented Mar 24, 2025

Upgrade is failing which is expected
Screenshot 2025-03-24 at 2 42 14 PM

@iamar7
Copy link
Member Author

iamar7 commented Mar 24, 2025

/run pipeline

@iamar7 iamar7 changed the title [WIP] migrate cloud monitoring from observability-instances Migration of cloud monitoring from observability-instances Mar 24, 2025
@iamar7
Copy link
Member Author

iamar7 commented Mar 24, 2025

/run pipeline

@iamar7
Copy link
Member Author

iamar7 commented Mar 24, 2025

/run pipeline

@iamar7 iamar7 marked this pull request as draft March 25, 2025 06:47
Copy link
Contributor

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you ensure all modules and examples are at required_version = ">= 1.9.0"

@iamar7
Copy link
Member Author

iamar7 commented Mar 26, 2025

/run pipeline

@iamar7
Copy link
Member Author

iamar7 commented Mar 26, 2025

/run pipeline

@iamar7
Copy link
Member Author

iamar7 commented Apr 3, 2025

/run pipeline

@iamar7 iamar7 marked this pull request as ready for review April 4, 2025 00:17
Copy link
Contributor

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

README.md Outdated
Use real values instead of "var.<var_name>" or other placeholder values
unless real values don't help users know what to change.
-->
To provision cloud monitoring instance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the usage is showing metrics config too. I would suggest to just remove the sentence and use code comments in the example tf code itself to explain the usage

outputs.tf Outdated
# Outputs
########################################################################################################################
output "crn" {
value = length(ibm_resource_instance.cloud_monitoring) > 0 ? ibm_resource_instance.cloud_monitoring.id : null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove length function from all these inputs. there is no count around the instance creation.

id = string
})))
})
description = "Global settings for Metrics Routing"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention that in order to configure metrics routing, the account must have a primary_metadata_region value set

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps also mention the impact of setting private_api_endpoint_only to true (you are unable to see the settings in the UI)


# metric routing to cloud monitoring s2s auth policy
resource "ibm_iam_authorization_policy" "metrics_router_cloud_monitoring" {
for_each = { for target in var.metrics_router_targets : target.target_name => target if !target.skip_mrouter_sysdig_iam_auth_policy }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a boolean to skip auth policy creation if required, same way we have in all other modules

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip_mrouter_sysdig_iam_auth_policy is the boolean to skip auth policy creation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have renamed the variable to skip_metrics_router_auth_policy

##############################################################################

#
# Developer tips:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be removed its only needed in the initial template as a guide for developers creating a module example

variables.tf Outdated

variable "enable_platform_metrics" {
type = bool
description = "Receive platform metrics in the provisioned IBM Cloud Monitoring instance."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to mention that only 1 instance in a given region can be enabled for platform metrics.

##############################################################################
# IBM Cloud Metrics Routing
# - Cloud Monitoring target
# - Metrics Router route to the target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe explain more about the type of rule your creating in the example

@iamar7
Copy link
Member Author

iamar7 commented Apr 9, 2025

/run pipeline

backup_metadata_region = var.metrics_router_settings.backup_metadata_region
private_api_endpoint_only = var.metrics_router_settings.private_api_endpoint_only

# The create_before_destroy meta-argument makes sure that the new settings are applied first before the prior ones are removed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamar7 I don't understand this comment? These settings can only have 1 value at any given time. So I don't understand how create_before_destroy could work in this scenario?

@ocofaigh ocofaigh merged commit 4083979 into main Apr 9, 2025
2 checks passed
@ocofaigh ocofaigh deleted the 12594-cm branch April 9, 2025 12:15
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants