feat(GKE): add sample for using GKE Managed OpenTelemetry#925
feat(GKE): add sample for using GKE Managed OpenTelemetry#925giuliano-sider wants to merge 1 commit intoterraform-google-modules:mainfrom
Conversation
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
| required_providers { | ||
| google-beta = { | ||
| source = "hashicorp/google-beta" | ||
| version = "~> 7.17.0" |
There was a problem hiding this comment.
Do we need to pessimistic pin to the patch, or is the minor version sufficient?
| version = "~> 7.17.0" | |
| version = "~> 7.17" |
There was a problem hiding this comment.
I actually meant to use a minimum version for the google-beta provider (fixed now).
|
/gcbrun |
|
/gcbrun |
apeabody
left a comment
There was a problem hiding this comment.
Thanks for the contribution @giuliano-sider!
Please complete the "Location" in the Checklist.
| before running the code snippet. | ||
| */ | ||
| # [START gke_standard_regional_with_managed_otel] | ||
| terraform { |
There was a problem hiding this comment.
There was a problem hiding this comment.
There's an exception for google-beta in https://googlecloudplatform.github.io/samples-style-guide/#language-specific; Ideally all new samples that require google-beta will have these requirements removed once the functionality moves to GA, but this format ensures it works today.
| } | ||
| } | ||
|
|
||
| output "otel-enabled" { |
There was a problem hiding this comment.
There was a problem hiding this comment.
The terraform and output blocks are encouraged by https://googlecloudplatform.github.io/samples-style-guide/. Should we clarify the different requirements in this repo mentioned in https://github.com/terraform-google-modules/terraform-docs-samples/blob/main/CONTRIBUTING.md#code-style?
There was a problem hiding this comment.
I added the GCP docs location for where to use this sample.
Should I just drop the terraform and output blocks then? I think they're useful, but if the repo style guide forbids them, I'll just edit them out.
There was a problem hiding this comment.
Per earlier comment, because this resource currently requires a minimum google-beta provider, keep that block.
I'm not sure what purpose the output block here has, other than confirming configuration success. If the output was a generated value that the user needed to gather for further operations, I could understand it's inclusion, but in this case, if the Terraform applies correctly, this doesn't need to be confirmed with the output block.
Description
This adds a Terraform config sample for enabling GKE Managed OpenTelemetry.
Checklist
Readiness
Style
guide
Testing
I have performed tests described in the Contributing guide:
terraform applyterraform fmtcheckIntended location
[ X ] Yes, this sample will be (or already is) included on cloud.google.com
Location(s): https://docs.cloud.google.com/kubernetes-engine/docs/how-to/managed-otel-gke
No, this sample won't be included on cloud.google.com
Reason:
API enablement
Review