Skip to content

Commit

Permalink
Add missing webhook url field
Browse files Browse the repository at this point in the history
  • Loading branch information
rocktavious committed Oct 25, 2024
1 parent b25d4fc commit 36002c2
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions opslevel/resource_opslevel_integration_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ type IntegrationEndpointResource struct {

// IntegrationEndpointResourceModel describes the Integration Endpoint managed resource.
type IntegrationEndpointResourceModel struct {
Id types.String `tfsdk:"id"`
Name types.String `tfsdk:"name"`
Type types.String `tfsdk:"type"`
Id types.String `tfsdk:"id"`
Name types.String `tfsdk:"name"`
Type types.String `tfsdk:"type"`
WebhookURL types.String `tfsdk:"webhook_url"`
}

func NewIntegrationEndpointResourceModel(integrationEndpoint opslevel.Integration, givenModel IntegrationEndpointResourceModel) IntegrationEndpointResourceModel {
return IntegrationEndpointResourceModel{
Id: ComputedStringValue(string(integrationEndpoint.Id)),
Name: RequiredStringValue(integrationEndpoint.Name),
Type: RequiredStringValue(givenModel.Type.ValueString()),
Id: ComputedStringValue(string(integrationEndpoint.Id)),
Name: RequiredStringValue(integrationEndpoint.Name),
Type: RequiredStringValue(givenModel.Type.ValueString()),
WebhookURL: ComputedStringValue(*integrationEndpoint.WebhookURL),
}
}

Expand Down Expand Up @@ -79,6 +81,10 @@ func (r *IntegrationEndpointResource) Schema(ctx context.Context, req resource.S
stringplanmodifier.RequiresReplace(),
},
},
"webhook_url": schema.StringAttribute{
Description: "The endpoint to send events via webhook (if applicable).",
Computed: true,
},
},
}
}
Expand Down

0 comments on commit 36002c2

Please sign in to comment.