From 36002c22a177b08d31dd6a558d991e6f91a7ae2c Mon Sep 17 00:00:00 2001 From: Rocktavious Date: Fri, 25 Oct 2024 07:40:32 -0500 Subject: [PATCH] Add missing webhook url field --- .../resource_opslevel_integration_endpoint.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/opslevel/resource_opslevel_integration_endpoint.go b/opslevel/resource_opslevel_integration_endpoint.go index e6ddf339..6e866baa 100644 --- a/opslevel/resource_opslevel_integration_endpoint.go +++ b/opslevel/resource_opslevel_integration_endpoint.go @@ -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), } } @@ -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, + }, }, } }