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

Config Generation: Set a preferred field for resource names #1759

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

julienduchesne
Copy link
Member

Part of #1745

SM and OnCall resources are covered in this PR. For these, the user configures a unique "name" but what is used as the resource ID is a unique database numerical ID

For the user's purposes, it's better to use the given "name" as the resource name. The numerical ID then remains internal, as it should

Example

This:

resource "grafana_synthetic_monitoring_check" "_12345" {
  job                = "testname"
  ...
}

Becomes

resource "grafana_synthetic_monitoring_check" "testname" {
  job                = "testname"
  ...
}

Part of #1745

SM and OnCall resources are covered in this PR. For these, the user configures a unique "name" but what is used as the resource ID is a unique database numerical ID

For the user's purposes, it's better to use the given "name" as the resource name. The numerical ID then remains internal, as it should
@julienduchesne julienduchesne requested review from a team as code owners August 8, 2024 02:13
@julienduchesne julienduchesne requested review from peterschretlen and The-9880 and removed request for a team August 8, 2024 02:13
Copy link

github-actions bot commented Aug 8, 2024

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.

@julienduchesne julienduchesne merged commit cd47547 into main Aug 8, 2024
26 checks passed
@julienduchesne julienduchesne deleted the julienduchesne/better-resource-names-part-1 branch August 8, 2024 12:50
julienduchesne added a commit that referenced this pull request Aug 9, 2024
Follow-up to #1759
Added the resources that were missing + a safety so that all characters are allowed in the resource names
Closes #1745
julienduchesne added a commit that referenced this pull request Aug 26, 2024
Follow-up to #1759
Added the resources that were missing + a safety so that all characters are allowed in the resource names
Closes #1745
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