diff --git a/docs/data-sources/scaffolding_example.md b/docs/data-sources/scaffolding_example.md deleted file mode 100644 index 9f8f373..0000000 --- a/docs/data-sources/scaffolding_example.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "scaffolding_example Data Source - terraform-provider-scaffolding-framework" -subcategory: "" -description: |- - Example data source ---- - -# scaffolding_example (Data Source) - -Example data source - -## Example Usage - -```terraform -data "scaffolding_example" "example" { - configurable_attribute = "some-value" -} -``` - - -## Schema - -### Optional - -- `configurable_attribute` (String) Example configurable attribute - -### Read-Only - -- `id` (String) Example identifier - - diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 8eecef4..0000000 --- a/docs/index.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "scaffolding-framework Provider" -subcategory: "" -description: |- - ---- - -# scaffolding-framework Provider - - - -## Example Usage - -```terraform -provider "scaffolding" { - # example configuration here -} -``` - - -## Schema - -### Optional - -- `endpoint` (String) Example provider attribute diff --git a/docs/resources/scaffolding_example.md b/docs/resources/scaffolding_example.md deleted file mode 100644 index dc6ffb4..0000000 --- a/docs/resources/scaffolding_example.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "scaffolding_example Resource - terraform-provider-scaffolding-framework" -subcategory: "" -description: |- - Example resource ---- - -# scaffolding_example (Resource) - -Example resource - -## Example Usage - -```terraform -resource "scaffolding_example" "example" { - configurable_attribute = "some-value" -} -``` - - -## Schema - -### Optional - -- `configurable_attribute` (String) Example configurable attribute -- `defaulted` (String) Example configurable attribute with default value - -### Read-Only - -- `id` (String) Example identifier - - diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 7289f69..c20ae27 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -12,28 +12,28 @@ import ( ForgeClient "github.com/madewithlove/forge-go-sdk" ) -// Ensure LaravelForgeProvider satisfies various provider interfaces. -var _ provider.Provider = &LaravelForgeProvider{} +// Ensure ForgeProvider satisfies various provider interfaces. +var _ provider.Provider = &ForgeProvider{} -// LaravelForgeProvider defines the provider implementation. -type LaravelForgeProvider struct { +// ForgeProvider defines the provider implementation. +type ForgeProvider struct { // version is set to the provider version on release, "dev" when the // provider is built and ran locally, and "test" when running acceptance // testing. version string } -// LaravelForgeProviderModel describes the provider data model. -type LaravelForgeProviderModel struct { +// ForgeProviderModel describes the provider data model. +type ForgeProviderModel struct { Token types.String `tfsdk:"token"` } -func (p *LaravelForgeProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) { +func (p *ForgeProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) { resp.TypeName = "forge" resp.Version = p.version } -func (p *LaravelForgeProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) { +func (p *ForgeProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) { resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{ "token": schema.StringAttribute{ @@ -44,8 +44,8 @@ func (p *LaravelForgeProvider) Schema(ctx context.Context, req provider.SchemaRe } } -func (p *LaravelForgeProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) { - var data LaravelForgeProviderModel +func (p *ForgeProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) { + var data ForgeProviderModel apiToken := os.Getenv("FORGE_API_TOKEN") @@ -77,13 +77,13 @@ func (p *LaravelForgeProvider) Configure(ctx context.Context, req provider.Confi resp.ResourceData = client } -func (p *LaravelForgeProvider) Resources(ctx context.Context) []func() resource.Resource { +func (p *ForgeProvider) Resources(ctx context.Context) []func() resource.Resource { return []func() resource.Resource{ NewResourceServer, } } -func (p *LaravelForgeProvider) DataSources(ctx context.Context) []func() datasource.DataSource { +func (p *ForgeProvider) DataSources(ctx context.Context) []func() datasource.DataSource { return []func() datasource.DataSource{ NewDaemonDataSource, } @@ -91,7 +91,7 @@ func (p *LaravelForgeProvider) DataSources(ctx context.Context) []func() datasou func New(version string) func() provider.Provider { return func() provider.Provider { - return &LaravelForgeProvider{ + return &ForgeProvider{ version: version, } } diff --git a/main.go b/main.go index 2e70415..e99fea2 100644 --- a/main.go +++ b/main.go @@ -35,7 +35,7 @@ func main() { flag.Parse() opts := providerserver.ServeOpts{ - Address: "registry.terraform.io/madewithlove/terraform-provider-forge", + Address: "registry.terraform.io/madewithlove/forge", Debug: debug, }