feat: add project_id and region attributes to database data source schema and refactor user model mapping

This commit is contained in:
Andre_Harms 2026-02-09 15:38:54 +01:00
parent 1284bcc8a3
commit f0e7c19cdf
8 changed files with 51 additions and 630 deletions

View file

@ -53,11 +53,8 @@ func mapDataSourceFields(userResp *postgresflex.GetUserResponse, model *DataSour
}
model.Id = types.Int64Value(userId)
model.Host = types.StringValue(user.GetHost())
model.Port = types.Int64Value(user.GetPort())
model.Region = types.StringValue(region)
model.Status = types.StringValue(user.GetStatus())
model.ConnectionString = types.StringValue(user.GetConnectionString())
return nil
}
@ -141,10 +138,7 @@ func mapResourceFields(userResp *postgresflex.GetUserResponse, model *ResourceMo
}
model.Roles = types.List(rolesSet)
}
model.Host = types.StringPointerValue(user.Host)
model.Port = types.Int64PointerValue(user.Port)
model.Region = types.StringValue(region)
model.Status = types.StringPointerValue(user.Status)
model.ConnectionString = types.StringPointerValue(user.ConnectionString)
return nil
}