Skip to content

Commit

Permalink
Add webhook type check for deprecated resource
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhung committed Sep 30, 2024
1 parent 6bcfc59 commit 10e0313
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ func ResourceArtifactoryCustomWebhook(webhookType string) *schema.Resource {
Description: "Provides an Artifactory webhook resource",
}

if webhookType == "artifactory_release_bundle" {
if webhookType == ReleaseBundleDomain {
rs.DeprecationMessage = "This resource is being deprecated and replaced by artifactory_destination_custom_webhook resource"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ func (r *ReleaseBundleWebhookResource) Schema(ctx context.Context, req resource.
}

resp.Schema = r.schema(r.Domain, &criteriaBlock)
if r.Domain == ReleaseBundleDomain {
resp.Schema.DeprecationMessage = "This resource is being deprecated and replaced by artifactory_destination_webhook resource"
}
}

func (r *ReleaseBundleWebhookResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {
Expand Down

0 comments on commit 10e0313

Please sign in to comment.