Skip to content

Commit

Permalink
Migrate user custom webhook resource to Plugin Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhung committed Oct 1, 2024
1 parent c4ed3b4 commit 08f5600
Show file tree
Hide file tree
Showing 8 changed files with 304 additions and 776 deletions.
1 change: 1 addition & 0 deletions pkg/artifactory/provider/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ func (p *ArtifactoryProvider) Resources(ctx context.Context) []func() resource.R
webhook.NewReleaseBundleV2PromotionWebhookResource,
webhook.NewReleaseBundleV2PromotionCustomWebhookResource,
webhook.NewUserWebhookResource,
webhook.NewUserCustomWebhookResource,
}
}

Expand Down
6 changes: 0 additions & 6 deletions pkg/artifactory/provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/jfrog/terraform-provider-artifactory/v12/pkg/artifactory/resource/repository/remote"
"github.com/jfrog/terraform-provider-artifactory/v12/pkg/artifactory/resource/repository/virtual"
"github.com/jfrog/terraform-provider-artifactory/v12/pkg/artifactory/resource/security"
"github.com/jfrog/terraform-provider-artifactory/v12/pkg/artifactory/resource/webhook"
utilsdk "github.com/jfrog/terraform-provider-shared/util/sdk"
)

Expand Down Expand Up @@ -124,10 +123,5 @@ func resourcesMap() map[string]*schema.Resource {
resourcesMap[federatedResourceName] = federated.ResourceArtifactoryFederatedGenericRepository(repoType)
}

for _, webhookType := range webhook.DomainSupported {
webhookCustomResourceName := fmt.Sprintf("artifactory_%s_custom_webhook", webhookType)
resourcesMap[webhookCustomResourceName] = webhook.ResourceArtifactoryCustomWebhook(webhookType)
}

return utilsdk.AddTelemetry(productId, resourcesMap)
}
Loading

0 comments on commit 08f5600

Please sign in to comment.