Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/data-sources/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Read-Only:
- `status` (String) Resource kind status (for example, "started", "stopped", etc).
- `topology` (Attributes List) Node topology element definition. (see [below for nested schema](#nestedatt--integrations_server--topology))
- `version` (String) Elastic stack version.
- `fleet_endpoint` (String) The endpoint for the Fleet server

<a id="nestedatt--integrations_server--topology"></a>
### Nested Schema for `integrations_server.topology`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ func flattenIntegrationsServerResources(ctx context.Context, in []*models.Integr
if res.Info.Metadata != nil {
model.HttpEndpoint, model.HttpsEndpoint = converters.ExtractEndpointsToTypes(res.Info.Metadata)
}

// Set the fleet endpoint if available
if res.Info.Metadata.ServicesUrls != nil {
for _, service := range res.Info.Metadata.ServicesUrls {
if service.Service != nil && *service.Service == "fleet" {
model.FleetEndpoint = types.StringValue(*service.URL)
}
}
}
}

result = append(result, model)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ func integrationsServerResourceInfoSchema() schema.Attribute {
Computed: true,
},
"topology": integrationsServerTopologySchema(),
"fleet_endpoint": schema.StringAttribute{
Description: "HTTPS endpoint for the fleet.",
Computed: true,
},
},
},
}
Expand Down Expand Up @@ -116,6 +120,7 @@ type integrationsServerResourceInfoModelV0 struct {
Status types.String `tfsdk:"status"`
Version types.String `tfsdk:"version"`
Topology types.List `tfsdk:"topology"` //< integrationsServerTopologyModelV0
FleetEndpoint types.String `tfsdk:"fleet_endpoint"`
}

type integrationsServerTopologyModelV0 struct {
Expand Down
Loading