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, + }, }, } }