Skip to content
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

feat: Add support to Observability DA to create EN destination, topic… #181

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jor2
Copy link
Member

@jor2 jor2 commented Oct 10, 2024

Description

#179

Release required?

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

Add support to Observability DA to create EN destination, topic and subscription for Cloud Logs

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.

@jor2 jor2 self-assigned this Oct 10, 2024
@jor2
Copy link
Member Author

jor2 commented Oct 10, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Oct 10, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Oct 10, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Oct 14, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Oct 14, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Oct 14, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Oct 14, 2024

/run pipeline

2 similar comments
@jor2
Copy link
Member Author

jor2 commented Oct 14, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Oct 15, 2024

/run pipeline

@@ -119,12 +119,17 @@ locals {
parsed_log_metrics_bucket_name = var.existing_cloud_logs_metrics_bucket_crn != null ? split(":", var.existing_cloud_logs_metrics_bucket_crn) : []
existing_cloud_log_metrics_bucket_name = length(local.parsed_log_metrics_bucket_name) > 0 ? local.parsed_log_metrics_bucket_name[1] : null

# Event Notifications
parsed_existing_en_instance_crn = var.existing_en_instance_crn != null ? split(":", var.existing_en_instance_crn) : []
existing_en_guid = length(local.parsed_existing_en_instance_crn) > 0 ? local.parsed_existing_en_instance_crn[7] : null
Copy link
Member

Choose a reason for hiding this comment

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

We can use the crn_parser module to do this like here

}

resource "ibm_en_topic" "en_topic" {
count = var.existing_en_instance_crn != null && var.cloud_logs_provision == true ? 1 : 0
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
count = var.existing_en_instance_crn != null && var.cloud_logs_provision == true ? 1 : 0
count = var.existing_en_instance_crn != null && var.cloud_logs_provision ? 1 : 0

}

resource "ibm_en_subscription_email" "email_subscription" {
count = var.existing_en_instance_crn != null && var.cloud_logs_provision == null && length(var.cloud_logs_en_email_list) > 0 ? 1 : 0
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
count = var.existing_en_instance_crn != null && var.cloud_logs_provision == null && length(var.cloud_logs_en_email_list) > 0 ? 1 : 0
count = var.existing_en_instance_crn != null && var.cloud_logs_provision && length(var.cloud_logs_en_email_list) > 0 ? 1 : 0

@jor2
Copy link
Member Author

jor2 commented Nov 27, 2024

/run pipeline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants