Skip to content

Commit 2aa87db

Browse files
Copilotnick-benoit
andcommitted
Remove version field from exception_list as it's not in API response
Co-authored-by: nick-benoit <[email protected]>
1 parent 2d7850b commit 2aa87db

File tree

4 files changed

+0
-15
lines changed

4 files changed

+0
-15
lines changed

docs/resources/kibana_security_exception_list.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,3 @@ resource "elasticstack_kibana_security_exception_list" "endpoint" {
9595
- `tie_breaker_id` (String) Field used in search to ensure all containers are sorted and returned correctly.
9696
- `updated_at` (String) The timestamp of when the exception list was last updated.
9797
- `updated_by` (String) The user who last updated the exception list.
98-
- `version` (Number) The version of the exception list.

internal/kibana/security/exception_list/create.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,6 @@ func (r *ExceptionListResource) updateStateFromAPIResponse(ctx context.Context,
137137
model.Immutable = types.BoolValue(apiResp.Immutable)
138138
model.TieBreakerID = types.StringValue(apiResp.TieBreakerId)
139139

140-
// Set version if present
141-
if apiResp.UnderscoreVersion != nil {
142-
// Parse version string to int64
143-
var version int64
144-
model.Version = types.Int64Value(version)
145-
} else {
146-
model.Version = types.Int64Null()
147-
}
148-
149140
// Set optional os_types
150141
if apiResp.OsTypes != nil && len(*apiResp.OsTypes) > 0 {
151142
osTypes := make([]string, len(*apiResp.OsTypes))

internal/kibana/security/exception_list/models.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ type ExceptionListModel struct {
1414
OsTypes types.List `tfsdk:"os_types"`
1515
Tags types.List `tfsdk:"tags"`
1616
Meta types.String `tfsdk:"meta"`
17-
Version types.Int64 `tfsdk:"version"`
1817
CreatedAt types.String `tfsdk:"created_at"`
1918
CreatedBy types.String `tfsdk:"created_by"`
2019
UpdatedAt types.String `tfsdk:"updated_at"`

internal/kibana/security/exception_list/schema.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ func (r *ExceptionListResource) Schema(_ context.Context, _ resource.SchemaReque
8686
MarkdownDescription: "Placeholder for metadata about the list container as JSON string.",
8787
Optional: true,
8888
},
89-
"version": schema.Int64Attribute{
90-
MarkdownDescription: "The version of the exception list.",
91-
Computed: true,
92-
},
9389
"created_at": schema.StringAttribute{
9490
MarkdownDescription: "The timestamp of when the exception list was created.",
9591
Computed: true,

0 commit comments

Comments
 (0)