Skip to content

Commit

Permalink
Merge pull request #348 from ulucinar/old-sdk
Browse files Browse the repository at this point in the history
Remove Resource.SchemaFunc references for compatibility with the older Terraform Plugin SDK versions
  • Loading branch information
ulucinar authored Feb 16, 2024
2 parents af53160 + 874266d commit cf9c9ad
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pkg/config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,9 @@ func NewProvider(schema []byte, prefix string, modulePath string, metadata []byt
}
terraformResource = p.TerraformProvider.ResourcesMap[name]
if terraformResource.Schema == nil {
if terraformResource.SchemaFunc == nil {
p.skippedResourceNames = append(p.skippedResourceNames, name)
fmt.Printf("Skipping resource %s because it has no schema and no schema function\n", name)
continue
}
terraformResource.Schema = terraformResource.SchemaFunc()
p.skippedResourceNames = append(p.skippedResourceNames, name)
fmt.Printf("Skipping resource %s because it has no schema\n", name)
continue
}
}

Expand Down

0 comments on commit cf9c9ad

Please sign in to comment.