diff --git a/examples/main.tf b/examples/main.tf index 3a5c194..ae7f656 100644 --- a/examples/main.tf +++ b/examples/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { jwk = { version = "0.1.0" - source = "github.com/braybaut/jwk" + source = "mattclegg/jwk" } tls = { source = "hashicorp/tls" diff --git a/internal/jwk/jwk.go b/jwk/jwk.go similarity index 100% rename from internal/jwk/jwk.go rename to jwk/jwk.go diff --git a/internal/provider/provider.go b/jwk/provider.go similarity index 92% rename from internal/provider/provider.go rename to jwk/provider.go index 154a9c6..ced9b88 100644 --- a/internal/provider/provider.go +++ b/jwk/provider.go @@ -1,4 +1,4 @@ -package internal +package jwk import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/internal/provider/resource_jwk.go b/jwk/resource_jwk.go similarity index 94% rename from internal/provider/resource_jwk.go rename to jwk/resource_jwk.go index 7cceb4d..798ac63 100644 --- a/internal/provider/resource_jwk.go +++ b/jwk/resource_jwk.go @@ -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" @@ -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) } diff --git a/internal/provider/structs.go b/jwk/structs.go similarity index 92% rename from internal/provider/structs.go rename to jwk/structs.go index 56b1f76..025d404 100644 --- a/internal/provider/structs.go +++ b/jwk/structs.go @@ -1,4 +1,4 @@ -package internal +package jwk type jwkValues struct { Keys []struct { diff --git a/main.go b/main.go index 95edd8c..f1836db 100644 --- a/main.go +++ b/main.go @@ -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() }, }) } diff --git a/terraform-registry-manifest.json b/terraform-registry-manifest.json new file mode 100644 index 0000000..1931b0e --- /dev/null +++ b/terraform-registry-manifest.json @@ -0,0 +1,6 @@ +{ + "version": 1, + "metadata": { + "protocol_versions": ["5.0"] + } +}