This commit is contained in:
Shreyas Goenka 2024-10-16 13:36:55 +02:00
parent 701b1786a8
commit 810da66809
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 3 additions and 2 deletions

View File

@ -208,7 +208,7 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
// We only have to check for ${resources.schemas...} references because any // We only have to check for ${resources.schemas...} references because any
// other valid reference (like ${var.foo}) would have been interpolated by this point. // other valid reference (like ${var.foo}) would have been interpolated by this point.
if p, ok := dynvar.PureReferenceToPath(v.SchemaName); ok && p.HasPrefix(dyn.Path{dyn.Key("resources"), dyn.Key("schemas")}) { if p, ok := dynvar.PureReferenceToPath(v.SchemaName); ok && p.HasPrefix(dyn.Path{dyn.Key("resources"), dyn.Key("schemas")}) {
log.Debugf(ctx, "Skipping prefix for volume %s because schema name %s is defined in the bundle and will be interpolated at runtime", v.Name, v.SchemaName) log.Debugf(ctx, "Skipping prefix for volume %s because schema %s is defined in the bundle and the schema name will be interpolated at runtime", v.Name, v.SchemaName)
continue continue
} }

View File

@ -1110,7 +1110,8 @@ func TestTerraformToBundleModifiedResources(t *testing.T) {
{Attributes: stateInstanceAttributes{ID: "2"}}, {Attributes: stateInstanceAttributes{ID: "2"}},
}, },
}, },
{Type: "databricks_cluster", {
Type: "databricks_cluster",
Mode: "managed", Mode: "managed",
Name: "test_cluster_old", Name: "test_cluster_old",
Instances: []stateResourceInstance{ Instances: []stateResourceInstance{