Skip to content

Conversation

pmdz
Copy link
Contributor

@pmdz pmdz commented Jul 22, 2025

Implement allowed load zones management for k6 projects.
Relevant k6 public API docs: link

  1. Add grafana_k6_project_allowed_load_zones resource
  2. Add grafana_k6_project_allowed_load_zones data source

Issue: https://github.com/grafana/k6-cloud/issues/3512

@CLAassistant
Copy link

CLAassistant commented Jul 22, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

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.

@pmdz pmdz changed the title k6 allowed load zones schema / notes Update k6 project resource - add allowed_load_zones Jul 22, 2025
@pmdz pmdz force-pushed the k6-project-allowed-load-zones branch from abfb442 to d1689d8 Compare July 25, 2025 09:41
@pmdz pmdz requested review from fornfrey and joanlopez August 4, 2025 19:26
@pmdz pmdz marked this pull request as ready for review August 4, 2025 19:29
@pmdz pmdz requested review from a team as code owners August 4, 2025 19:29
@pmdz pmdz requested review from federicotdn and yorugac and removed request for a team August 4, 2025 19:29
Copy link
Contributor

@fornfrey fornfrey left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR! I left a couple of suggestions regarding state management. Let me know if you have any questions or need help.

Comment on lines 56 to 57
"allowed_load_zones": schema.ListAttribute{
Description: "List of allowed k6 load zone IDs for this project.",
Copy link

Choose a reason for hiding this comment

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

Suggested change
"allowed_load_zones": schema.ListAttribute{
Description: "List of allowed k6 load zone IDs for this project.",
"allowed_load_zones": schema.ListAttribute{
Description: "List of allowed k6 private load zones (names) for this project.",

I've wondered about the naming here: this object is supposed to be only for configuring private LZs, in reality. AFAIK, this is not going to change in the future either.
Changing the allowed_load_zones to allowed_private_load_zones seems a bit too verbose ATM, but perhaps, at least the description could contain clarification?
cc @pmdz @fornfrey

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've tweaked the description a little bit in b239626

This are not names btw., we're referencing the IDs here
image

Copy link

Choose a reason for hiding this comment

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

Thanks, Pawel!
From user's perspective, this can be confusing actually, because it's a name in Kubernetes resource. But in UI, we call it "ID" 😄 But you're right that this is a frontend level problem: I've brought it up before in the Slack too.
cc @dgzlopes for visibility: just in case, we should change this everywhere.

@pmdz pmdz changed the title Update k6 project resource - add allowed_load_zones Add grafana_k6_project_allowed_load_zones resource / data source Aug 5, 2025
Copy link
Contributor

@fornfrey fornfrey left a comment

Choose a reason for hiding this comment

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

Well done! LGTM

@pmdz pmdz merged commit dd06529 into main Aug 7, 2025
69 of 71 checks passed
@pmdz pmdz deleted the k6-project-allowed-load-zones branch August 7, 2025 09:42
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.

4 participants