fix: state drift of "stackit_server" (#679)

* fix: State drift of "stackit_server" when using "stackit_server_network_interface_attach"

* fix: tests

* add acceptance tests for stackit_server_network_interface_attach
This commit is contained in:
Marcel Jacek 2025-02-18 14:33:39 +01:00 committed by GitHub
parent 3e8dcc542b
commit b7f56d1685
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 172 additions and 22 deletions

View file

@ -98,16 +98,13 @@ func TestMapFields(t *testing.T) {
Labels: types.MapValueMust(types.StringType, map[string]attr.Value{
"key": types.StringValue("value"),
}),
ImageId: types.StringValue("image_id"),
NetworkInterfaces: types.ListValueMust(types.StringType, []attr.Value{
types.StringValue("nic1"),
types.StringValue("nic2"),
}),
KeypairName: types.StringValue("keypair_name"),
AffinityGroup: types.StringValue("group_id"),
CreatedAt: types.StringValue(testTimestampValue),
UpdatedAt: types.StringValue(testTimestampValue),
LaunchedAt: types.StringValue(testTimestampValue),
ImageId: types.StringValue("image_id"),
NetworkInterfaces: types.ListNull(types.StringType),
KeypairName: types.StringValue("keypair_name"),
AffinityGroup: types.StringValue("group_id"),
CreatedAt: types.StringValue(testTimestampValue),
UpdatedAt: types.StringValue(testTimestampValue),
LaunchedAt: types.StringValue(testTimestampValue),
},
true,
},