-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5933998
commit bb7daa0
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP | ||
|
||
package constants | ||
|
||
const ( | ||
ProviderType = "hpegl" | ||
ProviderBlock = "pc" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP | ||
|
||
package provider | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/HewlettPackard/hpegl-pcbe-terraform-resources/internal/constants" | ||
"github.com/hashicorp/terraform-plugin-framework/datasource" | ||
"github.com/hashicorp/terraform-plugin-framework/provider" | ||
"github.com/hashicorp/terraform-plugin-framework/resource" | ||
) | ||
|
||
var ( | ||
_ provider.Provider = &pcbeProvider{} | ||
) | ||
|
||
func New(version string) func() provider.Provider { | ||
return func() provider.Provider { | ||
return &pcbeProvider{ | ||
version: version, | ||
} | ||
} | ||
} | ||
|
||
type pcbeProviderModel struct { | ||
} | ||
|
||
type pcbeProvider struct { | ||
version string | ||
} | ||
|
||
func (p *pcbeProvider) Metadata( | ||
_ context.Context, | ||
_ provider.MetadataRequest, | ||
resp *provider.MetadataResponse, | ||
) { | ||
resp.TypeName = constants.ProviderType + "_" + constants.ProviderBlock | ||
resp.Version = p.version | ||
} | ||
|
||
func (p *pcbeProvider) Schema( | ||
_ context.Context, | ||
_ provider.SchemaRequest, | ||
resp *provider.SchemaResponse, | ||
) { | ||
} | ||
|
||
func (p *pcbeProvider) Configure( | ||
ctx context.Context, | ||
req provider.ConfigureRequest, | ||
resp *provider.ConfigureResponse, | ||
) { | ||
} | ||
|
||
// DataSources defines the data sources implemented in the provider. | ||
func (p *pcbeProvider) DataSources( | ||
_ context.Context, | ||
) []func() datasource.DataSource { | ||
return []func() datasource.DataSource{} | ||
} | ||
|
||
// Resources defines the resources implemented in the provider. | ||
func (p *pcbeProvider) Resources( | ||
_ context.Context, | ||
) []func() resource.Resource { | ||
return []func() resource.Resource{} | ||
} |