chore: adjust pagination for postgres database and flavor listing (#20)
* feat: implement pagination for database listing * fix: change database_id attribute type from string to int64 * refactor: rename getDatabase to getDatabaseById for clarity * fix: improve error handling for database not found scenario * feat: add validation for database_id and name attributes; implement separate functions for fetching databases by ID and name * feat: implement database client interface and update database fetching functions * refactor: rename matcher to filter for clarity and update pagination logic * feat: implement flavors retrieval with pagination and filtering support * refactor: rename flavor import for consistency and clarity * feat: add support for InstanceStatePending in wait handler logic * refactor: simplify GetFlavorsRequest and GetFlavorsRequestExecute by removing pagination parameters * refactor: improve readability of test cases by formatting function signatures and restructuring test runs * refactor: remove pagination parameters from GetFlavorsRequest in test case * refactor: simplify function signatures and improve readability in datasource and resource files * refactor: add descriptions for user-related attributes in datasource schema * refactor: enhance user resource schema with additional attributes and improve logging * refactor: delete unused file * refactor: standardize formatting and improve function naming for user resource management * refactor: remove skip from TestMapFields and update roles initialization in resource tests * fix: golangci lint issues * fix: golangci lint issues again * fix: golangci lint issues again
This commit is contained in:
parent
0150fea302
commit
979220be66
26 changed files with 3630 additions and 2759 deletions
|
|
@ -19,7 +19,7 @@ import (
|
|||
"github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/core"
|
||||
"github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/features"
|
||||
postgresFlexAlphaDatabase "github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/database"
|
||||
"github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/flavor"
|
||||
postgresFlexAlphaFlavor "github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/flavor"
|
||||
postgresFlexAlphaInstance "github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/instance"
|
||||
postgresFlexAlphaUser "github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/user"
|
||||
sqlserverFlexAlphaFlavor "github.com/mhenselin/terraform-provider-stackitprivatepreview/stackit/internal/services/sqlserverflexalpha/flavor"
|
||||
|
|
@ -363,7 +363,8 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
|
|||
|
||||
setStringField(providerConfig.DefaultRegion, func(v string) { providerData.DefaultRegion = v })
|
||||
setStringField(
|
||||
providerConfig.Region, func(v string) { providerData.Region = v }, // nolint:staticcheck // preliminary handling of deprecated attribute
|
||||
providerConfig.Region,
|
||||
func(v string) { providerData.Region = v }, // nolint:staticcheck // preliminary handling of deprecated attribute
|
||||
)
|
||||
setBoolField(providerConfig.EnableBetaResources, func(v bool) { providerData.EnableBetaResources = v })
|
||||
|
||||
|
|
@ -490,7 +491,7 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
|
|||
func (p *Provider) DataSources(_ context.Context) []func() datasource.DataSource {
|
||||
return []func() datasource.DataSource{
|
||||
postgresFlexAlphaFlavor.NewFlavorDataSource,
|
||||
//postgresFlexAlphaFlavor.NewFlavorListDataSource,
|
||||
// postgresFlexAlphaFlavor.NewFlavorListDataSource,
|
||||
postgresFlexAlphaDatabase.NewDatabaseDataSource,
|
||||
postgresFlexAlphaInstance.NewInstanceDataSource,
|
||||
postgresFlexAlphaUser.NewUserDataSource,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue