Skip to content

Commit

Permalink
Merge pull request #207 from jfrog/migrate-custom-issue-to-framework
Browse files Browse the repository at this point in the history
Migrate xray_custom_issue resource to Plugin Framework
  • Loading branch information
alexhung authored Jun 20, 2024
2 parents 5a2c465 + 6896be8 commit e3c6a8c
Show file tree
Hide file tree
Showing 9 changed files with 644 additions and 487 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.8.2 (June 19, 2024). Tested on Artifactory 7.84.15 and Xray 3.96.1 with Terraform 1.8.5 and OpenTofu 1.7.2

* resource/xray_custom_issue: Migrate from SDKv2 to Plugin Framework. PR: [#207](https://github.com/jfrog/terraform-provider-xray/pull/207)

## 2.8.1 (June 14, 2024). Tested on Artifactory 7.84.14 and Xray 3.96.1 with Terraform 1.8.5 and OpenTofu 1.7.2

BUG FIXES:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/hashicorp/terraform-plugin-mux v0.16.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
github.com/hashicorp/terraform-plugin-testing v1.8.0
github.com/jfrog/terraform-provider-shared v1.25.4
github.com/jfrog/terraform-provider-shared v1.25.5
github.com/samber/lo v1.39.0
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819
golang.org/x/text v0.16.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM=
github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
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/jfrog/terraform-provider-shared v1.25.4 h1:+rx+/7dbJPNzdGs5rNIHtHvN+9TlbHuqGr+/idW2ozw=
github.com/jfrog/terraform-provider-shared v1.25.4/go.mod h1:QthwPRUALElMt2RTGqoeB/3Vztx626YPBzIAoqEp0w0=
github.com/jfrog/terraform-provider-shared v1.25.5 h1:+hal/9yDAIt2mZljDR8Ymie28yAHr8CAkfthwQ3O3bM=
github.com/jfrog/terraform-provider-shared v1.25.5/go.mod h1:QthwPRUALElMt2RTGqoeB/3Vztx626YPBzIAoqEp0w0=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
Expand Down
1 change: 1 addition & 0 deletions pkg/xray/provider/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func (p *XrayProvider) Resources(ctx context.Context) []func() resource.Resource
return []func() resource.Resource{
xray_resource.NewBinaryManagerReposResource,
xray_resource.NewBinaryManagerBuildsResource,
xray_resource.NewCustomIssueResource,
xray_resource.NewSettingsResource,
xray_resource.NewWebhookResource,
xray_resource.NewWorkersCountResource,
Expand Down
1 change: 0 additions & 1 deletion pkg/xray/provider/sdkv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func SdkV2() *schema.Provider {
"xray_licenses_report": xray.ResourceXrayLicensesReport(),
"xray_violations_report": xray.ResourceXrayViolationsReport(),
"xray_operational_risks_report": xray.ResourceXrayOperationalRisksReport(),
"xray_custom_issue": xray.ResourceXrayCustomIssue(),
},
),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/xray/resource/resource_xray_binary_manager_builds.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

const BinaryManagerBuildsEndpoint = "xray/api/v1/binMgr/{id}/builds"

var _ resource.Resource = &WebhookResource{}
var _ resource.Resource = &BinaryManagerBuildsResource{}

func NewBinaryManagerBuildsResource() resource.Resource {
return &BinaryManagerBuildsResource{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/xray/resource/resource_xray_binary_manager_repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

const BinaryManagerReposEndpoint = "xray/api/v1/binMgr/{id}/repos"

var _ resource.Resource = &WebhookResource{}
var _ resource.Resource = &BinaryManagerReposResource{}

func NewBinaryManagerReposResource() resource.Resource {
return &BinaryManagerReposResource{}
Expand Down
Loading

0 comments on commit e3c6a8c

Please sign in to comment.