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

Add docs for setting up cloud provider provider section #1816

Merged
merged 8 commits into from
Sep 30, 2024

Conversation

thepalbi
Copy link

@thepalbi thepalbi commented Sep 25, 2024

This PR adapts the docs generator template to include instructions on how to setup the Cloud Provider terraoform provider section. It instructs how to create the api token and correct hostname.

For setting up the hostname, the UI is super misleading as the cluserSlug is not shown but rather something like friendly names:

image

The easiest solution is call Grafana's API with the same token the user has to create, as follows:

➜  work curl -sH "Authorization: Bearer $(cat ~/work/personal-stack-token.txt)" "https://grafana.com/api/instances"|jq '[.items[]|{stackName: .slug, clusterName:.clusterSlug, cloudProviderAPIURL: "https://cloud-provider-api-\(.clusterSlug).grafana.net"}]'
[
  {
    "stackName": "herokublogpost",
    "clusterName": "prod-us-central-0",
    "cloudProviderAPIURL": "https://cloud-provider-api-prod-us-central-0.grafana.net"
  },
  {
    "stackName": "pablobalbitest",
    "clusterName": "prod-us-east-0",
    "cloudProviderAPIURL": "https://cloud-provider-api-prod-us-east-0.grafana.net"
  },
  {
    "stackName": "palbiuscentral2",
    "clusterName": "us-central2",
    "cloudProviderAPIURL": "https://cloud-provider-api-us-central2.grafana.net"
  }
]

Also, adjusts the examples so that they are the easiest possible to read.

Solves https://github.com/grafana/grafana-csp-app/issues/140

Copy link

In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically.
To do so, a Grafana Labs employee must trigger the cloud acceptance tests workflow manually.

@thepalbi thepalbi changed the base branch from main to tf-cloud-provider-aws-app September 26, 2024 08:38
@thepalbi thepalbi changed the title pablo/adapt docs generator Add docs for setting up cloud provider provider section Sep 26, 2024
@thepalbi thepalbi marked this pull request as ready for review September 26, 2024 08:39
@thepalbi thepalbi requested review from a team as code owners September 26, 2024 08:39
@tristanburgess tristanburgess removed the request for review from a team September 27, 2024 14:07
@thepalbi thepalbi merged commit 9f711d1 into tf-cloud-provider-aws-app Sep 30, 2024
26 checks passed
@thepalbi thepalbi deleted the pablo/adapt-docs-generator branch September 30, 2024 08:47
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