Implement PostgreSQL Flex database resource and data source (#453)

* Implement db resource

* Implement db data source

* Extend acc test

* Improve logs in other resources

* Add examples

* Generate docs

* Fix linter
This commit is contained in:
João Palet 2024-07-09 14:05:58 +01:00 committed by GitHub
parent 3fb28d1248
commit 34388eb361
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 923 additions and 29 deletions

View file

@ -73,13 +73,13 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi
}
r.client = apiClient
tflog.Info(ctx, "PostgresFlex instance client configured")
tflog.Info(ctx, "Postgres Flex instance client configured")
}
// Schema defines the schema for the data source.
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
descriptions := map[string]string{
"main": "PostgresFlex instance data source schema. Must have a `region` specified in the provider configuration.",
"main": "Postgres Flex instance data source schema. Must have a `region` specified in the provider configuration.",
"id": "Terraform's internal data source. ID. It is structured as \"`project_id`,`instance_id`\".",
"instance_id": "ID of the PostgresFlex instance.",
"project_id": "STACKIT project ID to which the instance is associated.",
@ -216,5 +216,5 @@ func (r *instanceDataSource) Read(ctx context.Context, req datasource.ReadReques
if resp.Diagnostics.HasError() {
return
}
tflog.Info(ctx, "PostgresFlex instance read")
tflog.Info(ctx, "Postgres Flex instance read")
}