Skip to content

Conversation

alexander-akhmetov
Copy link
Contributor

@alexander-akhmetov alexander-akhmetov commented Sep 5, 2025

Adding a computed ID field to the app platform base Resource model. This field is required with by the current testing framework version for acceptance tests.

The field is computed and should not result in a plan change. Tested locally:

  1. Created a new grafana_apps_playlist_playlist_v0alpha1 resource
  2. Applied it with the old provider version and checked the state: no id field
terraform state show 'grafana_apps_playlist_playlist_v0alpha1.test_playlist'

# grafana_apps_playlist_playlist_v0alpha1.test_playlist:
resource "grafana_apps_playlist_playlist_v0alpha1" "test_playlist" {
    metadata {
        uid     = "tf_test_playlist"
        uuid    = "D2tQoZxmFNLHZ55sHDzaooxGV97VxtexXNl9nDE2E8sX"
        version = "1757057965719"
    }
    options {
        overwrite = true
    }
    spec {
        interval = "1h"
        items    = [
            {
                type  = "dashboard_by_uid"
                value = "ed155665"
            },
        ]
        title    = "[tf] Test Playlist"
    }
}
  1. Updated the provider version and ran the plan again:
terraform plan

...
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Copy link
Contributor

github-actions bot commented Sep 5, 2025

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.

@alexander-akhmetov alexander-akhmetov force-pushed the alexander-akhmetov/resource-id-field branch from 893c802 to 7d86b31 Compare September 5, 2025 08:08
@alexander-akhmetov alexander-akhmetov marked this pull request as ready for review September 5, 2025 08:19
@alexander-akhmetov alexander-akhmetov requested review from a team as code owners September 5, 2025 08:19
@alexander-akhmetov alexander-akhmetov requested review from ferruvich, stephaniehingtgen and radiohead and removed request for a team September 5, 2025 08:19
Copy link
Contributor

@radiohead radiohead left a comment

Choose a reason for hiding this comment

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

Looks great! Just a small note about using UUID instead of UID.

@radiohead radiohead merged commit a268948 into main Sep 5, 2025
31 checks passed
@radiohead radiohead deleted the alexander-akhmetov/resource-id-field branch September 5, 2025 11:16
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