Skip to content

Commit

Permalink
Merge pull request #175 from jfrog/migrate-xray-workerscount-resource
Browse files Browse the repository at this point in the history
Migrate xray_workers_count resource to Plugin Framework
  • Loading branch information
alexhung committed Apr 30, 2024
2 parents 609e035 + a2bc886 commit ae6a0e2
Show file tree
Hide file tree
Showing 7 changed files with 481 additions and 258 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 2.5.1 (April 29, 2024). Tested on Artifactory 7.77.10 and Xray 3.94.5
## 2.5.1 (April 30, 2024). Tested on Artifactory 7.77.10 and Xray 3.94.5

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

## 2.5.0 (March 29, 2024). Tested on Artifactory 7.77.8 and Xray 3.91.3

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0
github.com/hashicorp/terraform-plugin-testing v1.5.1
github.com/jfrog/terraform-provider-shared v1.24.0
github.com/samber/lo v1.39.0
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819
)

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA=
github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
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 @@ -162,6 +162,7 @@ func (p *XrayProvider) Configure(ctx context.Context, req provider.ConfigureRequ
func (p *XrayProvider) Resources(ctx context.Context) []func() resource.Resource {
return []func() resource.Resource{
xray_resource.NewSettingsResource,
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 @@ -54,7 +54,6 @@ func SdkV2() *schema.Provider {
"xray_operational_risk_policy": xray.ResourceXrayOperationalRiskPolicy(),
"xray_watch": xray.ResourceXrayWatch(),
"xray_ignore_rule": xray.ResourceXrayIgnoreRule(),
"xray_workers_count": xray.ResourceXrayWorkersCount(),
"xray_repository_config": xray.ResourceXrayRepositoryConfig(),
"xray_vulnerabilities_report": xray.ResourceXrayVulnerabilitiesReport(),
"xray_licenses_report": xray.ResourceXrayLicensesReport(),
Expand Down
Loading

0 comments on commit ae6a0e2

Please sign in to comment.