Skip to content

Commit e7d0ceb

Browse files
committed
Swap version -> version_id
1 parent df5b37a commit e7d0ceb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/kibana/security_list_item/models.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type SecurityListItemModel struct {
2323
CreatedBy types.String `tfsdk:"created_by"`
2424
UpdatedAt types.String `tfsdk:"updated_at"`
2525
UpdatedBy types.String `tfsdk:"updated_by"`
26-
Version types.String `tfsdk:"version"`
26+
VersionID types.String `tfsdk:"version_id"`
2727
}
2828

2929
// toAPICreateModel converts the Terraform model to the API create request body
@@ -71,8 +71,8 @@ func (m *SecurityListItemModel) toAPIUpdateModel(ctx context.Context) (*kbapi.Up
7171
}
7272

7373
// Set optional version if available
74-
if utils.IsKnown(m.Version) {
75-
version := kbapi.SecurityListsAPIListVersionId(m.Version.ValueString())
74+
if utils.IsKnown(m.VersionID) {
75+
version := kbapi.SecurityListsAPIListVersionId(m.VersionID.ValueString())
7676
body.UnderscoreVersion = &version
7777
}
7878

@@ -108,9 +108,9 @@ func (m *SecurityListItemModel) fromAPIModel(ctx context.Context, apiItem *kbapi
108108

109109
// Set version if available
110110
if apiItem.UnderscoreVersion != nil {
111-
m.Version = types.StringValue(string(*apiItem.UnderscoreVersion))
111+
m.VersionID = types.StringValue(string(*apiItem.UnderscoreVersion))
112112
} else {
113-
m.Version = types.StringNull()
113+
m.VersionID = types.StringNull()
114114
}
115115

116116
// Set meta if available

internal/kibana/security_list_item/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (r *securityListItemResource) Schema(_ context.Context, _ resource.SchemaRe
5656
Optional: true,
5757
CustomType: jsontypes.NormalizedType{},
5858
},
59-
"version": schema.StringAttribute{
59+
"version_id": schema.StringAttribute{
6060
MarkdownDescription: "The version id, normally returned by the API when the document is retrieved. Used to ensure updates are done against the latest version.",
6161
Computed: true,
6262
},

0 commit comments

Comments
 (0)