Skip to content

Commit

Permalink
refactor: change 'terraform' to 'internal/provider'
Browse files Browse the repository at this point in the history
I would like to follow folder structure of
https://github.com/hashicorp/terraform-provider-scaffolding
  • Loading branch information
zdenko.vrabel committed May 16, 2021
1 parent 6335018 commit 4c102c9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package terraform
package provider

// converting array of unknown types into array
// of strings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package terraform
package provider

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions terraform/provider.go → internal/provider/provider.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package terraform
package provider

import (
"context"
Expand All @@ -9,7 +9,7 @@ import (
)

// This is provider's 'main' entry point.
func StatusflareProvider(version string) *schema.Provider {
func New(version string) *schema.Provider {

configFields := map[string]*schema.Schema{
"account_id": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package terraform
package provider

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
"github.com/statusflare/terraform-provider-statusflare/terraform"
"github.com/statusflare/terraform-provider-statusflare/internal/provider"
)

var (
Expand All @@ -28,7 +28,7 @@ func main() {

opts := &plugin.ServeOpts{
ProviderFunc: func() *schema.Provider {
return terraform.StatusflareProvider(version)
return provider.New(version)
},
}

Expand Down

0 comments on commit 4c102c9

Please sign in to comment.