Skip to content

Commit

Permalink
Merge pull request #52 from jfrog/GH-51-license-check
Browse files Browse the repository at this point in the history
GH-51 fix license verification
  • Loading branch information
danielmkn authored May 24, 2022
2 parents 731a1fd + 535dd32 commit dd563d4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.1.4 (May 24, 2022). Tested on Artifactory 7.38.10 and Xray 3.49.0

BUG FIX:

* add 'Commercial' licence to the list of allowed licenses.
[GH-52](https://github.com/jfrog/terraform-provider-xray/pull/52)


## 1.1.3 (May 12, 2022). Tested on Artifactory 7.38.8 and Xray 3.48.2

* minor version bump to force release due to build failure
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/jfrog/terraform-provider-xray
require (
github.com/go-resty/resty/v2 v2.7.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.14.0
github.com/jfrog/terraform-provider-shared v0.5.0
github.com/jfrog/terraform-provider-shared v0.7.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/jfrog/terraform-provider-shared v0.5.0 h1:1TEHe3ZkLSNBcxcQ5Ba9X05WiXJpbScRR7eaeXW00CA=
github.com/jfrog/terraform-provider-shared v0.5.0/go.mod h1:2ueIlfizwfDAkL1jm3hmvYBqbMusQtHz33ZpDiPOyxA=
github.com/jfrog/terraform-provider-shared v0.7.0 h1:x8qLXyptP35KC1vLaqN2AWJC7/eMNZE2jabiBx07JSY=
github.com/jfrog/terraform-provider-shared v0.7.0/go.mod h1:2ueIlfizwfDAkL1jm3hmvYBqbMusQtHz33ZpDiPOyxA=
github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE=
github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74=
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck=
Expand Down
10 changes: 5 additions & 5 deletions pkg/xray/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import (

// Version for some reason isn't getting updated by the linker
var Version = "0.0.1"
var productId = "terraform-provider-xray/" + Version
var productId = "terraform-provider-xray/" + Version

// Provider Xray provider that supports configuration via username+password or a token
// Supported resources are policies and watches
func Provider() *schema.Provider {
p := &schema.Provider{
Schema: map[string]*schema.Schema{
"url": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"XRAY_URL", "JFROG_URL"}, "http://localhost:8081"),
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"XRAY_URL", "JFROG_URL"}, "http://localhost:8081"),
ValidateFunc: validation.IsURLWithHTTPorHTTPS,
Description: "URL of Artifactory. This can also be sourced from the `XRAY_URL` or `JFROG_URL` environment variable. Default to 'http://localhost:8081' if not set.",
},
Expand Down Expand Up @@ -78,7 +78,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData, terraformVer
return nil, diag.FromErr(err)
}

licenseErr := util.CheckArtifactoryLicense(restyBase)
licenseErr := util.CheckArtifactoryLicense(restyBase, "Enterprise", "Commercial")
if licenseErr != nil {
return nil, licenseErr
}
Expand Down

0 comments on commit dd563d4

Please sign in to comment.