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

fix/1305 logging and monitoring config #1328

Closed
wants to merge 1 commit into from

Conversation

rwong2888
Copy link
Contributor

fix 1305

@rwong2888 rwong2888 requested review from a team, Jberlinsky and bharathkkb as code owners July 20, 2022 15:00
@google-cla
Copy link

google-cla bot commented Jul 20, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@comment-bot-dev
Copy link

@rwong2888
Thanks for the PR! 🚀
✅ Lint checks have passed.

@rwong2888
Copy link
Contributor Author

@Jberlinsky , @bharathkkb mind taking a look at this?

Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @rwong2888

Comment on lines +125 to +126
# only one of logging/monitoring_service or logging/monitoring_config can be specified
logging_service = local.logmon_config_is_set ? null : var.logging_service
Copy link
Member

Choose a reason for hiding this comment

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

We already have this in

# only one of logging/monitoring_service or logging/monitoring_config can be specified
logging_service = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? null : var.logging_service
dynamic "logging_config" {
for_each = length(var.logging_enabled_components) > 0 ? [1] : []
content {
enable_components = var.logging_enabled_components
}
}
monitoring_service = local.cluster_telemetry_type_is_set || local.logmon_config_is_set ? null : var.monitoring_service
dynamic "monitoring_config" {
for_each = length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus ? [1] : []
content {
enable_components = length(var.monitoring_enabled_components) > 0 ? var.monitoring_enabled_components : null
dynamic "managed_prometheus" {
for_each = var.monitoring_enable_managed_prometheus ? [1] : []
content {
enabled = var.monitoring_enable_managed_prometheus
}
}
}
}

We should just change the conditional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure about "cluster_telemetry_type_is_set", "managed_prometheus", and "monitoring_enable_managed_prometheus" as I was primarily looking for "logging_config", but I can revise the PR to include those as well if you think they are ready to promote out of beta @bharathkkb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bharathkkb, cluster_telemetry and managed_prometheus are still in beta as per below, so it does not look possible to simply modify the conditional. Please advise.
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster

Copy link
Member

Choose a reason for hiding this comment

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

@rwong2888 Can we try doing it inline and guard the dynamic block for managed_prometheus with a conditional. Similarly for the local.cluster_telemetry_type_is_set || local.logmon_config_is_set conditional.

@github-actions
Copy link

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Sep 27, 2022
@github-actions github-actions bot closed this Oct 5, 2022
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.

cloud logging/monitoring for non-beta submodules
3 participants