@@ -90,12 +90,12 @@ func CreateOrUpdateSCIMConfig(ctx context.Context, d *schema.ResourceData, meta
90
90
// Determine namespace based on whether this is on-prem or cloud
91
91
var namespace string
92
92
switch {
93
- case metaClient .GrafanaOrgID > 0 :
94
- // On-prem Grafana instance - use "default" namespace
95
- namespace = "default"
96
93
case metaClient .GrafanaStackID > 0 :
97
94
// Grafana Cloud instance - use "stacks-{stackId}" namespace
98
95
namespace = fmt .Sprintf ("stacks-%d" , metaClient .GrafanaStackID )
96
+ case metaClient .GrafanaOrgID > 0 :
97
+ // On-prem Grafana instance - use "default" namespace
98
+ namespace = "default"
99
99
default :
100
100
return diag .Errorf ("expected either Grafana org ID (for local Grafana) or Grafana stack ID (for Grafana Cloud) to be set" )
101
101
}
@@ -174,12 +174,12 @@ func ReadSCIMConfig(ctx context.Context, d *schema.ResourceData, meta interface{
174
174
// Determine namespace based on whether this is on-prem or cloud
175
175
var namespace string
176
176
switch {
177
- case metaClient .GrafanaOrgID > 0 :
178
- // On-prem Grafana instance - use "default" namespace
179
- namespace = "default"
180
177
case metaClient .GrafanaStackID > 0 :
181
178
// Grafana Cloud instance - use "stacks-{stackId}" namespace
182
179
namespace = fmt .Sprintf ("stacks-%d" , metaClient .GrafanaStackID )
180
+ case metaClient .GrafanaOrgID > 0 :
181
+ // On-prem Grafana instance - use "default" namespace
182
+ namespace = "default"
183
183
default :
184
184
return diag .Errorf ("expected either Grafana org ID (for local Grafana) or Grafana stack ID (for Grafana Cloud) to be set" )
185
185
}
@@ -255,12 +255,12 @@ func DeleteSCIMConfig(ctx context.Context, d *schema.ResourceData, meta interfac
255
255
// Determine namespace based on whether this is on-prem or cloud
256
256
var namespace string
257
257
switch {
258
- case metaClient .GrafanaOrgID > 0 :
259
- // On-prem Grafana instance - use "default" namespace
260
- namespace = "default"
261
258
case metaClient .GrafanaStackID > 0 :
262
259
// Grafana Cloud instance - use "stacks-{stackId}" namespace
263
260
namespace = fmt .Sprintf ("stacks-%d" , metaClient .GrafanaStackID )
261
+ case metaClient .GrafanaOrgID > 0 :
262
+ // On-prem Grafana instance - use "default" namespace
263
+ namespace = "default"
264
264
default :
265
265
return diag .Errorf ("expected either Grafana org ID (for local Grafana) or Grafana stack ID (for Grafana Cloud) to be set" )
266
266
}
0 commit comments