fix: refactor identity data handling and improve API response mapping

This commit is contained in:
Andre_Harms 2026-02-11 16:14:49 +01:00
parent be5c3b5430
commit 8b2d76482b
7 changed files with 87 additions and 35 deletions

View file

@ -69,7 +69,7 @@ func (r *databaseResource) Metadata(
//go:embed planModifiers.yaml
var modifiersFileByte []byte
func (r *databaseResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
func (r *databaseResource) Schema(ctx context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
s := sqlserverflexbetaResGen.DatabaseResourceSchema(ctx)
@ -395,7 +395,7 @@ func (r *databaseResource) Read(ctx context.Context, req resource.ReadRequest, r
tflog.Info(ctx, "sqlserverflexbeta.Database read")
}
func (r *databaseResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {
func (r *databaseResource) Update(ctx context.Context, _ resource.UpdateRequest, resp *resource.UpdateResponse) {
// TODO: Check update api endpoint - not available at the moment, so return an error for now
core.LogAndAddError(ctx, &resp.Diagnostics, "Error updating database", "Database can't be updated")
}
@ -440,6 +440,7 @@ func (r *databaseResource) Delete(ctx context.Context, req resource.DeleteReques
}
ctx = core.LogResponse(ctx)
resp.State.RemoveResource(ctx)
tflog.Info(ctx, "sqlserverflexbeta.Database deleted")
}