Skip to content

Expose RetryClient externally - #18

Open
erplsf wants to merge 1 commit into
grafana:mainfrom
klar-mx:pr/upstream-changes
Open

Expose RetryClient externally#18
erplsf wants to merge 1 commit into
grafana:mainfrom
klar-mx:pr/upstream-changes

Conversation

@erplsf

@erplsf erplsf commented May 9, 2024

Copy link
Copy Markdown

Greetings,

This is a bit far-reaching PR. We're using https://github.com/grafana/terraform-provider-grafana which uses this library for Grafana OnCall API.

  1. terraform-provider-grafana has an option called insecure_skip_verify which allows to use the provider when hosting Grafana on self-signed (/self-hosted) certificates.
  2. Unfortunately, I've recently discovered that the insecure_skip_verify option that is defined, used in parseTLSConfig method which is used only once for configuring main Grafana API client, which in turns mean that we cannot use the provider to connect to Grafana OnCall API with self-signed certificates.

As terraform-provider-grafana uses this library, the easy way to change that is to expose RetryableHTTP client field publicly, so users of this library (terraform-provider-grafana) can use the same parseTLSConfig and pass the appropriate TLS settings to underlying Go HTTP Client.

PR for terraform-provider-grafana will come after this change is merged. Here are the proposed changes (plus the dependency file changes for updating ref to this library) for terraform-provider-grafana: grafana/terraform-provider-grafana@main...klar-mx:terraform-provider-grafana:pr/upstream-changes

@CLAassistant

CLAassistant commented May 9, 2024

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@erplsf
erplsf marked this pull request as ready for review May 9, 2024 07:58
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