From d7b4e712dffa631adc54fb3dd6805745df471de8 Mon Sep 17 00:00:00 2001 From: Jeroen Soeters Date: Sat, 18 Apr 2026 14:39:04 -0700 Subject: [PATCH 1/2] feat: populate LabelConfig with resource-specific label queries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most OCI resources expose a human-readable name via DisplayName — set that as the default. Compartment, Policy, Cluster, NodePool, and Bucket use Name instead, so override those. Without this, discovered resources fall back to their OCID as the label, which is opaque. --- oci.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/oci.go b/oci.go index 307c2ae..f999842 100644 --- a/oci.go +++ b/oci.go @@ -42,7 +42,16 @@ func (p *Plugin) DiscoveryFilters() []model.MatchFilter { } func (p *Plugin) LabelConfig() model.LabelConfig { - return model.LabelConfig{} + return model.LabelConfig{ + DefaultQuery: "$.DisplayName", + ResourceOverrides: map[string]string{ + "OCI::Identity::Compartment": "$.Name", + "OCI::Identity::Policy": "$.Name", + "OCI::ContainerEngine::Cluster": "$.Name", + "OCI::ContainerEngine::NodePool": "$.Name", + "OCI::ObjectStorage::Bucket": "$.Name", + }, + } } func (p *Plugin) Create(ctx context.Context, request *resource.CreateRequest) (*resource.CreateResult, error) { From d3b734d8b33d7457a15e6d83a0b6c386d9d8b97b Mon Sep 17 00:00:00 2001 From: Jeroen Soeters Date: Sat, 18 Apr 2026 14:53:12 -0700 Subject: [PATCH 2/2] chore: bump version to 0.1.3 --- examples/PklProject | 2 +- formae-plugin.pkl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/PklProject b/examples/PklProject index 6badb7a..9c4eb07 100644 --- a/examples/PklProject +++ b/examples/PklProject @@ -5,6 +5,6 @@ dependencies { uri = "package://hub.platform.engineering/plugins/pkl/schema/pkl/formae/formae@0.84.0" } ["oci"] { - uri = "package://hub.platform.engineering/plugins/oci/schema/pkl/oci/oci@0.1.2" + uri = "package://hub.platform.engineering/plugins/oci/schema/pkl/oci/oci@0.1.3" } } diff --git a/formae-plugin.pkl b/formae-plugin.pkl index d7ed0bd..857e962 100644 --- a/formae-plugin.pkl +++ b/formae-plugin.pkl @@ -5,7 +5,7 @@ */ name = "oci" -version = "0.1.2" +version = "0.1.3" namespace = "OCI" description = "Oracle Cloud Infrastructure resource plugin for Formae" license = "FSL-1.1-ALv2"