Skip to content

Commit

Permalink
[datadog_webhook] fix import (#2742)
Browse files Browse the repository at this point in the history
* handle null name

* bump tofu (#2743)

* bump tofu

* use sha

* tofu_version

* remove comment
  • Loading branch information
amaskara-dd authored Dec 26, 2024
1 parent 8bd2148 commit 1662048
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions datadog/fwprovider/resource_datadog_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func (r *webhookResource) Read(ctx context.Context, request resource.ReadRequest
}

id := state.Name.ValueString()
// handle import case
if state.Name.IsNull() {
id = state.ID.ValueString()
}

resp, httpResp, err := r.Api.GetWebhooksIntegration(r.Auth, id)

if err != nil {
Expand Down

0 comments on commit 1662048

Please sign in to comment.