Skip to content

Commit

Permalink
Standerdise imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclegg committed Nov 28, 2022
1 parent 15cbf48 commit e685b27
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
jwk = {
version = "0.1.0"
source = "github.com/braybaut/jwk"
source = "mattclegg/jwk"
}
tls = {
source = "hashicorp/tls"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/provider/provider.go → jwk/provider.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package internal
package jwk

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down
5 changes: 2 additions & 3 deletions internal/provider/resource_jwk.go → jwk/resource_jwk.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package internal
package jwk

import (
"context"
"encoding/json"
"fmt"
"terraform-provider-jwk/internal/jwk"

"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
Expand Down Expand Up @@ -40,7 +39,7 @@ func createResourceJwk(ctx context.Context, d *schema.ResourceData, m interface{
keypair := d.Get("public_key_pem")
keypairstring := fmt.Sprintf("%v", keypair)

value, err := jwk.CreateJwk(keypairstring)
value, err := CreateJwk(keypairstring)
if err != nil {
return diag.Errorf("failed to create JWK document %s", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/structs.go → jwk/structs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package internal
package jwk

type jwkValues struct {
Keys []struct {
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"

internal "terraform-provider-jwk/internal/provider"
"terraform-provider-jwk/jwk"
)

func main() {
plugin.Serve(&plugin.ServeOpts{
ProviderFunc: func() *schema.Provider {
return internal.Provider()
return jwk.Provider()
},
})
}
6 changes: 6 additions & 0 deletions terraform-registry-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version": 1,
"metadata": {
"protocol_versions": ["5.0"]
}
}

0 comments on commit e685b27

Please sign in to comment.